mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	Removes shorthand flag from kubectl apply
This commit is contained in:
		@@ -1163,7 +1163,7 @@ __EOF__
 | 
				
			|||||||
  kube::test::get_object_assert pods "{{range.items}}{{$id_field}}:{{end}}" ''
 | 
					  kube::test::get_object_assert pods "{{range.items}}{{$id_field}}:{{end}}" ''
 | 
				
			||||||
  kubectl delete pvc b-pvc 2>&1 "${kube_flags[@]}"
 | 
					  kubectl delete pvc b-pvc 2>&1 "${kube_flags[@]}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  ## kubectl apply --prune --prune-whitelist(-w)
 | 
					  ## kubectl apply --prune --prune-whitelist
 | 
				
			||||||
  # Pre-Condition: no POD exists
 | 
					  # Pre-Condition: no POD exists
 | 
				
			||||||
  kube::test::get_object_assert pods "{{range.items}}{{$id_field}}:{{end}}" ''
 | 
					  kube::test::get_object_assert pods "{{range.items}}{{$id_field}}:{{end}}" ''
 | 
				
			||||||
  # apply pod a
 | 
					  # apply pod a
 | 
				
			||||||
@@ -1171,7 +1171,7 @@ __EOF__
 | 
				
			|||||||
  # check right pod exists
 | 
					  # check right pod exists
 | 
				
			||||||
  kube::test::get_object_assert 'pods a' "{{${id_field}}}" 'a'
 | 
					  kube::test::get_object_assert 'pods a' "{{${id_field}}}" 'a'
 | 
				
			||||||
  # apply svc and don't prune pod a by overwriting whitelist
 | 
					  # apply svc and don't prune pod a by overwriting whitelist
 | 
				
			||||||
  kubectl apply --prune -l prune-group=true -f hack/testdata/prune/svc.yaml -w core/v1/Service 2>&1 "${kube_flags[@]}"
 | 
					  kubectl apply --prune -l prune-group=true -f hack/testdata/prune/svc.yaml --prune-whitelist core/v1/Service 2>&1 "${kube_flags[@]}"
 | 
				
			||||||
  kube::test::get_object_assert 'service prune-svc' "{{${id_field}}}" 'prune-svc'
 | 
					  kube::test::get_object_assert 'service prune-svc' "{{${id_field}}}" 'prune-svc'
 | 
				
			||||||
  kube::test::get_object_assert 'pods a' "{{${id_field}}}" 'a'
 | 
					  kube::test::get_object_assert 'pods a' "{{${id_field}}}" 'a'
 | 
				
			||||||
  # apply svc and prune pod a with default whitelist
 | 
					  # apply svc and prune pod a with default whitelist
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -109,7 +109,7 @@ func NewCmdApply(f cmdutil.Factory, out io.Writer) *cobra.Command {
 | 
				
			|||||||
	cmdutil.AddValidateFlags(cmd)
 | 
						cmdutil.AddValidateFlags(cmd)
 | 
				
			||||||
	cmd.Flags().StringVarP(&options.Selector, "selector", "l", "", "Selector (label query) to filter on")
 | 
						cmd.Flags().StringVarP(&options.Selector, "selector", "l", "", "Selector (label query) to filter on")
 | 
				
			||||||
	cmd.Flags().Bool("all", false, "[-all] to select all the specified resources.")
 | 
						cmd.Flags().Bool("all", false, "[-all] to select all the specified resources.")
 | 
				
			||||||
	cmd.Flags().StringArrayP("prune-whitelist", "w", []string{}, "Overwrite the default whitelist with <group/version/kind> for --prune")
 | 
						cmd.Flags().StringArray("prune-whitelist", []string{}, "Overwrite the default whitelist with <group/version/kind> for --prune")
 | 
				
			||||||
	cmdutil.AddDryRunFlag(cmd)
 | 
						cmdutil.AddDryRunFlag(cmd)
 | 
				
			||||||
	cmdutil.AddPrinterFlags(cmd)
 | 
						cmdutil.AddPrinterFlags(cmd)
 | 
				
			||||||
	cmdutil.AddRecordFlag(cmd)
 | 
						cmdutil.AddRecordFlag(cmd)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user