cmd.Flags().String("generator","service/v1","The name of the api generator that you want to use. Default 'service/v1'")
cmd.Flags().String("protocol","TCP","The network protocol for the service you want to be created. Default 'tcp'")
cmd.Flags().String("generator","service/v1","The name of the API generator to use. Default is 'service/v1'.")
cmd.Flags().String("protocol","TCP","The network protocol for the service to be created. Default is 'tcp'.")
cmd.Flags().Int("port",-1,"The port that the service should serve on. Required.")
cmd.Flags().Bool("create-external-load-balancer",false,"If true, create an external load balancer for this service. Implementation is cloud provider dependent. Default false")
cmd.Flags().String("selector","","A label selector to use for this service. If empty (the default) infer the selector from the replication controller")
cmd.Flags().Bool("dry-run",false,"If true, only print the object that would be sent, don't actually do anything")
cmd.Flags().Bool("create-external-load-balancer",false,"If true, create an external load balancer for this service. Implementation is cloud provider dependent. Default is 'false'.")
cmd.Flags().String("selector","","A label selector to use for this service. If empty (the default) infer the selector from the replication controller.")
cmd.Flags().Bool("dry-run",false,"If true, only print the object that would be sent, without creating it.")
cmd.Flags().String("container-port","","Name or number for the port on the container that the service should direct traffic to. Optional.")
cmd.Flags().String("public-ip","","Name of a public ip address to set for the service. The service will be assigned this IP in addition to its generated service IP.")
cmd.Flags().String("overrides","","An inline JSON override for the generated object. If this is non-empty, it is parsed used to override the generated object. Requires that the object supply a valid apiVersion field.")
cmd.Flags().String("public-ip","","Name of a public IP address to set for the service. The service will be assigned this IP in addition to its generated service IP.")
cmd.Flags().String("overrides","","An inline JSON override for the generated object. If this is non-empty, it is used to override the generated object. Requires that the object supply a valid apiVersion field.")
cmd.Flags().String("service-name","","The name for the newly created service.")
// If the replication controller named foo's current size is 2, resize foo to 3.`,
Run:func(cmd*cobra.Command,args[]string){
count:=util.GetFlagInt(cmd,"replicas")
iflen(args)!=2||count<0{
...
...
@@ -66,8 +65,8 @@ Examples:
fmt.Fprintf(out,"%s\n",s)
},
}
cmd.Flags().String("resource-version","","Precondition for resource version. Requires that the current resource version match this value in order to resize")
cmd.Flags().Int("current-replicas",-1,"Precondition for current size. Requires that the current size of the replication controller match this value in order to resize")
cmd.Flags().Int("replicas",-1,"The new number desired number of replicas. Required.")
cmd.Flags().String("resource-version","","Precondition for resource version. Requires that the current resource version match this value in order to resize.")
cmd.Flags().Int("current-replicas",-1,"Precondition for current size. Requires that the current size of the replication controller match this value in order to resize.")
cmd.Flags().Int("replicas",-1,"The new desired number of replicas. Required.")
cmd.Flags().String("update-period",updatePeriod,`Time to wait between updating pods. Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".`)
cmd.Flags().String("poll-interval",pollInterval,`Time delay between polling controller status after update. Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".`)
cmd.Flags().String("timeout",timeout,`Max time to wait for a controller to update before giving up. Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".`)
cmd.Flags().StringP("filename","f","","Filename or URL to file to use to create the new controller")
cmd.Flags().StringP("filename","f","","Filename or URL to file to use to create the new controller.")
// Start a single instance of nginx, but overload the desired state with a partial set of values parsed from JSON`,
Run:func(cmd*cobra.Command,args[]string){
iflen(args)!=1{
usageError(cmd,"<name> is required for run-container")
...
...
@@ -87,11 +88,11 @@ Examples:
},
}
util.AddPrinterFlags(cmd)
cmd.Flags().String("generator","run-container/v1","The name of the api generator that you want to use. Default 'run-container-controller/v1'")
cmd.Flags().String("image","","The image for the container you wish to run.")
cmd.Flags().IntP("replicas","r",1,"Number of replicas to create for this container. Default 1")
cmd.Flags().Bool("dry-run",false,"If true, only print the object that would be sent, don't actually do anything")
cmd.Flags().String("overrides","","An inline JSON override for the generated object. If this is non-empty, it is parsed used to override the generated object. Requires that the object supply a valid apiVersion field.")
cmd.Flags().String("generator","run-container/v1","The name of the API generator to use. Default is 'run-container-controller/v1'.")
cmd.Flags().String("image","","The image for the container to run.")
cmd.Flags().IntP("replicas","r",1,"Number of replicas to create for this container. Default is 1.")
cmd.Flags().Bool("dry-run",false,"If true, only print the object that would be sent, without sending it.")
cmd.Flags().String("overrides","","An inline JSON override for the generated object. If this is non-empty, it is used to override the generated object. Requires that the object supply a valid apiVersion field.")
cmd.Flags().Int("port",-1,"The port that this container exposes.")
cmd.Flags().StringP("labels","l","","Labels to apply to the pod(s) created by this call to run-container.")
// Update a pod by downloading it, applying the patch, then updating. Requires apiVersion be specified.`,
Run:func(cmd*cobra.Command,args[]string){
schema,err:=f.Validator(cmd)
checkErr(err)
...
...
@@ -97,8 +98,8 @@ Examples:
},
}
cmd.Flags().VarP(&flags.Filenames,"filename","f","Filename, directory, or URL to file to use to update the resource")
cmd.Flags().String("patch","","A JSON document to override the existing resource. The resource is downloaded, then patched with the JSON, the updated")
cmd.Flags().VarP(&flags.Filenames,"filename","f","Filename, directory, or URL to file to use to update the resource.")
cmd.Flags().String("patch","","A JSON document to override the existing resource. The resource is downloaded, patched with the JSON, then updated.")