etcd upgrade warning: add docs link, fixed etcd2 behavior, print non-interactive
This commit is contained in:
		@@ -447,10 +447,10 @@ if [[ "${master_upgrade}" == "false" ]] && [[ "${node_upgrade}" == "false" ]]; t
 | 
				
			|||||||
  exit 1
 | 
					  exit 1
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# prompt if etcd storage media type isn't set
 | 
					# prompt if etcd storage media type isn't set unless using etcd2 when doing master upgrade
 | 
				
			||||||
if [[ -z "${STORAGE_MEDIA_TYPE:-}" ]]; then
 | 
					if [[ -z "${STORAGE_MEDIA_TYPE:-}" ]] && [[ "${STORAGE_BACKEND:-}" != "etcd2" ]] && [[ "${master_upgrade}" == "true" ]]; then
 | 
				
			||||||
  if [ -t 0 ] && [ -t 1 ]; then
 | 
					 | 
				
			||||||
  echo "The default etcd storage media type in 1.6 has changed from application/json to application/vnd.kubernetes.protobuf."
 | 
					  echo "The default etcd storage media type in 1.6 has changed from application/json to application/vnd.kubernetes.protobuf."
 | 
				
			||||||
 | 
					  echo "Documentation about the change can be found at https://kubernetes.io/docs/admin/etcd_upgrade."
 | 
				
			||||||
  echo ""
 | 
					  echo ""
 | 
				
			||||||
  echo "ETCD2 DOES NOT SUPPORT PROTOBUF: If you wish to have to ability to downgrade to etcd2 later application/json must be used."
 | 
					  echo "ETCD2 DOES NOT SUPPORT PROTOBUF: If you wish to have to ability to downgrade to etcd2 later application/json must be used."
 | 
				
			||||||
  echo ""
 | 
					  echo ""
 | 
				
			||||||
@@ -458,7 +458,9 @@ if [[ -z "${STORAGE_MEDIA_TYPE:-}" ]]; then
 | 
				
			|||||||
  echo "export STORAGE_MEDIA_TYPE=application/json"
 | 
					  echo "export STORAGE_MEDIA_TYPE=application/json"
 | 
				
			||||||
  echo ""
 | 
					  echo ""
 | 
				
			||||||
  echo "It's HIGHLY recommended that etcd be backed up before this step!!"
 | 
					  echo "It's HIGHLY recommended that etcd be backed up before this step!!"
 | 
				
			||||||
    read -p "Would you like to continue? [y/N] " confirm
 | 
					  echo ""
 | 
				
			||||||
 | 
					  if [ -t 0 ] && [ -t 1 ]; then
 | 
				
			||||||
 | 
					    read -p "Would you like to continue with the new default, and lose the ability to downgrade to etcd2? [y/N] " confirm
 | 
				
			||||||
    if [[ "${confirm}" != "y" ]]; then
 | 
					    if [[ "${confirm}" != "y" ]]; then
 | 
				
			||||||
      exit 1
 | 
					      exit 1
 | 
				
			||||||
    fi
 | 
					    fi
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user