mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	fix warning info format
Before this change: ``` $ kubectl exec -p nginx-aaaaaaaaaaaaa-67b58bf687-r68b9 ls -p POD_NAME is DEPRECATED and will be removed in a future version. Use exec POD_NAME instead.bin boot dev ... $ kubectl scale --replicas=2 job/pi kubectl scale job is DEPRECATED and will be removed in a future version.job.batch "pi" scaled ``` After this change: ``` $ kubectl exec -p nginx-aaaaaaaaaaaaa-67b58bf687-r68b9 ls -p POD_NAME is DEPRECATED and will be removed in a future version. Use exec POD_NAME instead. bin boot dev ... $ kubectl scale --replicas=2 job/pi kubectl scale job is DEPRECATED and will be removed in a future version. job.batch "pi" scaled ```
This commit is contained in:
		@@ -355,7 +355,7 @@ func runHelp(cmd *cobra.Command, args []string) {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func printDeprecationWarning(errOut io.Writer, command, alias string) {
 | 
					func printDeprecationWarning(errOut io.Writer, command, alias string) {
 | 
				
			||||||
	fmt.Fprintf(errOut, "%s is DEPRECATED and will be removed in a future version. Use %s instead.", alias, command)
 | 
						fmt.Fprintf(errOut, "%s is DEPRECATED and will be removed in a future version. Use %s instead.\n", alias, command)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// deprecatedAlias is intended to be used to create a "wrapper" command around
 | 
					// deprecatedAlias is intended to be used to create a "wrapper" command around
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -147,7 +147,7 @@ func RunScale(f cmdutil.Factory, out, errOut io.Writer, cmd *cobra.Command, args
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		mapping := info.ResourceMapping()
 | 
							mapping := info.ResourceMapping()
 | 
				
			||||||
		if mapping.Resource == "jobs" {
 | 
							if mapping.Resource == "jobs" {
 | 
				
			||||||
			fmt.Fprintf(errOut, "%s scale job is DEPRECATED and will be removed in a future version.", cmd.Parent().Name())
 | 
								fmt.Fprintf(errOut, "%s scale job is DEPRECATED and will be removed in a future version.\n", cmd.Parent().Name())
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		scaler, err := f.Scaler(mapping)
 | 
							scaler, err := f.Scaler(mapping)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user