From d099be5bd47596732bf5f20642d537765b26bcd9 Mon Sep 17 00:00:00 2001 From: juanvallejo Date: Wed, 5 Oct 2016 17:16:50 -0400 Subject: [PATCH 1/5] Add --dry-run option to create sub-commands Adds `--dry-run` option to create/deploymenrconfig, create/identity.go, create/imagestream.go, create/user.go, user_identity_mapping.go --- pkg/cmd/cli/cmd/create/clusterquota.go | 23 ++++-- pkg/cmd/cli/cmd/create/deploymentconfig.go | 24 ++++-- pkg/cmd/cli/cmd/create/identity.go | 21 +++++- pkg/cmd/cli/cmd/create/imagestream.go | 22 ++++-- pkg/cmd/cli/cmd/create/route.go | 74 ++++++++++++++----- pkg/cmd/cli/cmd/create/user.go | 20 ++++- .../cli/cmd/create/user_identity_mapping.go | 20 ++++- 7 files changed, 159 insertions(+), 45 deletions(-) diff --git a/pkg/cmd/cli/cmd/create/clusterquota.go b/pkg/cmd/cli/cmd/create/clusterquota.go index 809a1c6e01f4..f70196761abf 100644 --- a/pkg/cmd/cli/cmd/create/clusterquota.go +++ b/pkg/cmd/cli/cmd/create/clusterquota.go @@ -36,6 +36,8 @@ type CreateClusterQuotaOptions struct { ClusterQuota *quotaapi.ClusterResourceQuota Client client.ClusterResourceQuotasInterface + DryRun bool + Mapper meta.RESTMapper OutputFormat string Out io.Writer @@ -59,10 +61,11 @@ func NewCmdCreateClusterQuota(name, fullName string, f *clientcmd.Factory, out i Aliases: []string{"clusterquota"}, } + cmdutil.AddPrinterFlags(cmd) + cmd.Flags().BoolVarP(&o.DryRun, "dry-run", "", false, "If true, only print the object that would be sent, without sending it.") cmd.Flags().String("project-label-selector", "", "The project label selector for the cluster resource quota") cmd.Flags().String("project-annotation-selector", "", "The project annotation selector for the cluster resource quota") cmd.Flags().StringSlice("hard", []string{}, "The resource to constrain: RESOURCE=QUANTITY (pods=10)") - cmdutil.AddOutputFlagsForMutation(cmd) return cmd } @@ -147,13 +150,23 @@ func (o *CreateClusterQuotaOptions) Validate() error { } func (o *CreateClusterQuotaOptions) Run() error { - actualObj, err := o.Client.ClusterResourceQuotas().Create(o.ClusterQuota) - if err != nil { - return err + actualObj := o.ClusterQuota + + var err error + if !o.DryRun { + actualObj, err = o.Client.ClusterResourceQuotas().Create(o.ClusterQuota) + if err != nil { + return err + } } if useShortOutput := o.OutputFormat == "name"; useShortOutput || len(o.OutputFormat) == 0 { - cmdutil.PrintSuccess(o.Mapper, useShortOutput, o.Out, "clusterquota", actualObj.Name, "created") + created := "created" + if o.DryRun { + created = "created (DRY RUN)" + } + + cmdutil.PrintSuccess(o.Mapper, useShortOutput, o.Out, "clusterquota", actualObj.Name, created) return nil } diff --git a/pkg/cmd/cli/cmd/create/deploymentconfig.go b/pkg/cmd/cli/cmd/create/deploymentconfig.go index 111cfe745887..c17ccf7cbc48 100644 --- a/pkg/cmd/cli/cmd/create/deploymentconfig.go +++ b/pkg/cmd/cli/cmd/create/deploymentconfig.go @@ -32,6 +32,8 @@ type CreateDeploymentConfigOptions struct { DC *deployapi.DeploymentConfig Client client.DeploymentConfigsNamespacer + DryRun bool + Mapper meta.RESTMapper OutputFormat string Out io.Writer @@ -55,9 +57,10 @@ func NewCmdCreateDeploymentConfig(name, fullName string, f *clientcmd.Factory, o Aliases: []string{"dc"}, } + cmd.Flags().BoolVarP(&o.DryRun, "dry-run", "", false, "If true, only print the object that would be sent, without sending it.") cmd.Flags().String("image", "", "The image for the container to run.") cmd.MarkFlagRequired("image") - cmdutil.AddOutputFlagsForMutation(cmd) + cmdutil.AddPrinterFlags(cmd) return cmd } @@ -135,13 +138,24 @@ func (o *CreateDeploymentConfigOptions) Validate() error { } func (o *CreateDeploymentConfigOptions) Run() error { - actualObj, err := o.Client.DeploymentConfigs(o.DC.Namespace).Create(o.DC) - if err != nil { - return err + actualObj := o.DC + + var err error + if !o.DryRun { + + actualObj, err = o.Client.DeploymentConfigs(o.DC.Namespace).Create(o.DC) + if err != nil { + return err + } } if useShortOutput := o.OutputFormat == "name"; useShortOutput || len(o.OutputFormat) == 0 { - cmdutil.PrintSuccess(o.Mapper, useShortOutput, o.Out, "deploymentconfig", actualObj.Name, "created") + created := "created" + if o.DryRun { + created = "created (DRY RUN)" + } + + cmdutil.PrintSuccess(o.Mapper, useShortOutput, o.Out, "deploymentconfig", actualObj.Name, created) return nil } diff --git a/pkg/cmd/cli/cmd/create/identity.go b/pkg/cmd/cli/cmd/create/identity.go index ea3dcad319a2..970dce983681 100644 --- a/pkg/cmd/cli/cmd/create/identity.go +++ b/pkg/cmd/cli/cmd/create/identity.go @@ -39,6 +39,8 @@ type CreateIdentityOptions struct { IdentityClient client.IdentityInterface + DryRun bool + Mapper meta.RESTMapper OutputFormat string Out io.Writer @@ -60,6 +62,8 @@ func NewCmdCreateIdentity(name, fullName string, f *clientcmd.Factory, out io.Wr cmdutil.CheckErr(o.Run()) }, } + + cmd.Flags().BoolVarP(&o.DryRun, "dry-run", "", false, "If true, only print the object that would be sent, without sending it.") cmdutil.AddPrinterFlags(cmd) return cmd } @@ -123,13 +127,22 @@ func (o *CreateIdentityOptions) Run() error { identity.ProviderName = o.ProviderName identity.ProviderUserName = o.ProviderUserName - actualIdentity, err := o.IdentityClient.Create(identity) - if err != nil { - return err + actualIdentity := identity + + var err error + if !o.DryRun { + actualIdentity, err = o.IdentityClient.Create(identity) + if err != nil { + return err + } } if useShortOutput := o.OutputFormat == "name"; useShortOutput || len(o.OutputFormat) == 0 { - cmdutil.PrintSuccess(o.Mapper, useShortOutput, o.Out, "identity", actualIdentity.Name, "created") + created := "created" + if o.DryRun { + created = "created (DRY RUN)" + } + cmdutil.PrintSuccess(o.Mapper, useShortOutput, o.Out, "identity", actualIdentity.Name, created) return nil } diff --git a/pkg/cmd/cli/cmd/create/imagestream.go b/pkg/cmd/cli/cmd/create/imagestream.go index 5e0e581ee6f8..c6a2a5ed8a2d 100644 --- a/pkg/cmd/cli/cmd/create/imagestream.go +++ b/pkg/cmd/cli/cmd/create/imagestream.go @@ -33,6 +33,8 @@ type CreateImageStreamOptions struct { IS *imageapi.ImageStream Client client.ImageStreamsNamespacer + DryRun bool + Mapper meta.RESTMapper OutputFormat string Out io.Writer @@ -56,7 +58,8 @@ func NewCmdCreateImageStream(name, fullName string, f *clientcmd.Factory, out io Aliases: []string{"is"}, } - cmdutil.AddOutputFlagsForMutation(cmd) + cmdutil.AddPrinterFlags(cmd) + cmd.Flags().BoolVarP(&o.DryRun, "dry-run", "", false, "If true, only print the object that would be sent, without sending it.") return cmd } @@ -117,13 +120,22 @@ func (o *CreateImageStreamOptions) Validate() error { } func (o *CreateImageStreamOptions) Run() error { - actualObj, err := o.Client.ImageStreams(o.IS.Namespace).Create(o.IS) - if err != nil { - return err + actualObj := o.IS + + var err error + if !o.DryRun { + actualObj, err = o.Client.ImageStreams(o.IS.Namespace).Create(o.IS) + if err != nil { + return err + } } if useShortOutput := o.OutputFormat == "name"; useShortOutput || len(o.OutputFormat) == 0 { - cmdutil.PrintSuccess(o.Mapper, useShortOutput, o.Out, "imagestream", actualObj.Name, "created") + created := "created" + if o.DryRun { + created = "created (DRY RUN)" + } + cmdutil.PrintSuccess(o.Mapper, useShortOutput, o.Out, "imagestream", actualObj.Name, created) return nil } diff --git a/pkg/cmd/cli/cmd/create/route.go b/pkg/cmd/cli/cmd/create/route.go index 01119849e2ff..3e3bda153a01 100644 --- a/pkg/cmd/cli/cmd/create/route.go +++ b/pkg/cmd/cli/cmd/create/route.go @@ -70,7 +70,8 @@ func NewCmdCreateEdgeRoute(fullName string, f *clientcmd.Factory, out io.Writer) } kcmdutil.AddValidateFlags(cmd) - kcmdutil.AddOutputFlagsForMutation(cmd) + kcmdutil.AddPrinterFlags(cmd) + cmd.Flags().Bool("dry-run", false, "If true, only print the route that would be created, without creating it.") cmd.Flags().String("hostname", "", "Set a hostname for the new route") cmd.Flags().String("port", "", "Name of the service port or number of the container port the route will route traffic to") cmd.Flags().String("insecure-policy", "", "Set an insecure policy for the new route") @@ -136,22 +137,34 @@ func CreateEdgeRoute(f *clientcmd.Factory, out io.Writer, cmd *cobra.Command, ar route.Spec.TLS.InsecureEdgeTerminationPolicy = api.InsecureEdgeTerminationPolicyType(insecurePolicy) } - route, err = oc.Routes(ns).Create(route) - if err != nil { - return err + dryRun := kcmdutil.GetFlagBool(cmd, "dry-run") + actualRoute := route + + if !dryRun { + actualRoute, err = oc.Routes(ns).Create(route) + if err != nil { + return err + } } + mapper, typer := f.Object(false) resourceMapper := &resource.Mapper{ ObjectTyper: typer, RESTMapper: mapper, ClientMapper: resource.ClientMapperFunc(f.ClientForMapping), } - info, err := resourceMapper.InfoForObject(route, nil) + info, err := resourceMapper.InfoForObject(actualRoute, nil) if err != nil { return err } + + created := "created" + if dryRun { + created = "created (DRY RUN)" + } + shortOutput := kcmdutil.GetFlagString(cmd, "output") == "name" - kcmdutil.PrintSuccess(mapper, shortOutput, out, info.Mapping.Resource, info.Name, "created") + kcmdutil.PrintSuccess(mapper, shortOutput, out, info.Mapping.Resource, info.Name, created) return nil } @@ -184,7 +197,8 @@ func NewCmdCreatePassthroughRoute(fullName string, f *clientcmd.Factory, out io. } kcmdutil.AddValidateFlags(cmd) - kcmdutil.AddOutputFlagsForMutation(cmd) + kcmdutil.AddPrinterFlags(cmd) + cmd.Flags().Bool("dry-run", false, "If true, only print the route that would be created, without creating it.") cmd.Flags().String("hostname", "", "Set a hostname for the new route") cmd.Flags().String("port", "", "Name of the service port or number of the container port the route will route traffic to") cmd.Flags().String("service", "", "Name of the service that the new route is exposing") @@ -221,22 +235,34 @@ func CreatePassthroughRoute(f *clientcmd.Factory, out io.Writer, cmd *cobra.Comm route.Spec.TLS = new(api.TLSConfig) route.Spec.TLS.Termination = api.TLSTerminationPassthrough - route, err = oc.Routes(ns).Create(route) - if err != nil { - return err + dryRun := kcmdutil.GetFlagBool(cmd, "dry-run") + actualRoute := route + + if !dryRun { + actualRoute, err = oc.Routes(ns).Create(route) + if err != nil { + return err + } } + mapper, typer := f.Object(false) resourceMapper := &resource.Mapper{ ObjectTyper: typer, RESTMapper: mapper, ClientMapper: resource.ClientMapperFunc(f.ClientForMapping), } - info, err := resourceMapper.InfoForObject(route, nil) + info, err := resourceMapper.InfoForObject(actualRoute, nil) if err != nil { return err } + + created := "created" + if dryRun { + created = "created (DRY RUN)" + } + shortOutput := kcmdutil.GetFlagString(cmd, "output") == "name" - kcmdutil.PrintSuccess(mapper, shortOutput, out, info.Mapping.Resource, info.Name, "created") + kcmdutil.PrintSuccess(mapper, shortOutput, out, info.Mapping.Resource, info.Name, created) return nil } @@ -270,7 +296,8 @@ func NewCmdCreateReencryptRoute(fullName string, f *clientcmd.Factory, out io.Wr } kcmdutil.AddValidateFlags(cmd) - kcmdutil.AddOutputFlagsForMutation(cmd) + kcmdutil.AddPrinterFlags(cmd) + cmd.Flags().Bool("dry-run", false, "If true, only print the route that would be created, without creating it.") cmd.Flags().String("hostname", "", "Set a hostname for the new route") cmd.Flags().String("port", "", "Name of the service port or number of the container port the route will route traffic to") cmd.Flags().String("service", "", "Name of the service that the new route is exposing") @@ -339,9 +366,14 @@ func CreateReencryptRoute(f *clientcmd.Factory, out io.Writer, cmd *cobra.Comman } route.Spec.TLS.DestinationCACertificate = string(destCACert) - route, err = oc.Routes(ns).Create(route) - if err != nil { - return err + dryRun := kcmdutil.GetFlagBool(cmd, "dry-run") + actualRoute := route + + if !dryRun { + actualRoute, err = oc.Routes(ns).Create(route) + if err != nil { + return err + } } mapper, typer := f.Object(false) resourceMapper := &resource.Mapper{ @@ -349,12 +381,18 @@ func CreateReencryptRoute(f *clientcmd.Factory, out io.Writer, cmd *cobra.Comman RESTMapper: mapper, ClientMapper: resource.ClientMapperFunc(f.ClientForMapping), } - info, err := resourceMapper.InfoForObject(route, nil) + info, err := resourceMapper.InfoForObject(actualRoute, nil) if err != nil { return err } + + created := "created" + if dryRun { + created = "created (DRY RUN)" + } + shortOutput := kcmdutil.GetFlagString(cmd, "output") == "name" - kcmdutil.PrintSuccess(mapper, shortOutput, out, info.Mapping.Resource, info.Name, "created") + kcmdutil.PrintSuccess(mapper, shortOutput, out, info.Mapping.Resource, info.Name, created) return nil } diff --git a/pkg/cmd/cli/cmd/create/user.go b/pkg/cmd/cli/cmd/create/user.go index 915cb1db25c2..cadb65719352 100644 --- a/pkg/cmd/cli/cmd/create/user.go +++ b/pkg/cmd/cli/cmd/create/user.go @@ -38,6 +38,8 @@ type CreateUserOptions struct { UserClient client.UserInterface + DryRun bool + Mapper meta.RESTMapper OutputFormat string Out io.Writer @@ -60,6 +62,7 @@ func NewCmdCreateUser(name, fullName string, f *clientcmd.Factory, out io.Writer }, } cmd.Flags().StringVar(&o.FullName, "full-name", o.FullName, "Display name of the user") + cmd.Flags().BoolVarP(&o.DryRun, "dry-run", "", false, "If true, only print the object that would be sent, without sending it.") cmdutil.AddPrinterFlags(cmd) return cmd } @@ -115,13 +118,22 @@ func (o *CreateUserOptions) Run() error { user.Name = o.Name user.FullName = o.FullName - actualUser, err := o.UserClient.Create(user) - if err != nil { - return err + actualUser := user + + var err error + if !o.DryRun { + actualUser, err = o.UserClient.Create(user) + if err != nil { + return err + } } if useShortOutput := o.OutputFormat == "name"; useShortOutput || len(o.OutputFormat) == 0 { - cmdutil.PrintSuccess(o.Mapper, useShortOutput, o.Out, "user", actualUser.Name, "created") + created := "created" + if o.DryRun { + created = "created (DRY RUN)" + } + cmdutil.PrintSuccess(o.Mapper, useShortOutput, o.Out, "user", actualUser.Name, created) return nil } diff --git a/pkg/cmd/cli/cmd/create/user_identity_mapping.go b/pkg/cmd/cli/cmd/create/user_identity_mapping.go index 4dd616974f35..af9114d84d4d 100644 --- a/pkg/cmd/cli/cmd/create/user_identity_mapping.go +++ b/pkg/cmd/cli/cmd/create/user_identity_mapping.go @@ -35,6 +35,8 @@ type CreateUserIdentityMappingOptions struct { UserIdentityMappingClient client.UserIdentityMappingInterface + DryRun bool + Mapper meta.RESTMapper OutputFormat string Out io.Writer @@ -57,6 +59,7 @@ func NewCmdCreateUserIdentityMapping(name, fullName string, f *clientcmd.Factory }, } cmdutil.AddPrinterFlags(cmd) + cmd.Flags().BoolVarP(&o.DryRun, "dry-run", "", false, "If true, only print the object that would be sent, without sending it.") return cmd } @@ -117,13 +120,22 @@ func (o *CreateUserIdentityMappingOptions) Run() error { mapping.Identity = kapi.ObjectReference{Name: o.Identity} mapping.User = kapi.ObjectReference{Name: o.User} - actualMapping, err := o.UserIdentityMappingClient.Create(mapping) - if err != nil { - return err + actualMapping := mapping + + var err error + if !o.DryRun { + actualMapping, err = o.UserIdentityMappingClient.Create(mapping) + if err != nil { + return err + } } if useShortOutput := o.OutputFormat == "name"; useShortOutput || len(o.OutputFormat) == 0 { - cmdutil.PrintSuccess(o.Mapper, useShortOutput, o.Out, "useridentitymapping", actualMapping.Name, "created") + created := "created" + if o.DryRun { + created = "created (DRY RUN)" + } + cmdutil.PrintSuccess(o.Mapper, useShortOutput, o.Out, "useridentitymapping", actualMapping.Name, created) return nil } From acddc5235e2aac68d94ac7c3520b1daf6e5a1515 Mon Sep 17 00:00:00 2001 From: juanvallejo Date: Tue, 11 Oct 2016 15:10:31 -0400 Subject: [PATCH 2/5] UPSTREAM: 34028: add --dry-run option to create root cmd --- .../kubernetes/pkg/kubectl/cmd/create.go | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/create.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/create.go index 891a6409e50c..e47734e88d3e 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/create.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/create.go @@ -72,11 +72,12 @@ func NewCmdCreate(f *cmdutil.Factory, out io.Writer) *cobra.Command { usage := "Filename, directory, or URL to file to use to create the resource" kubectl.AddJsonFilenameFlag(cmd, &options.Filenames, usage) cmd.MarkFlagRequired("filename") + cmdutil.AddPrinterFlags(cmd) cmdutil.AddValidateFlags(cmd) cmdutil.AddRecursiveFlag(cmd, &options.Recursive) - cmdutil.AddOutputFlagsForMutation(cmd) cmdutil.AddApplyAnnotationFlags(cmd) cmdutil.AddRecordFlag(cmd) + cmdutil.AddDryRunFlag(cmd) cmdutil.AddInclude3rdPartyFlags(cmd) // create subcommands @@ -124,6 +125,8 @@ func RunCreate(f *cmdutil.Factory, cmd *cobra.Command, out io.Writer, options *C return err } + dryRun := cmdutil.GetFlagBool(cmd, "dry-run") + count := 0 err = r.Visit(func(info *resource.Info, err error) error { if err != nil { @@ -139,8 +142,10 @@ func RunCreate(f *cmdutil.Factory, cmd *cobra.Command, out io.Writer, options *C } } - if err := createAndRefresh(info); err != nil { - return cmdutil.AddSourceToErr("creating", info.Source, err) + if !dryRun { + if err := createAndRefresh(info); err != nil { + return cmdutil.AddSourceToErr("creating", info.Source, err) + } } count++ @@ -148,7 +153,13 @@ func RunCreate(f *cmdutil.Factory, cmd *cobra.Command, out io.Writer, options *C if !shortOutput { f.PrintObjectSpecificMessage(info.Object, out) } - cmdutil.PrintSuccess(mapper, shortOutput, out, info.Mapping.Resource, info.Name, "created") + + created := "created" + if dryRun { + created = "created (DRY RUN)" + } + + cmdutil.PrintSuccess(mapper, shortOutput, out, info.Mapping.Resource, info.Name, created) return nil }) if err != nil { From d9d259ba72ce8575790d2b40f8bcbd67d8369a7b Mon Sep 17 00:00:00 2001 From: juanvallejo Date: Mon, 17 Oct 2016 10:04:11 -0400 Subject: [PATCH 3/5] UPSTREAM: 34028: add --dry-run option to apply kube cmd --- .../kubernetes/pkg/kubectl/cmd/apply.go | 58 ++++++++++++------- 1 file changed, 38 insertions(+), 20 deletions(-) diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/apply.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/apply.go index 45a46f14e3e1..e5dd21ee0616 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/apply.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/apply.go @@ -88,7 +88,8 @@ func NewCmdApply(f *cmdutil.Factory, out io.Writer) *cobra.Command { cmd.Flags().Bool("overwrite", true, "Automatically resolve conflicts between the modified and live configuration by using values from the modified configuration") cmdutil.AddValidateFlags(cmd) cmdutil.AddRecursiveFlag(cmd, &options.Recursive) - cmdutil.AddOutputFlagsForMutation(cmd) + cmdutil.AddDryRunFlag(cmd) + cmdutil.AddPrinterFlags(cmd) cmdutil.AddRecordFlag(cmd) cmdutil.AddInclude3rdPartyFlags(cmd) return cmd @@ -127,6 +128,8 @@ func RunApply(f *cmdutil.Factory, cmd *cobra.Command, out io.Writer, options *Ap return err } + dryRun := cmdutil.GetFlagBool(cmd, "dry-run") + encoder := f.JSONEncoder() decoder := f.Decoder(false) @@ -162,37 +165,52 @@ func RunApply(f *cmdutil.Factory, cmd *cobra.Command, out io.Writer, options *Ap } } - // Then create the resource and skip the three-way merge - if err := createAndRefresh(info); err != nil { - return cmdutil.AddSourceToErr("creating", info.Source, err) + if !dryRun { + // Then create the resource and skip the three-way merge + if err := createAndRefresh(info); err != nil { + return cmdutil.AddSourceToErr("creating", info.Source, err) + } } + + created := "created" + if dryRun { + created = "created (DRY RUN)" + } + count++ - cmdutil.PrintSuccess(mapper, shortOutput, out, info.Mapping.Resource, info.Name, "created") + cmdutil.PrintSuccess(mapper, shortOutput, out, info.Mapping.Resource, info.Name, created) return nil } - overwrite := cmdutil.GetFlagBool(cmd, "overwrite") - helper := resource.NewHelper(info.Client, info.Mapping) - patcher := NewPatcher(encoder, decoder, info.Mapping, helper, overwrite) + if !dryRun { + overwrite := cmdutil.GetFlagBool(cmd, "overwrite") + helper := resource.NewHelper(info.Client, info.Mapping) + patcher := NewPatcher(encoder, decoder, info.Mapping, helper, overwrite) - patchBytes, err := patcher.patch(info.Object, modified, info.Source, info.Namespace, info.Name) - if err != nil { - return cmdutil.AddSourceToErr(fmt.Sprintf("applying patch:\n%s\nto:\n%v\nfor:", patchBytes, info), info.Source, err) - } - - if cmdutil.ShouldRecord(cmd, info) { - patch, err := cmdutil.ChangeResourcePatch(info, f.Command()) + patchBytes, err := patcher.patch(info.Object, modified, info.Source, info.Namespace, info.Name) if err != nil { - return err + return cmdutil.AddSourceToErr(fmt.Sprintf("applying patch:\n%s\nto:\n%v\nfor:", patchBytes, info), info.Source, err) } - _, err = helper.Patch(info.Namespace, info.Name, api.StrategicMergePatchType, patch) - if err != nil { - return cmdutil.AddSourceToErr(fmt.Sprintf("applying patch:\n%s\nto:\n%v\nfor:", patch, info), info.Source, err) + + if cmdutil.ShouldRecord(cmd, info) { + patch, err := cmdutil.ChangeResourcePatch(info, f.Command()) + if err != nil { + return err + } + _, err = helper.Patch(info.Namespace, info.Name, api.StrategicMergePatchType, patch) + if err != nil { + return cmdutil.AddSourceToErr(fmt.Sprintf("applying patch:\n%s\nto:\n%v\nfor:", patch, info), info.Source, err) + } } } count++ - cmdutil.PrintSuccess(mapper, shortOutput, out, info.Mapping.Resource, info.Name, "configured") + + configured := "configured" + if dryRun { + configured = "configured (DRY RUN)" + } + cmdutil.PrintSuccess(mapper, shortOutput, out, info.Mapping.Resource, info.Name, configured) return nil }) From 2369eabec6e13ea03031db7ad9f85b2e45ba8c5e Mon Sep 17 00:00:00 2001 From: juanvallejo Date: Mon, 17 Oct 2016 10:19:34 -0400 Subject: [PATCH 4/5] use cmdutil DryRun flag helper --- pkg/cmd/cli/cmd/create/clusterquota.go | 4 +++- pkg/cmd/cli/cmd/create/deploymentconfig.go | 3 ++- pkg/cmd/cli/cmd/create/identity.go | 4 +++- pkg/cmd/cli/cmd/create/imagestream.go | 4 +++- pkg/cmd/cli/cmd/create/route.go | 6 +++--- pkg/cmd/cli/cmd/create/user.go | 4 +++- pkg/cmd/cli/cmd/create/user_identity_mapping.go | 4 +++- 7 files changed, 20 insertions(+), 9 deletions(-) diff --git a/pkg/cmd/cli/cmd/create/clusterquota.go b/pkg/cmd/cli/cmd/create/clusterquota.go index f70196761abf..9dc78efd9de5 100644 --- a/pkg/cmd/cli/cmd/create/clusterquota.go +++ b/pkg/cmd/cli/cmd/create/clusterquota.go @@ -62,7 +62,7 @@ func NewCmdCreateClusterQuota(name, fullName string, f *clientcmd.Factory, out i } cmdutil.AddPrinterFlags(cmd) - cmd.Flags().BoolVarP(&o.DryRun, "dry-run", "", false, "If true, only print the object that would be sent, without sending it.") + cmdutil.AddDryRunFlag(cmd) cmd.Flags().String("project-label-selector", "", "The project label selector for the cluster resource quota") cmd.Flags().String("project-annotation-selector", "", "The project annotation selector for the cluster resource quota") cmd.Flags().StringSlice("hard", []string{}, "The resource to constrain: RESOURCE=QUANTITY (pods=10)") @@ -74,6 +74,8 @@ func (o *CreateClusterQuotaOptions) Complete(cmd *cobra.Command, f *clientcmd.Fa return fmt.Errorf("NAME is required: %v", args) } + o.DryRun = cmdutil.GetFlagBool(cmd, "dry-run") + var labelSelector *unversioned.LabelSelector labelSelectorString := cmdutil.GetFlagString(cmd, "project-label-selector") if len(labelSelectorString) > 0 { diff --git a/pkg/cmd/cli/cmd/create/deploymentconfig.go b/pkg/cmd/cli/cmd/create/deploymentconfig.go index c17ccf7cbc48..f9d1e381b266 100644 --- a/pkg/cmd/cli/cmd/create/deploymentconfig.go +++ b/pkg/cmd/cli/cmd/create/deploymentconfig.go @@ -57,9 +57,9 @@ func NewCmdCreateDeploymentConfig(name, fullName string, f *clientcmd.Factory, o Aliases: []string{"dc"}, } - cmd.Flags().BoolVarP(&o.DryRun, "dry-run", "", false, "If true, only print the object that would be sent, without sending it.") cmd.Flags().String("image", "", "The image for the container to run.") cmd.MarkFlagRequired("image") + cmdutil.AddDryRunFlag(cmd) cmdutil.AddPrinterFlags(cmd) return cmd } @@ -76,6 +76,7 @@ func (o *CreateDeploymentConfigOptions) Complete(cmd *cobra.Command, f *clientcm labels := map[string]string{"deployment-config.name": args[0]} + o.DryRun = cmdutil.GetFlagBool(cmd, "dry-run") o.DC = &deployapi.DeploymentConfig{ ObjectMeta: kapi.ObjectMeta{Name: args[0]}, Spec: deployapi.DeploymentConfigSpec{ diff --git a/pkg/cmd/cli/cmd/create/identity.go b/pkg/cmd/cli/cmd/create/identity.go index 970dce983681..cf18ac296854 100644 --- a/pkg/cmd/cli/cmd/create/identity.go +++ b/pkg/cmd/cli/cmd/create/identity.go @@ -63,7 +63,7 @@ func NewCmdCreateIdentity(name, fullName string, f *clientcmd.Factory, out io.Wr }, } - cmd.Flags().BoolVarP(&o.DryRun, "dry-run", "", false, "If true, only print the object that would be sent, without sending it.") + cmdutil.AddDryRunFlag(cmd) cmdutil.AddPrinterFlags(cmd) return cmd } @@ -83,6 +83,8 @@ func (o *CreateIdentityOptions) Complete(cmd *cobra.Command, f *clientcmd.Factor return fmt.Errorf("exactly one argument (username) is supported, not: %v", args) } + o.DryRun = cmdutil.GetFlagBool(cmd, "dry-run") + client, _, err := f.Clients() if err != nil { return err diff --git a/pkg/cmd/cli/cmd/create/imagestream.go b/pkg/cmd/cli/cmd/create/imagestream.go index c6a2a5ed8a2d..107eb78db8dc 100644 --- a/pkg/cmd/cli/cmd/create/imagestream.go +++ b/pkg/cmd/cli/cmd/create/imagestream.go @@ -59,7 +59,7 @@ func NewCmdCreateImageStream(name, fullName string, f *clientcmd.Factory, out io } cmdutil.AddPrinterFlags(cmd) - cmd.Flags().BoolVarP(&o.DryRun, "dry-run", "", false, "If true, only print the object that would be sent, without sending it.") + cmdutil.AddDryRunFlag(cmd) return cmd } @@ -69,6 +69,8 @@ func (o *CreateImageStreamOptions) Complete(cmd *cobra.Command, f *clientcmd.Fac Spec: imageapi.ImageStreamSpec{}, } + o.DryRun = cmdutil.GetFlagBool(cmd, "dry-run") + switch len(args) { case 0: return fmt.Errorf("image stream name is required") diff --git a/pkg/cmd/cli/cmd/create/route.go b/pkg/cmd/cli/cmd/create/route.go index 3e3bda153a01..df6e28d08d6a 100644 --- a/pkg/cmd/cli/cmd/create/route.go +++ b/pkg/cmd/cli/cmd/create/route.go @@ -71,7 +71,7 @@ func NewCmdCreateEdgeRoute(fullName string, f *clientcmd.Factory, out io.Writer) kcmdutil.AddValidateFlags(cmd) kcmdutil.AddPrinterFlags(cmd) - cmd.Flags().Bool("dry-run", false, "If true, only print the route that would be created, without creating it.") + kcmdutil.AddDryRunFlag(cmd) cmd.Flags().String("hostname", "", "Set a hostname for the new route") cmd.Flags().String("port", "", "Name of the service port or number of the container port the route will route traffic to") cmd.Flags().String("insecure-policy", "", "Set an insecure policy for the new route") @@ -198,7 +198,7 @@ func NewCmdCreatePassthroughRoute(fullName string, f *clientcmd.Factory, out io. kcmdutil.AddValidateFlags(cmd) kcmdutil.AddPrinterFlags(cmd) - cmd.Flags().Bool("dry-run", false, "If true, only print the route that would be created, without creating it.") + kcmdutil.AddDryRunFlag(cmd) cmd.Flags().String("hostname", "", "Set a hostname for the new route") cmd.Flags().String("port", "", "Name of the service port or number of the container port the route will route traffic to") cmd.Flags().String("service", "", "Name of the service that the new route is exposing") @@ -297,7 +297,7 @@ func NewCmdCreateReencryptRoute(fullName string, f *clientcmd.Factory, out io.Wr kcmdutil.AddValidateFlags(cmd) kcmdutil.AddPrinterFlags(cmd) - cmd.Flags().Bool("dry-run", false, "If true, only print the route that would be created, without creating it.") + kcmdutil.AddDryRunFlag(cmd) cmd.Flags().String("hostname", "", "Set a hostname for the new route") cmd.Flags().String("port", "", "Name of the service port or number of the container port the route will route traffic to") cmd.Flags().String("service", "", "Name of the service that the new route is exposing") diff --git a/pkg/cmd/cli/cmd/create/user.go b/pkg/cmd/cli/cmd/create/user.go index cadb65719352..2ad65b293ca4 100644 --- a/pkg/cmd/cli/cmd/create/user.go +++ b/pkg/cmd/cli/cmd/create/user.go @@ -62,7 +62,7 @@ func NewCmdCreateUser(name, fullName string, f *clientcmd.Factory, out io.Writer }, } cmd.Flags().StringVar(&o.FullName, "full-name", o.FullName, "Display name of the user") - cmd.Flags().BoolVarP(&o.DryRun, "dry-run", "", false, "If true, only print the object that would be sent, without sending it.") + cmdutil.AddDryRunFlag(cmd) cmdutil.AddPrinterFlags(cmd) return cmd } @@ -77,6 +77,8 @@ func (o *CreateUserOptions) Complete(cmd *cobra.Command, f *clientcmd.Factory, a return fmt.Errorf("exactly one argument (username) is supported, not: %v", args) } + o.DryRun = cmdutil.GetFlagBool(cmd, "dry-run") + client, _, err := f.Clients() if err != nil { return err diff --git a/pkg/cmd/cli/cmd/create/user_identity_mapping.go b/pkg/cmd/cli/cmd/create/user_identity_mapping.go index af9114d84d4d..6044ecae2709 100644 --- a/pkg/cmd/cli/cmd/create/user_identity_mapping.go +++ b/pkg/cmd/cli/cmd/create/user_identity_mapping.go @@ -59,7 +59,7 @@ func NewCmdCreateUserIdentityMapping(name, fullName string, f *clientcmd.Factory }, } cmdutil.AddPrinterFlags(cmd) - cmd.Flags().BoolVarP(&o.DryRun, "dry-run", "", false, "If true, only print the object that would be sent, without sending it.") + cmdutil.AddDryRunFlag(cmd) return cmd } @@ -76,6 +76,8 @@ func (o *CreateUserIdentityMappingOptions) Complete(cmd *cobra.Command, f *clien return fmt.Errorf("exactly two arguments (identity and user name) are supported, not: %v", args) } + o.DryRun = cmdutil.GetFlagBool(cmd, "dry-run") + client, _, err := f.Clients() if err != nil { return err From 18d604e2bacbb57f1ac3e06a58075f1e09e4b155 Mon Sep 17 00:00:00 2001 From: juanvallejo Date: Mon, 17 Oct 2016 12:54:39 -0400 Subject: [PATCH 5/5] update docs --- contrib/completions/bash/oc | 142 ++++++++++++++ contrib/completions/bash/openshift | 176 ++++++++++++++++++ contrib/completions/zsh/oc | 142 ++++++++++++++ contrib/completions/zsh/openshift | 176 ++++++++++++++++++ docs/man/man1/oc-apply.1 | 34 +++- .../man/man1/oc-create-clusterresourcequota.1 | 34 +++- docs/man/man1/oc-create-deploymentconfig.1 | 34 +++- docs/man/man1/oc-create-identity.1 | 4 + docs/man/man1/oc-create-imagestream.1 | 34 +++- docs/man/man1/oc-create-route-edge.1 | 34 +++- docs/man/man1/oc-create-route-passthrough.1 | 34 +++- docs/man/man1/oc-create-route-reencrypt.1 | 34 +++- docs/man/man1/oc-create-user.1 | 4 + docs/man/man1/oc-create-useridentitymapping.1 | 4 + docs/man/man1/oc-create.1 | 34 +++- docs/man/man1/openshift-cli-apply.1 | 34 +++- ...penshift-cli-create-clusterresourcequota.1 | 34 +++- .../openshift-cli-create-deploymentconfig.1 | 34 +++- docs/man/man1/openshift-cli-create-identity.1 | 4 + .../man1/openshift-cli-create-imagestream.1 | 34 +++- .../man1/openshift-cli-create-route-edge.1 | 34 +++- .../openshift-cli-create-route-passthrough.1 | 34 +++- .../openshift-cli-create-route-reencrypt.1 | 34 +++- docs/man/man1/openshift-cli-create-user.1 | 4 + ...openshift-cli-create-useridentitymapping.1 | 4 + docs/man/man1/openshift-cli-create.1 | 34 +++- docs/man/man1/openshift-kube-apply.1 | 34 +++- docs/man/man1/openshift-kube-create.1 | 34 +++- 28 files changed, 1254 insertions(+), 18 deletions(-) diff --git a/contrib/completions/bash/oc b/contrib/completions/bash/oc index 7d99baa724f9..3d38f833061c 100644 --- a/contrib/completions/bash/oc +++ b/contrib/completions/bash/oc @@ -5024,6 +5024,8 @@ _oc_apply() flags_with_completion=() flags_completion=() + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") flags+=("--filename=") flags_with_completion+=("--filename") flags_completion+=("__handle_filename_extension_flag json|yaml|yml") @@ -5033,9 +5035,13 @@ _oc_apply() local_nonpersistent_flags+=("--filename=") flags+=("--include-extended-apis") local_nonpersistent_flags+=("--include-extended-apis") + flags+=("--no-headers") + local_nonpersistent_flags+=("--no-headers") flags+=("--output=") two_word_flags+=("-o") local_nonpersistent_flags+=("--output=") + flags+=("--output-version=") + local_nonpersistent_flags+=("--output-version=") flags+=("--overwrite") local_nonpersistent_flags+=("--overwrite") flags+=("--record") @@ -5047,6 +5053,17 @@ _oc_apply() flags_with_completion+=("--schema-cache-dir") flags_completion+=("_filedir") local_nonpersistent_flags+=("--schema-cache-dir=") + flags+=("--show-all") + flags+=("-a") + local_nonpersistent_flags+=("--show-all") + flags+=("--show-labels") + local_nonpersistent_flags+=("--show-labels") + flags+=("--sort-by=") + local_nonpersistent_flags+=("--sort-by=") + flags+=("--template=") + flags_with_completion+=("--template") + flags_completion+=("_filedir") + local_nonpersistent_flags+=("--template=") flags+=("--validate") local_nonpersistent_flags+=("--validate") flags+=("--as=") @@ -6164,15 +6181,32 @@ _oc_create_clusterresourcequota() flags_with_completion=() flags_completion=() + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") flags+=("--hard=") local_nonpersistent_flags+=("--hard=") + flags+=("--no-headers") + local_nonpersistent_flags+=("--no-headers") flags+=("--output=") two_word_flags+=("-o") local_nonpersistent_flags+=("--output=") + flags+=("--output-version=") + local_nonpersistent_flags+=("--output-version=") flags+=("--project-annotation-selector=") local_nonpersistent_flags+=("--project-annotation-selector=") flags+=("--project-label-selector=") local_nonpersistent_flags+=("--project-label-selector=") + flags+=("--show-all") + flags+=("-a") + local_nonpersistent_flags+=("--show-all") + flags+=("--show-labels") + local_nonpersistent_flags+=("--show-labels") + flags+=("--sort-by=") + local_nonpersistent_flags+=("--sort-by=") + flags+=("--template=") + flags_with_completion+=("--template") + flags_completion+=("_filedir") + local_nonpersistent_flags+=("--template=") flags+=("--as=") flags+=("--certificate-authority=") flags_with_completion+=("--certificate-authority") @@ -6366,11 +6400,28 @@ _oc_create_deploymentconfig() flags_with_completion=() flags_completion=() + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") flags+=("--image=") local_nonpersistent_flags+=("--image=") + flags+=("--no-headers") + local_nonpersistent_flags+=("--no-headers") flags+=("--output=") two_word_flags+=("-o") local_nonpersistent_flags+=("--output=") + flags+=("--output-version=") + local_nonpersistent_flags+=("--output-version=") + flags+=("--show-all") + flags+=("-a") + local_nonpersistent_flags+=("--show-all") + flags+=("--show-labels") + local_nonpersistent_flags+=("--show-labels") + flags+=("--sort-by=") + local_nonpersistent_flags+=("--sort-by=") + flags+=("--template=") + flags_with_completion+=("--template") + flags_completion+=("_filedir") + local_nonpersistent_flags+=("--template=") flags+=("--as=") flags+=("--certificate-authority=") flags_with_completion+=("--certificate-authority") @@ -6414,6 +6465,8 @@ _oc_create_identity() flags_with_completion=() flags_completion=() + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") flags+=("--no-headers") local_nonpersistent_flags+=("--no-headers") flags+=("--output=") @@ -6474,9 +6527,26 @@ _oc_create_imagestream() flags_with_completion=() flags_completion=() + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") + flags+=("--no-headers") + local_nonpersistent_flags+=("--no-headers") flags+=("--output=") two_word_flags+=("-o") local_nonpersistent_flags+=("--output=") + flags+=("--output-version=") + local_nonpersistent_flags+=("--output-version=") + flags+=("--show-all") + flags+=("-a") + local_nonpersistent_flags+=("--show-all") + flags+=("--show-labels") + local_nonpersistent_flags+=("--show-labels") + flags+=("--sort-by=") + local_nonpersistent_flags+=("--sort-by=") + flags+=("--template=") + flags_with_completion+=("--template") + flags_completion+=("_filedir") + local_nonpersistent_flags+=("--template=") flags+=("--as=") flags+=("--certificate-authority=") flags_with_completion+=("--certificate-authority") @@ -6720,6 +6790,8 @@ _oc_create_route_edge() flags_with_completion+=("--cert") flags_completion+=("_filedir") local_nonpersistent_flags+=("--cert=") + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") flags+=("--hostname=") local_nonpersistent_flags+=("--hostname=") flags+=("--insecure-policy=") @@ -6728,9 +6800,13 @@ _oc_create_route_edge() flags_with_completion+=("--key") flags_completion+=("_filedir") local_nonpersistent_flags+=("--key=") + flags+=("--no-headers") + local_nonpersistent_flags+=("--no-headers") flags+=("--output=") two_word_flags+=("-o") local_nonpersistent_flags+=("--output=") + flags+=("--output-version=") + local_nonpersistent_flags+=("--output-version=") flags+=("--path=") local_nonpersistent_flags+=("--path=") flags+=("--port=") @@ -6741,6 +6817,17 @@ _oc_create_route_edge() local_nonpersistent_flags+=("--schema-cache-dir=") flags+=("--service=") local_nonpersistent_flags+=("--service=") + flags+=("--show-all") + flags+=("-a") + local_nonpersistent_flags+=("--show-all") + flags+=("--show-labels") + local_nonpersistent_flags+=("--show-labels") + flags+=("--sort-by=") + local_nonpersistent_flags+=("--sort-by=") + flags+=("--template=") + flags_with_completion+=("--template") + flags_completion+=("_filedir") + local_nonpersistent_flags+=("--template=") flags+=("--validate") local_nonpersistent_flags+=("--validate") flags+=("--as=") @@ -6786,11 +6873,17 @@ _oc_create_route_passthrough() flags_with_completion=() flags_completion=() + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") flags+=("--hostname=") local_nonpersistent_flags+=("--hostname=") + flags+=("--no-headers") + local_nonpersistent_flags+=("--no-headers") flags+=("--output=") two_word_flags+=("-o") local_nonpersistent_flags+=("--output=") + flags+=("--output-version=") + local_nonpersistent_flags+=("--output-version=") flags+=("--port=") local_nonpersistent_flags+=("--port=") flags+=("--schema-cache-dir=") @@ -6799,6 +6892,17 @@ _oc_create_route_passthrough() local_nonpersistent_flags+=("--schema-cache-dir=") flags+=("--service=") local_nonpersistent_flags+=("--service=") + flags+=("--show-all") + flags+=("-a") + local_nonpersistent_flags+=("--show-all") + flags+=("--show-labels") + local_nonpersistent_flags+=("--show-labels") + flags+=("--sort-by=") + local_nonpersistent_flags+=("--sort-by=") + flags+=("--template=") + flags_with_completion+=("--template") + flags_completion+=("_filedir") + local_nonpersistent_flags+=("--template=") flags+=("--validate") local_nonpersistent_flags+=("--validate") flags+=("--as=") @@ -6856,15 +6960,21 @@ _oc_create_route_reencrypt() flags_with_completion+=("--dest-ca-cert") flags_completion+=("_filedir") local_nonpersistent_flags+=("--dest-ca-cert=") + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") flags+=("--hostname=") local_nonpersistent_flags+=("--hostname=") flags+=("--key=") flags_with_completion+=("--key") flags_completion+=("_filedir") local_nonpersistent_flags+=("--key=") + flags+=("--no-headers") + local_nonpersistent_flags+=("--no-headers") flags+=("--output=") two_word_flags+=("-o") local_nonpersistent_flags+=("--output=") + flags+=("--output-version=") + local_nonpersistent_flags+=("--output-version=") flags+=("--path=") local_nonpersistent_flags+=("--path=") flags+=("--port=") @@ -6875,6 +6985,17 @@ _oc_create_route_reencrypt() local_nonpersistent_flags+=("--schema-cache-dir=") flags+=("--service=") local_nonpersistent_flags+=("--service=") + flags+=("--show-all") + flags+=("-a") + local_nonpersistent_flags+=("--show-all") + flags+=("--show-labels") + local_nonpersistent_flags+=("--show-labels") + flags+=("--sort-by=") + local_nonpersistent_flags+=("--sort-by=") + flags+=("--template=") + flags_with_completion+=("--template") + flags_completion+=("_filedir") + local_nonpersistent_flags+=("--template=") flags+=("--validate") local_nonpersistent_flags+=("--validate") flags+=("--as=") @@ -7593,6 +7714,8 @@ _oc_create_user() flags_with_completion=() flags_completion=() + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") flags+=("--full-name=") local_nonpersistent_flags+=("--full-name=") flags+=("--no-headers") @@ -7655,6 +7778,8 @@ _oc_create_useridentitymapping() flags_with_completion=() flags_completion=() + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") flags+=("--no-headers") local_nonpersistent_flags+=("--no-headers") flags+=("--output=") @@ -7730,6 +7855,8 @@ _oc_create() flags_with_completion=() flags_completion=() + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") flags+=("--filename=") flags_with_completion+=("--filename") flags_completion+=("__handle_filename_extension_flag json|yaml|yml") @@ -7739,9 +7866,13 @@ _oc_create() local_nonpersistent_flags+=("--filename=") flags+=("--include-extended-apis") local_nonpersistent_flags+=("--include-extended-apis") + flags+=("--no-headers") + local_nonpersistent_flags+=("--no-headers") flags+=("--output=") two_word_flags+=("-o") local_nonpersistent_flags+=("--output=") + flags+=("--output-version=") + local_nonpersistent_flags+=("--output-version=") flags+=("--record") local_nonpersistent_flags+=("--record") flags+=("--recursive") @@ -7753,6 +7884,17 @@ _oc_create() flags_with_completion+=("--schema-cache-dir") flags_completion+=("_filedir") local_nonpersistent_flags+=("--schema-cache-dir=") + flags+=("--show-all") + flags+=("-a") + local_nonpersistent_flags+=("--show-all") + flags+=("--show-labels") + local_nonpersistent_flags+=("--show-labels") + flags+=("--sort-by=") + local_nonpersistent_flags+=("--sort-by=") + flags+=("--template=") + flags_with_completion+=("--template") + flags_completion+=("_filedir") + local_nonpersistent_flags+=("--template=") flags+=("--validate") local_nonpersistent_flags+=("--validate") flags+=("--as=") diff --git a/contrib/completions/bash/openshift b/contrib/completions/bash/openshift index a1e8f181bcca..d1ec13adb0c1 100644 --- a/contrib/completions/bash/openshift +++ b/contrib/completions/bash/openshift @@ -9492,6 +9492,8 @@ _openshift_cli_apply() flags_with_completion=() flags_completion=() + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") flags+=("--filename=") flags_with_completion+=("--filename") flags_completion+=("__handle_filename_extension_flag json|yaml|yml") @@ -9501,9 +9503,13 @@ _openshift_cli_apply() local_nonpersistent_flags+=("--filename=") flags+=("--include-extended-apis") local_nonpersistent_flags+=("--include-extended-apis") + flags+=("--no-headers") + local_nonpersistent_flags+=("--no-headers") flags+=("--output=") two_word_flags+=("-o") local_nonpersistent_flags+=("--output=") + flags+=("--output-version=") + local_nonpersistent_flags+=("--output-version=") flags+=("--overwrite") local_nonpersistent_flags+=("--overwrite") flags+=("--record") @@ -9515,6 +9521,17 @@ _openshift_cli_apply() flags_with_completion+=("--schema-cache-dir") flags_completion+=("_filedir") local_nonpersistent_flags+=("--schema-cache-dir=") + flags+=("--show-all") + flags+=("-a") + local_nonpersistent_flags+=("--show-all") + flags+=("--show-labels") + local_nonpersistent_flags+=("--show-labels") + flags+=("--sort-by=") + local_nonpersistent_flags+=("--sort-by=") + flags+=("--template=") + flags_with_completion+=("--template") + flags_completion+=("_filedir") + local_nonpersistent_flags+=("--template=") flags+=("--validate") local_nonpersistent_flags+=("--validate") flags+=("--as=") @@ -10654,15 +10671,32 @@ _openshift_cli_create_clusterresourcequota() flags_with_completion=() flags_completion=() + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") flags+=("--hard=") local_nonpersistent_flags+=("--hard=") + flags+=("--no-headers") + local_nonpersistent_flags+=("--no-headers") flags+=("--output=") two_word_flags+=("-o") local_nonpersistent_flags+=("--output=") + flags+=("--output-version=") + local_nonpersistent_flags+=("--output-version=") flags+=("--project-annotation-selector=") local_nonpersistent_flags+=("--project-annotation-selector=") flags+=("--project-label-selector=") local_nonpersistent_flags+=("--project-label-selector=") + flags+=("--show-all") + flags+=("-a") + local_nonpersistent_flags+=("--show-all") + flags+=("--show-labels") + local_nonpersistent_flags+=("--show-labels") + flags+=("--sort-by=") + local_nonpersistent_flags+=("--sort-by=") + flags+=("--template=") + flags_with_completion+=("--template") + flags_completion+=("_filedir") + local_nonpersistent_flags+=("--template=") flags+=("--as=") flags+=("--certificate-authority=") flags_with_completion+=("--certificate-authority") @@ -10859,11 +10893,28 @@ _openshift_cli_create_deploymentconfig() flags_with_completion=() flags_completion=() + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") flags+=("--image=") local_nonpersistent_flags+=("--image=") + flags+=("--no-headers") + local_nonpersistent_flags+=("--no-headers") flags+=("--output=") two_word_flags+=("-o") local_nonpersistent_flags+=("--output=") + flags+=("--output-version=") + local_nonpersistent_flags+=("--output-version=") + flags+=("--show-all") + flags+=("-a") + local_nonpersistent_flags+=("--show-all") + flags+=("--show-labels") + local_nonpersistent_flags+=("--show-labels") + flags+=("--sort-by=") + local_nonpersistent_flags+=("--sort-by=") + flags+=("--template=") + flags_with_completion+=("--template") + flags_completion+=("_filedir") + local_nonpersistent_flags+=("--template=") flags+=("--as=") flags+=("--certificate-authority=") flags_with_completion+=("--certificate-authority") @@ -10908,6 +10959,8 @@ _openshift_cli_create_identity() flags_with_completion=() flags_completion=() + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") flags+=("--no-headers") local_nonpersistent_flags+=("--no-headers") flags+=("--output=") @@ -10969,9 +11022,26 @@ _openshift_cli_create_imagestream() flags_with_completion=() flags_completion=() + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") + flags+=("--no-headers") + local_nonpersistent_flags+=("--no-headers") flags+=("--output=") two_word_flags+=("-o") local_nonpersistent_flags+=("--output=") + flags+=("--output-version=") + local_nonpersistent_flags+=("--output-version=") + flags+=("--show-all") + flags+=("-a") + local_nonpersistent_flags+=("--show-all") + flags+=("--show-labels") + local_nonpersistent_flags+=("--show-labels") + flags+=("--sort-by=") + local_nonpersistent_flags+=("--sort-by=") + flags+=("--template=") + flags_with_completion+=("--template") + flags_completion+=("_filedir") + local_nonpersistent_flags+=("--template=") flags+=("--as=") flags+=("--certificate-authority=") flags_with_completion+=("--certificate-authority") @@ -11219,6 +11289,8 @@ _openshift_cli_create_route_edge() flags_with_completion+=("--cert") flags_completion+=("_filedir") local_nonpersistent_flags+=("--cert=") + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") flags+=("--hostname=") local_nonpersistent_flags+=("--hostname=") flags+=("--insecure-policy=") @@ -11227,9 +11299,13 @@ _openshift_cli_create_route_edge() flags_with_completion+=("--key") flags_completion+=("_filedir") local_nonpersistent_flags+=("--key=") + flags+=("--no-headers") + local_nonpersistent_flags+=("--no-headers") flags+=("--output=") two_word_flags+=("-o") local_nonpersistent_flags+=("--output=") + flags+=("--output-version=") + local_nonpersistent_flags+=("--output-version=") flags+=("--path=") local_nonpersistent_flags+=("--path=") flags+=("--port=") @@ -11240,6 +11316,17 @@ _openshift_cli_create_route_edge() local_nonpersistent_flags+=("--schema-cache-dir=") flags+=("--service=") local_nonpersistent_flags+=("--service=") + flags+=("--show-all") + flags+=("-a") + local_nonpersistent_flags+=("--show-all") + flags+=("--show-labels") + local_nonpersistent_flags+=("--show-labels") + flags+=("--sort-by=") + local_nonpersistent_flags+=("--sort-by=") + flags+=("--template=") + flags_with_completion+=("--template") + flags_completion+=("_filedir") + local_nonpersistent_flags+=("--template=") flags+=("--validate") local_nonpersistent_flags+=("--validate") flags+=("--as=") @@ -11286,11 +11373,17 @@ _openshift_cli_create_route_passthrough() flags_with_completion=() flags_completion=() + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") flags+=("--hostname=") local_nonpersistent_flags+=("--hostname=") + flags+=("--no-headers") + local_nonpersistent_flags+=("--no-headers") flags+=("--output=") two_word_flags+=("-o") local_nonpersistent_flags+=("--output=") + flags+=("--output-version=") + local_nonpersistent_flags+=("--output-version=") flags+=("--port=") local_nonpersistent_flags+=("--port=") flags+=("--schema-cache-dir=") @@ -11299,6 +11392,17 @@ _openshift_cli_create_route_passthrough() local_nonpersistent_flags+=("--schema-cache-dir=") flags+=("--service=") local_nonpersistent_flags+=("--service=") + flags+=("--show-all") + flags+=("-a") + local_nonpersistent_flags+=("--show-all") + flags+=("--show-labels") + local_nonpersistent_flags+=("--show-labels") + flags+=("--sort-by=") + local_nonpersistent_flags+=("--sort-by=") + flags+=("--template=") + flags_with_completion+=("--template") + flags_completion+=("_filedir") + local_nonpersistent_flags+=("--template=") flags+=("--validate") local_nonpersistent_flags+=("--validate") flags+=("--as=") @@ -11357,15 +11461,21 @@ _openshift_cli_create_route_reencrypt() flags_with_completion+=("--dest-ca-cert") flags_completion+=("_filedir") local_nonpersistent_flags+=("--dest-ca-cert=") + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") flags+=("--hostname=") local_nonpersistent_flags+=("--hostname=") flags+=("--key=") flags_with_completion+=("--key") flags_completion+=("_filedir") local_nonpersistent_flags+=("--key=") + flags+=("--no-headers") + local_nonpersistent_flags+=("--no-headers") flags+=("--output=") two_word_flags+=("-o") local_nonpersistent_flags+=("--output=") + flags+=("--output-version=") + local_nonpersistent_flags+=("--output-version=") flags+=("--path=") local_nonpersistent_flags+=("--path=") flags+=("--port=") @@ -11376,6 +11486,17 @@ _openshift_cli_create_route_reencrypt() local_nonpersistent_flags+=("--schema-cache-dir=") flags+=("--service=") local_nonpersistent_flags+=("--service=") + flags+=("--show-all") + flags+=("-a") + local_nonpersistent_flags+=("--show-all") + flags+=("--show-labels") + local_nonpersistent_flags+=("--show-labels") + flags+=("--sort-by=") + local_nonpersistent_flags+=("--sort-by=") + flags+=("--template=") + flags_with_completion+=("--template") + flags_completion+=("_filedir") + local_nonpersistent_flags+=("--template=") flags+=("--validate") local_nonpersistent_flags+=("--validate") flags+=("--as=") @@ -12105,6 +12226,8 @@ _openshift_cli_create_user() flags_with_completion=() flags_completion=() + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") flags+=("--full-name=") local_nonpersistent_flags+=("--full-name=") flags+=("--no-headers") @@ -12168,6 +12291,8 @@ _openshift_cli_create_useridentitymapping() flags_with_completion=() flags_completion=() + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") flags+=("--no-headers") local_nonpersistent_flags+=("--no-headers") flags+=("--output=") @@ -12244,6 +12369,8 @@ _openshift_cli_create() flags_with_completion=() flags_completion=() + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") flags+=("--filename=") flags_with_completion+=("--filename") flags_completion+=("__handle_filename_extension_flag json|yaml|yml") @@ -12253,9 +12380,13 @@ _openshift_cli_create() local_nonpersistent_flags+=("--filename=") flags+=("--include-extended-apis") local_nonpersistent_flags+=("--include-extended-apis") + flags+=("--no-headers") + local_nonpersistent_flags+=("--no-headers") flags+=("--output=") two_word_flags+=("-o") local_nonpersistent_flags+=("--output=") + flags+=("--output-version=") + local_nonpersistent_flags+=("--output-version=") flags+=("--record") local_nonpersistent_flags+=("--record") flags+=("--recursive") @@ -12267,6 +12398,17 @@ _openshift_cli_create() flags_with_completion+=("--schema-cache-dir") flags_completion+=("_filedir") local_nonpersistent_flags+=("--schema-cache-dir=") + flags+=("--show-all") + flags+=("-a") + local_nonpersistent_flags+=("--show-all") + flags+=("--show-labels") + local_nonpersistent_flags+=("--show-labels") + flags+=("--sort-by=") + local_nonpersistent_flags+=("--sort-by=") + flags+=("--template=") + flags_with_completion+=("--template") + flags_completion+=("_filedir") + local_nonpersistent_flags+=("--template=") flags+=("--validate") local_nonpersistent_flags+=("--validate") flags+=("--as=") @@ -19696,6 +19838,8 @@ _openshift_kube_apply() flags_with_completion=() flags_completion=() + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") flags+=("--filename=") flags_with_completion+=("--filename") flags_completion+=("__handle_filename_extension_flag json|yaml|yml") @@ -19705,9 +19849,13 @@ _openshift_kube_apply() local_nonpersistent_flags+=("--filename=") flags+=("--include-extended-apis") local_nonpersistent_flags+=("--include-extended-apis") + flags+=("--no-headers") + local_nonpersistent_flags+=("--no-headers") flags+=("--output=") two_word_flags+=("-o") local_nonpersistent_flags+=("--output=") + flags+=("--output-version=") + local_nonpersistent_flags+=("--output-version=") flags+=("--overwrite") local_nonpersistent_flags+=("--overwrite") flags+=("--record") @@ -19719,6 +19867,17 @@ _openshift_kube_apply() flags_with_completion+=("--schema-cache-dir") flags_completion+=("_filedir") local_nonpersistent_flags+=("--schema-cache-dir=") + flags+=("--show-all") + flags+=("-a") + local_nonpersistent_flags+=("--show-all") + flags+=("--show-labels") + local_nonpersistent_flags+=("--show-labels") + flags+=("--sort-by=") + local_nonpersistent_flags+=("--sort-by=") + flags+=("--template=") + flags_with_completion+=("--template") + flags_completion+=("_filedir") + local_nonpersistent_flags+=("--template=") flags+=("--validate") local_nonpersistent_flags+=("--validate") flags+=("--allow-verification-with-non-compliant-keys") @@ -23115,6 +23274,8 @@ _openshift_kube_create() flags_with_completion=() flags_completion=() + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") flags+=("--filename=") flags_with_completion+=("--filename") flags_completion+=("__handle_filename_extension_flag json|yaml|yml") @@ -23124,9 +23285,13 @@ _openshift_kube_create() local_nonpersistent_flags+=("--filename=") flags+=("--include-extended-apis") local_nonpersistent_flags+=("--include-extended-apis") + flags+=("--no-headers") + local_nonpersistent_flags+=("--no-headers") flags+=("--output=") two_word_flags+=("-o") local_nonpersistent_flags+=("--output=") + flags+=("--output-version=") + local_nonpersistent_flags+=("--output-version=") flags+=("--record") local_nonpersistent_flags+=("--record") flags+=("--recursive") @@ -23138,6 +23303,17 @@ _openshift_kube_create() flags_with_completion+=("--schema-cache-dir") flags_completion+=("_filedir") local_nonpersistent_flags+=("--schema-cache-dir=") + flags+=("--show-all") + flags+=("-a") + local_nonpersistent_flags+=("--show-all") + flags+=("--show-labels") + local_nonpersistent_flags+=("--show-labels") + flags+=("--sort-by=") + local_nonpersistent_flags+=("--sort-by=") + flags+=("--template=") + flags_with_completion+=("--template") + flags_completion+=("_filedir") + local_nonpersistent_flags+=("--template=") flags+=("--validate") local_nonpersistent_flags+=("--validate") flags+=("--allow-verification-with-non-compliant-keys") diff --git a/contrib/completions/zsh/oc b/contrib/completions/zsh/oc index b40fe4302119..5eefdc61d2da 100644 --- a/contrib/completions/zsh/oc +++ b/contrib/completions/zsh/oc @@ -5185,6 +5185,8 @@ _oc_apply() flags_with_completion=() flags_completion=() + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") flags+=("--filename=") flags_with_completion+=("--filename") flags_completion+=("__handle_filename_extension_flag json|yaml|yml") @@ -5194,9 +5196,13 @@ _oc_apply() local_nonpersistent_flags+=("--filename=") flags+=("--include-extended-apis") local_nonpersistent_flags+=("--include-extended-apis") + flags+=("--no-headers") + local_nonpersistent_flags+=("--no-headers") flags+=("--output=") two_word_flags+=("-o") local_nonpersistent_flags+=("--output=") + flags+=("--output-version=") + local_nonpersistent_flags+=("--output-version=") flags+=("--overwrite") local_nonpersistent_flags+=("--overwrite") flags+=("--record") @@ -5208,6 +5214,17 @@ _oc_apply() flags_with_completion+=("--schema-cache-dir") flags_completion+=("_filedir") local_nonpersistent_flags+=("--schema-cache-dir=") + flags+=("--show-all") + flags+=("-a") + local_nonpersistent_flags+=("--show-all") + flags+=("--show-labels") + local_nonpersistent_flags+=("--show-labels") + flags+=("--sort-by=") + local_nonpersistent_flags+=("--sort-by=") + flags+=("--template=") + flags_with_completion+=("--template") + flags_completion+=("_filedir") + local_nonpersistent_flags+=("--template=") flags+=("--validate") local_nonpersistent_flags+=("--validate") flags+=("--as=") @@ -6325,15 +6342,32 @@ _oc_create_clusterresourcequota() flags_with_completion=() flags_completion=() + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") flags+=("--hard=") local_nonpersistent_flags+=("--hard=") + flags+=("--no-headers") + local_nonpersistent_flags+=("--no-headers") flags+=("--output=") two_word_flags+=("-o") local_nonpersistent_flags+=("--output=") + flags+=("--output-version=") + local_nonpersistent_flags+=("--output-version=") flags+=("--project-annotation-selector=") local_nonpersistent_flags+=("--project-annotation-selector=") flags+=("--project-label-selector=") local_nonpersistent_flags+=("--project-label-selector=") + flags+=("--show-all") + flags+=("-a") + local_nonpersistent_flags+=("--show-all") + flags+=("--show-labels") + local_nonpersistent_flags+=("--show-labels") + flags+=("--sort-by=") + local_nonpersistent_flags+=("--sort-by=") + flags+=("--template=") + flags_with_completion+=("--template") + flags_completion+=("_filedir") + local_nonpersistent_flags+=("--template=") flags+=("--as=") flags+=("--certificate-authority=") flags_with_completion+=("--certificate-authority") @@ -6527,11 +6561,28 @@ _oc_create_deploymentconfig() flags_with_completion=() flags_completion=() + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") flags+=("--image=") local_nonpersistent_flags+=("--image=") + flags+=("--no-headers") + local_nonpersistent_flags+=("--no-headers") flags+=("--output=") two_word_flags+=("-o") local_nonpersistent_flags+=("--output=") + flags+=("--output-version=") + local_nonpersistent_flags+=("--output-version=") + flags+=("--show-all") + flags+=("-a") + local_nonpersistent_flags+=("--show-all") + flags+=("--show-labels") + local_nonpersistent_flags+=("--show-labels") + flags+=("--sort-by=") + local_nonpersistent_flags+=("--sort-by=") + flags+=("--template=") + flags_with_completion+=("--template") + flags_completion+=("_filedir") + local_nonpersistent_flags+=("--template=") flags+=("--as=") flags+=("--certificate-authority=") flags_with_completion+=("--certificate-authority") @@ -6575,6 +6626,8 @@ _oc_create_identity() flags_with_completion=() flags_completion=() + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") flags+=("--no-headers") local_nonpersistent_flags+=("--no-headers") flags+=("--output=") @@ -6635,9 +6688,26 @@ _oc_create_imagestream() flags_with_completion=() flags_completion=() + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") + flags+=("--no-headers") + local_nonpersistent_flags+=("--no-headers") flags+=("--output=") two_word_flags+=("-o") local_nonpersistent_flags+=("--output=") + flags+=("--output-version=") + local_nonpersistent_flags+=("--output-version=") + flags+=("--show-all") + flags+=("-a") + local_nonpersistent_flags+=("--show-all") + flags+=("--show-labels") + local_nonpersistent_flags+=("--show-labels") + flags+=("--sort-by=") + local_nonpersistent_flags+=("--sort-by=") + flags+=("--template=") + flags_with_completion+=("--template") + flags_completion+=("_filedir") + local_nonpersistent_flags+=("--template=") flags+=("--as=") flags+=("--certificate-authority=") flags_with_completion+=("--certificate-authority") @@ -6881,6 +6951,8 @@ _oc_create_route_edge() flags_with_completion+=("--cert") flags_completion+=("_filedir") local_nonpersistent_flags+=("--cert=") + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") flags+=("--hostname=") local_nonpersistent_flags+=("--hostname=") flags+=("--insecure-policy=") @@ -6889,9 +6961,13 @@ _oc_create_route_edge() flags_with_completion+=("--key") flags_completion+=("_filedir") local_nonpersistent_flags+=("--key=") + flags+=("--no-headers") + local_nonpersistent_flags+=("--no-headers") flags+=("--output=") two_word_flags+=("-o") local_nonpersistent_flags+=("--output=") + flags+=("--output-version=") + local_nonpersistent_flags+=("--output-version=") flags+=("--path=") local_nonpersistent_flags+=("--path=") flags+=("--port=") @@ -6902,6 +6978,17 @@ _oc_create_route_edge() local_nonpersistent_flags+=("--schema-cache-dir=") flags+=("--service=") local_nonpersistent_flags+=("--service=") + flags+=("--show-all") + flags+=("-a") + local_nonpersistent_flags+=("--show-all") + flags+=("--show-labels") + local_nonpersistent_flags+=("--show-labels") + flags+=("--sort-by=") + local_nonpersistent_flags+=("--sort-by=") + flags+=("--template=") + flags_with_completion+=("--template") + flags_completion+=("_filedir") + local_nonpersistent_flags+=("--template=") flags+=("--validate") local_nonpersistent_flags+=("--validate") flags+=("--as=") @@ -6947,11 +7034,17 @@ _oc_create_route_passthrough() flags_with_completion=() flags_completion=() + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") flags+=("--hostname=") local_nonpersistent_flags+=("--hostname=") + flags+=("--no-headers") + local_nonpersistent_flags+=("--no-headers") flags+=("--output=") two_word_flags+=("-o") local_nonpersistent_flags+=("--output=") + flags+=("--output-version=") + local_nonpersistent_flags+=("--output-version=") flags+=("--port=") local_nonpersistent_flags+=("--port=") flags+=("--schema-cache-dir=") @@ -6960,6 +7053,17 @@ _oc_create_route_passthrough() local_nonpersistent_flags+=("--schema-cache-dir=") flags+=("--service=") local_nonpersistent_flags+=("--service=") + flags+=("--show-all") + flags+=("-a") + local_nonpersistent_flags+=("--show-all") + flags+=("--show-labels") + local_nonpersistent_flags+=("--show-labels") + flags+=("--sort-by=") + local_nonpersistent_flags+=("--sort-by=") + flags+=("--template=") + flags_with_completion+=("--template") + flags_completion+=("_filedir") + local_nonpersistent_flags+=("--template=") flags+=("--validate") local_nonpersistent_flags+=("--validate") flags+=("--as=") @@ -7017,15 +7121,21 @@ _oc_create_route_reencrypt() flags_with_completion+=("--dest-ca-cert") flags_completion+=("_filedir") local_nonpersistent_flags+=("--dest-ca-cert=") + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") flags+=("--hostname=") local_nonpersistent_flags+=("--hostname=") flags+=("--key=") flags_with_completion+=("--key") flags_completion+=("_filedir") local_nonpersistent_flags+=("--key=") + flags+=("--no-headers") + local_nonpersistent_flags+=("--no-headers") flags+=("--output=") two_word_flags+=("-o") local_nonpersistent_flags+=("--output=") + flags+=("--output-version=") + local_nonpersistent_flags+=("--output-version=") flags+=("--path=") local_nonpersistent_flags+=("--path=") flags+=("--port=") @@ -7036,6 +7146,17 @@ _oc_create_route_reencrypt() local_nonpersistent_flags+=("--schema-cache-dir=") flags+=("--service=") local_nonpersistent_flags+=("--service=") + flags+=("--show-all") + flags+=("-a") + local_nonpersistent_flags+=("--show-all") + flags+=("--show-labels") + local_nonpersistent_flags+=("--show-labels") + flags+=("--sort-by=") + local_nonpersistent_flags+=("--sort-by=") + flags+=("--template=") + flags_with_completion+=("--template") + flags_completion+=("_filedir") + local_nonpersistent_flags+=("--template=") flags+=("--validate") local_nonpersistent_flags+=("--validate") flags+=("--as=") @@ -7754,6 +7875,8 @@ _oc_create_user() flags_with_completion=() flags_completion=() + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") flags+=("--full-name=") local_nonpersistent_flags+=("--full-name=") flags+=("--no-headers") @@ -7816,6 +7939,8 @@ _oc_create_useridentitymapping() flags_with_completion=() flags_completion=() + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") flags+=("--no-headers") local_nonpersistent_flags+=("--no-headers") flags+=("--output=") @@ -7891,6 +8016,8 @@ _oc_create() flags_with_completion=() flags_completion=() + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") flags+=("--filename=") flags_with_completion+=("--filename") flags_completion+=("__handle_filename_extension_flag json|yaml|yml") @@ -7900,9 +8027,13 @@ _oc_create() local_nonpersistent_flags+=("--filename=") flags+=("--include-extended-apis") local_nonpersistent_flags+=("--include-extended-apis") + flags+=("--no-headers") + local_nonpersistent_flags+=("--no-headers") flags+=("--output=") two_word_flags+=("-o") local_nonpersistent_flags+=("--output=") + flags+=("--output-version=") + local_nonpersistent_flags+=("--output-version=") flags+=("--record") local_nonpersistent_flags+=("--record") flags+=("--recursive") @@ -7914,6 +8045,17 @@ _oc_create() flags_with_completion+=("--schema-cache-dir") flags_completion+=("_filedir") local_nonpersistent_flags+=("--schema-cache-dir=") + flags+=("--show-all") + flags+=("-a") + local_nonpersistent_flags+=("--show-all") + flags+=("--show-labels") + local_nonpersistent_flags+=("--show-labels") + flags+=("--sort-by=") + local_nonpersistent_flags+=("--sort-by=") + flags+=("--template=") + flags_with_completion+=("--template") + flags_completion+=("_filedir") + local_nonpersistent_flags+=("--template=") flags+=("--validate") local_nonpersistent_flags+=("--validate") flags+=("--as=") diff --git a/contrib/completions/zsh/openshift b/contrib/completions/zsh/openshift index 42ed86720585..0922a1aaa1e0 100644 --- a/contrib/completions/zsh/openshift +++ b/contrib/completions/zsh/openshift @@ -9653,6 +9653,8 @@ _openshift_cli_apply() flags_with_completion=() flags_completion=() + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") flags+=("--filename=") flags_with_completion+=("--filename") flags_completion+=("__handle_filename_extension_flag json|yaml|yml") @@ -9662,9 +9664,13 @@ _openshift_cli_apply() local_nonpersistent_flags+=("--filename=") flags+=("--include-extended-apis") local_nonpersistent_flags+=("--include-extended-apis") + flags+=("--no-headers") + local_nonpersistent_flags+=("--no-headers") flags+=("--output=") two_word_flags+=("-o") local_nonpersistent_flags+=("--output=") + flags+=("--output-version=") + local_nonpersistent_flags+=("--output-version=") flags+=("--overwrite") local_nonpersistent_flags+=("--overwrite") flags+=("--record") @@ -9676,6 +9682,17 @@ _openshift_cli_apply() flags_with_completion+=("--schema-cache-dir") flags_completion+=("_filedir") local_nonpersistent_flags+=("--schema-cache-dir=") + flags+=("--show-all") + flags+=("-a") + local_nonpersistent_flags+=("--show-all") + flags+=("--show-labels") + local_nonpersistent_flags+=("--show-labels") + flags+=("--sort-by=") + local_nonpersistent_flags+=("--sort-by=") + flags+=("--template=") + flags_with_completion+=("--template") + flags_completion+=("_filedir") + local_nonpersistent_flags+=("--template=") flags+=("--validate") local_nonpersistent_flags+=("--validate") flags+=("--as=") @@ -10815,15 +10832,32 @@ _openshift_cli_create_clusterresourcequota() flags_with_completion=() flags_completion=() + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") flags+=("--hard=") local_nonpersistent_flags+=("--hard=") + flags+=("--no-headers") + local_nonpersistent_flags+=("--no-headers") flags+=("--output=") two_word_flags+=("-o") local_nonpersistent_flags+=("--output=") + flags+=("--output-version=") + local_nonpersistent_flags+=("--output-version=") flags+=("--project-annotation-selector=") local_nonpersistent_flags+=("--project-annotation-selector=") flags+=("--project-label-selector=") local_nonpersistent_flags+=("--project-label-selector=") + flags+=("--show-all") + flags+=("-a") + local_nonpersistent_flags+=("--show-all") + flags+=("--show-labels") + local_nonpersistent_flags+=("--show-labels") + flags+=("--sort-by=") + local_nonpersistent_flags+=("--sort-by=") + flags+=("--template=") + flags_with_completion+=("--template") + flags_completion+=("_filedir") + local_nonpersistent_flags+=("--template=") flags+=("--as=") flags+=("--certificate-authority=") flags_with_completion+=("--certificate-authority") @@ -11020,11 +11054,28 @@ _openshift_cli_create_deploymentconfig() flags_with_completion=() flags_completion=() + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") flags+=("--image=") local_nonpersistent_flags+=("--image=") + flags+=("--no-headers") + local_nonpersistent_flags+=("--no-headers") flags+=("--output=") two_word_flags+=("-o") local_nonpersistent_flags+=("--output=") + flags+=("--output-version=") + local_nonpersistent_flags+=("--output-version=") + flags+=("--show-all") + flags+=("-a") + local_nonpersistent_flags+=("--show-all") + flags+=("--show-labels") + local_nonpersistent_flags+=("--show-labels") + flags+=("--sort-by=") + local_nonpersistent_flags+=("--sort-by=") + flags+=("--template=") + flags_with_completion+=("--template") + flags_completion+=("_filedir") + local_nonpersistent_flags+=("--template=") flags+=("--as=") flags+=("--certificate-authority=") flags_with_completion+=("--certificate-authority") @@ -11069,6 +11120,8 @@ _openshift_cli_create_identity() flags_with_completion=() flags_completion=() + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") flags+=("--no-headers") local_nonpersistent_flags+=("--no-headers") flags+=("--output=") @@ -11130,9 +11183,26 @@ _openshift_cli_create_imagestream() flags_with_completion=() flags_completion=() + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") + flags+=("--no-headers") + local_nonpersistent_flags+=("--no-headers") flags+=("--output=") two_word_flags+=("-o") local_nonpersistent_flags+=("--output=") + flags+=("--output-version=") + local_nonpersistent_flags+=("--output-version=") + flags+=("--show-all") + flags+=("-a") + local_nonpersistent_flags+=("--show-all") + flags+=("--show-labels") + local_nonpersistent_flags+=("--show-labels") + flags+=("--sort-by=") + local_nonpersistent_flags+=("--sort-by=") + flags+=("--template=") + flags_with_completion+=("--template") + flags_completion+=("_filedir") + local_nonpersistent_flags+=("--template=") flags+=("--as=") flags+=("--certificate-authority=") flags_with_completion+=("--certificate-authority") @@ -11380,6 +11450,8 @@ _openshift_cli_create_route_edge() flags_with_completion+=("--cert") flags_completion+=("_filedir") local_nonpersistent_flags+=("--cert=") + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") flags+=("--hostname=") local_nonpersistent_flags+=("--hostname=") flags+=("--insecure-policy=") @@ -11388,9 +11460,13 @@ _openshift_cli_create_route_edge() flags_with_completion+=("--key") flags_completion+=("_filedir") local_nonpersistent_flags+=("--key=") + flags+=("--no-headers") + local_nonpersistent_flags+=("--no-headers") flags+=("--output=") two_word_flags+=("-o") local_nonpersistent_flags+=("--output=") + flags+=("--output-version=") + local_nonpersistent_flags+=("--output-version=") flags+=("--path=") local_nonpersistent_flags+=("--path=") flags+=("--port=") @@ -11401,6 +11477,17 @@ _openshift_cli_create_route_edge() local_nonpersistent_flags+=("--schema-cache-dir=") flags+=("--service=") local_nonpersistent_flags+=("--service=") + flags+=("--show-all") + flags+=("-a") + local_nonpersistent_flags+=("--show-all") + flags+=("--show-labels") + local_nonpersistent_flags+=("--show-labels") + flags+=("--sort-by=") + local_nonpersistent_flags+=("--sort-by=") + flags+=("--template=") + flags_with_completion+=("--template") + flags_completion+=("_filedir") + local_nonpersistent_flags+=("--template=") flags+=("--validate") local_nonpersistent_flags+=("--validate") flags+=("--as=") @@ -11447,11 +11534,17 @@ _openshift_cli_create_route_passthrough() flags_with_completion=() flags_completion=() + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") flags+=("--hostname=") local_nonpersistent_flags+=("--hostname=") + flags+=("--no-headers") + local_nonpersistent_flags+=("--no-headers") flags+=("--output=") two_word_flags+=("-o") local_nonpersistent_flags+=("--output=") + flags+=("--output-version=") + local_nonpersistent_flags+=("--output-version=") flags+=("--port=") local_nonpersistent_flags+=("--port=") flags+=("--schema-cache-dir=") @@ -11460,6 +11553,17 @@ _openshift_cli_create_route_passthrough() local_nonpersistent_flags+=("--schema-cache-dir=") flags+=("--service=") local_nonpersistent_flags+=("--service=") + flags+=("--show-all") + flags+=("-a") + local_nonpersistent_flags+=("--show-all") + flags+=("--show-labels") + local_nonpersistent_flags+=("--show-labels") + flags+=("--sort-by=") + local_nonpersistent_flags+=("--sort-by=") + flags+=("--template=") + flags_with_completion+=("--template") + flags_completion+=("_filedir") + local_nonpersistent_flags+=("--template=") flags+=("--validate") local_nonpersistent_flags+=("--validate") flags+=("--as=") @@ -11518,15 +11622,21 @@ _openshift_cli_create_route_reencrypt() flags_with_completion+=("--dest-ca-cert") flags_completion+=("_filedir") local_nonpersistent_flags+=("--dest-ca-cert=") + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") flags+=("--hostname=") local_nonpersistent_flags+=("--hostname=") flags+=("--key=") flags_with_completion+=("--key") flags_completion+=("_filedir") local_nonpersistent_flags+=("--key=") + flags+=("--no-headers") + local_nonpersistent_flags+=("--no-headers") flags+=("--output=") two_word_flags+=("-o") local_nonpersistent_flags+=("--output=") + flags+=("--output-version=") + local_nonpersistent_flags+=("--output-version=") flags+=("--path=") local_nonpersistent_flags+=("--path=") flags+=("--port=") @@ -11537,6 +11647,17 @@ _openshift_cli_create_route_reencrypt() local_nonpersistent_flags+=("--schema-cache-dir=") flags+=("--service=") local_nonpersistent_flags+=("--service=") + flags+=("--show-all") + flags+=("-a") + local_nonpersistent_flags+=("--show-all") + flags+=("--show-labels") + local_nonpersistent_flags+=("--show-labels") + flags+=("--sort-by=") + local_nonpersistent_flags+=("--sort-by=") + flags+=("--template=") + flags_with_completion+=("--template") + flags_completion+=("_filedir") + local_nonpersistent_flags+=("--template=") flags+=("--validate") local_nonpersistent_flags+=("--validate") flags+=("--as=") @@ -12266,6 +12387,8 @@ _openshift_cli_create_user() flags_with_completion=() flags_completion=() + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") flags+=("--full-name=") local_nonpersistent_flags+=("--full-name=") flags+=("--no-headers") @@ -12329,6 +12452,8 @@ _openshift_cli_create_useridentitymapping() flags_with_completion=() flags_completion=() + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") flags+=("--no-headers") local_nonpersistent_flags+=("--no-headers") flags+=("--output=") @@ -12405,6 +12530,8 @@ _openshift_cli_create() flags_with_completion=() flags_completion=() + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") flags+=("--filename=") flags_with_completion+=("--filename") flags_completion+=("__handle_filename_extension_flag json|yaml|yml") @@ -12414,9 +12541,13 @@ _openshift_cli_create() local_nonpersistent_flags+=("--filename=") flags+=("--include-extended-apis") local_nonpersistent_flags+=("--include-extended-apis") + flags+=("--no-headers") + local_nonpersistent_flags+=("--no-headers") flags+=("--output=") two_word_flags+=("-o") local_nonpersistent_flags+=("--output=") + flags+=("--output-version=") + local_nonpersistent_flags+=("--output-version=") flags+=("--record") local_nonpersistent_flags+=("--record") flags+=("--recursive") @@ -12428,6 +12559,17 @@ _openshift_cli_create() flags_with_completion+=("--schema-cache-dir") flags_completion+=("_filedir") local_nonpersistent_flags+=("--schema-cache-dir=") + flags+=("--show-all") + flags+=("-a") + local_nonpersistent_flags+=("--show-all") + flags+=("--show-labels") + local_nonpersistent_flags+=("--show-labels") + flags+=("--sort-by=") + local_nonpersistent_flags+=("--sort-by=") + flags+=("--template=") + flags_with_completion+=("--template") + flags_completion+=("_filedir") + local_nonpersistent_flags+=("--template=") flags+=("--validate") local_nonpersistent_flags+=("--validate") flags+=("--as=") @@ -19857,6 +19999,8 @@ _openshift_kube_apply() flags_with_completion=() flags_completion=() + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") flags+=("--filename=") flags_with_completion+=("--filename") flags_completion+=("__handle_filename_extension_flag json|yaml|yml") @@ -19866,9 +20010,13 @@ _openshift_kube_apply() local_nonpersistent_flags+=("--filename=") flags+=("--include-extended-apis") local_nonpersistent_flags+=("--include-extended-apis") + flags+=("--no-headers") + local_nonpersistent_flags+=("--no-headers") flags+=("--output=") two_word_flags+=("-o") local_nonpersistent_flags+=("--output=") + flags+=("--output-version=") + local_nonpersistent_flags+=("--output-version=") flags+=("--overwrite") local_nonpersistent_flags+=("--overwrite") flags+=("--record") @@ -19880,6 +20028,17 @@ _openshift_kube_apply() flags_with_completion+=("--schema-cache-dir") flags_completion+=("_filedir") local_nonpersistent_flags+=("--schema-cache-dir=") + flags+=("--show-all") + flags+=("-a") + local_nonpersistent_flags+=("--show-all") + flags+=("--show-labels") + local_nonpersistent_flags+=("--show-labels") + flags+=("--sort-by=") + local_nonpersistent_flags+=("--sort-by=") + flags+=("--template=") + flags_with_completion+=("--template") + flags_completion+=("_filedir") + local_nonpersistent_flags+=("--template=") flags+=("--validate") local_nonpersistent_flags+=("--validate") flags+=("--allow-verification-with-non-compliant-keys") @@ -23276,6 +23435,8 @@ _openshift_kube_create() flags_with_completion=() flags_completion=() + flags+=("--dry-run") + local_nonpersistent_flags+=("--dry-run") flags+=("--filename=") flags_with_completion+=("--filename") flags_completion+=("__handle_filename_extension_flag json|yaml|yml") @@ -23285,9 +23446,13 @@ _openshift_kube_create() local_nonpersistent_flags+=("--filename=") flags+=("--include-extended-apis") local_nonpersistent_flags+=("--include-extended-apis") + flags+=("--no-headers") + local_nonpersistent_flags+=("--no-headers") flags+=("--output=") two_word_flags+=("-o") local_nonpersistent_flags+=("--output=") + flags+=("--output-version=") + local_nonpersistent_flags+=("--output-version=") flags+=("--record") local_nonpersistent_flags+=("--record") flags+=("--recursive") @@ -23299,6 +23464,17 @@ _openshift_kube_create() flags_with_completion+=("--schema-cache-dir") flags_completion+=("_filedir") local_nonpersistent_flags+=("--schema-cache-dir=") + flags+=("--show-all") + flags+=("-a") + local_nonpersistent_flags+=("--show-all") + flags+=("--show-labels") + local_nonpersistent_flags+=("--show-labels") + flags+=("--sort-by=") + local_nonpersistent_flags+=("--sort-by=") + flags+=("--template=") + flags_with_completion+=("--template") + flags_completion+=("_filedir") + local_nonpersistent_flags+=("--template=") flags+=("--validate") local_nonpersistent_flags+=("--validate") flags+=("--allow-verification-with-non-compliant-keys") diff --git a/docs/man/man1/oc-apply.1 b/docs/man/man1/oc-apply.1 index 2f7e83e0bbea..5da4f5bca233 100644 --- a/docs/man/man1/oc-apply.1 +++ b/docs/man/man1/oc-apply.1 @@ -20,6 +20,10 @@ JSON and YAML formats are accepted. .SH OPTIONS +.PP +\fB\-\-dry\-run\fP=false + If true, only print the object that would be sent, without sending it. + .PP \fB\-f\fP, \fB\-\-filename\fP=[] Filename, directory, or URL to file that contains the configuration to apply @@ -28,9 +32,20 @@ JSON and YAML formats are accepted. \fB\-\-include\-extended\-apis\fP=true If true, include definitions of new APIs via calls to the API server. [default true] +.PP +\fB\-\-no\-headers\fP=false + When using the default or custom\-column output format, don't print headers. + .PP \fB\-o\fP, \fB\-\-output\fP="" - Output mode. Use "\-o name" for shorter output (resource/name). + Output format. One of: json|yaml|wide|name|custom\-columns=...|custom\-columns\-file=...|go\-template=...|go\-template\-file=...|jsonpath=...|jsonpath\-file=... See custom columns [ +\[la]http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns\[ra]], golang template [ +\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]] and jsonpath template [ +\[la]http://kubernetes.io/docs/user-guide/jsonpath\[ra]]. + +.PP +\fB\-\-output\-version\fP="" + Output the formatted object with the given group version (for ex: 'extensions/v1beta1'). .PP \fB\-\-overwrite\fP=true @@ -48,6 +63,23 @@ JSON and YAML formats are accepted. \fB\-\-schema\-cache\-dir\fP="\~/.kube/schema" If non\-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema' +.PP +\fB\-a\fP, \fB\-\-show\-all\fP=true + When printing, show all resources (false means hide terminated pods.) + +.PP +\fB\-\-show\-labels\fP=false + When printing, show all labels as the last column (default hide labels column) + +.PP +\fB\-\-sort\-by\fP="" + If non\-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. '{.metadata.name}'). The field in the API resource specified by this JSONPath expression must be an integer or a string. + +.PP +\fB\-\-template\fP="" + Template string or path to template file to use when \-o=go\-template, \-o=go\-template\-file. The template format is golang templates [ +\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]]. + .PP \fB\-\-validate\fP=false If true, use a schema to validate the input before sending it diff --git a/docs/man/man1/oc-create-clusterresourcequota.1 b/docs/man/man1/oc-create-clusterresourcequota.1 index 635c432ff529..3d6909457409 100644 --- a/docs/man/man1/oc-create-clusterresourcequota.1 +++ b/docs/man/man1/oc-create-clusterresourcequota.1 @@ -20,13 +20,28 @@ Cluster resource quota objects defined quota restrictions that span multiple pro .SH OPTIONS +.PP +\fB\-\-dry\-run\fP=false + If true, only print the object that would be sent, without sending it. + .PP \fB\-\-hard\fP=[] The resource to constrain: RESOURCE=QUANTITY (pods=10) +.PP +\fB\-\-no\-headers\fP=false + When using the default or custom\-column output format, don't print headers. + .PP \fB\-o\fP, \fB\-\-output\fP="" - Output mode. Use "\-o name" for shorter output (resource/name). + Output format. One of: json|yaml|wide|name|custom\-columns=...|custom\-columns\-file=...|go\-template=...|go\-template\-file=...|jsonpath=...|jsonpath\-file=... See custom columns [ +\[la]http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns\[ra]], golang template [ +\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]] and jsonpath template [ +\[la]http://kubernetes.io/docs/user-guide/jsonpath\[ra]]. + +.PP +\fB\-\-output\-version\fP="" + Output the formatted object with the given group version (for ex: 'extensions/v1beta1'). .PP \fB\-\-project\-annotation\-selector\fP="" @@ -36,6 +51,23 @@ Cluster resource quota objects defined quota restrictions that span multiple pro \fB\-\-project\-label\-selector\fP="" The project label selector for the cluster resource quota +.PP +\fB\-a\fP, \fB\-\-show\-all\fP=true + When printing, show all resources (false means hide terminated pods.) + +.PP +\fB\-\-show\-labels\fP=false + When printing, show all labels as the last column (default hide labels column) + +.PP +\fB\-\-sort\-by\fP="" + If non\-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. '{.metadata.name}'). The field in the API resource specified by this JSONPath expression must be an integer or a string. + +.PP +\fB\-\-template\fP="" + Template string or path to template file to use when \-o=go\-template, \-o=go\-template\-file. The template format is golang templates [ +\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]]. + .SH OPTIONS INHERITED FROM PARENT COMMANDS .PP diff --git a/docs/man/man1/oc-create-deploymentconfig.1 b/docs/man/man1/oc-create-deploymentconfig.1 index aeed1e28808b..d39fef17bfb7 100644 --- a/docs/man/man1/oc-create-deploymentconfig.1 +++ b/docs/man/man1/oc-create-deploymentconfig.1 @@ -20,13 +20,45 @@ Deployment configs define the template for a pod and manages deploying new image .SH OPTIONS +.PP +\fB\-\-dry\-run\fP=false + If true, only print the object that would be sent, without sending it. + .PP \fB\-\-image\fP="" The image for the container to run. +.PP +\fB\-\-no\-headers\fP=false + When using the default or custom\-column output format, don't print headers. + .PP \fB\-o\fP, \fB\-\-output\fP="" - Output mode. Use "\-o name" for shorter output (resource/name). + Output format. One of: json|yaml|wide|name|custom\-columns=...|custom\-columns\-file=...|go\-template=...|go\-template\-file=...|jsonpath=...|jsonpath\-file=... See custom columns [ +\[la]http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns\[ra]], golang template [ +\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]] and jsonpath template [ +\[la]http://kubernetes.io/docs/user-guide/jsonpath\[ra]]. + +.PP +\fB\-\-output\-version\fP="" + Output the formatted object with the given group version (for ex: 'extensions/v1beta1'). + +.PP +\fB\-a\fP, \fB\-\-show\-all\fP=true + When printing, show all resources (false means hide terminated pods.) + +.PP +\fB\-\-show\-labels\fP=false + When printing, show all labels as the last column (default hide labels column) + +.PP +\fB\-\-sort\-by\fP="" + If non\-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. '{.metadata.name}'). The field in the API resource specified by this JSONPath expression must be an integer or a string. + +.PP +\fB\-\-template\fP="" + Template string or path to template file to use when \-o=go\-template, \-o=go\-template\-file. The template format is golang templates [ +\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]]. .SH OPTIONS INHERITED FROM PARENT COMMANDS diff --git a/docs/man/man1/oc-create-identity.1 b/docs/man/man1/oc-create-identity.1 index 737358e91169..1c72ff22fb5e 100644 --- a/docs/man/man1/oc-create-identity.1 +++ b/docs/man/man1/oc-create-identity.1 @@ -26,6 +26,10 @@ to allow logging in with the created identity. .SH OPTIONS +.PP +\fB\-\-dry\-run\fP=false + If true, only print the object that would be sent, without sending it. + .PP \fB\-\-no\-headers\fP=false When using the default or custom\-column output format, don't print headers. diff --git a/docs/man/man1/oc-create-imagestream.1 b/docs/man/man1/oc-create-imagestream.1 index 2f05fc216c7a..5c7828a26a79 100644 --- a/docs/man/man1/oc-create-imagestream.1 +++ b/docs/man/man1/oc-create-imagestream.1 @@ -21,9 +21,41 @@ access controlled destination that you can push images to. .SH OPTIONS +.PP +\fB\-\-dry\-run\fP=false + If true, only print the object that would be sent, without sending it. + +.PP +\fB\-\-no\-headers\fP=false + When using the default or custom\-column output format, don't print headers. + .PP \fB\-o\fP, \fB\-\-output\fP="" - Output mode. Use "\-o name" for shorter output (resource/name). + Output format. One of: json|yaml|wide|name|custom\-columns=...|custom\-columns\-file=...|go\-template=...|go\-template\-file=...|jsonpath=...|jsonpath\-file=... See custom columns [ +\[la]http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns\[ra]], golang template [ +\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]] and jsonpath template [ +\[la]http://kubernetes.io/docs/user-guide/jsonpath\[ra]]. + +.PP +\fB\-\-output\-version\fP="" + Output the formatted object with the given group version (for ex: 'extensions/v1beta1'). + +.PP +\fB\-a\fP, \fB\-\-show\-all\fP=true + When printing, show all resources (false means hide terminated pods.) + +.PP +\fB\-\-show\-labels\fP=false + When printing, show all labels as the last column (default hide labels column) + +.PP +\fB\-\-sort\-by\fP="" + If non\-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. '{.metadata.name}'). The field in the API resource specified by this JSONPath expression must be an integer or a string. + +.PP +\fB\-\-template\fP="" + Template string or path to template file to use when \-o=go\-template, \-o=go\-template\-file. The template format is golang templates [ +\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]]. .SH OPTIONS INHERITED FROM PARENT COMMANDS diff --git a/docs/man/man1/oc-create-route-edge.1 b/docs/man/man1/oc-create-route-edge.1 index d3d2a14444e8..bb70379a1595 100644 --- a/docs/man/man1/oc-create-route-edge.1 +++ b/docs/man/man1/oc-create-route-edge.1 @@ -29,6 +29,10 @@ generated route should expose via the \-\-service flag. \fB\-\-cert\fP="" Path to a certificate file. +.PP +\fB\-\-dry\-run\fP=false + If true, only print the object that would be sent, without sending it. + .PP \fB\-\-hostname\fP="" Set a hostname for the new route @@ -41,9 +45,20 @@ generated route should expose via the \-\-service flag. \fB\-\-key\fP="" Path to a key file. +.PP +\fB\-\-no\-headers\fP=false + When using the default or custom\-column output format, don't print headers. + .PP \fB\-o\fP, \fB\-\-output\fP="" - Output mode. Use "\-o name" for shorter output (resource/name). + Output format. One of: json|yaml|wide|name|custom\-columns=...|custom\-columns\-file=...|go\-template=...|go\-template\-file=...|jsonpath=...|jsonpath\-file=... See custom columns [ +\[la]http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns\[ra]], golang template [ +\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]] and jsonpath template [ +\[la]http://kubernetes.io/docs/user-guide/jsonpath\[ra]]. + +.PP +\fB\-\-output\-version\fP="" + Output the formatted object with the given group version (for ex: 'extensions/v1beta1'). .PP \fB\-\-path\fP="" @@ -61,6 +76,23 @@ generated route should expose via the \-\-service flag. \fB\-\-service\fP="" Name of the service that the new route is exposing +.PP +\fB\-a\fP, \fB\-\-show\-all\fP=true + When printing, show all resources (false means hide terminated pods.) + +.PP +\fB\-\-show\-labels\fP=false + When printing, show all labels as the last column (default hide labels column) + +.PP +\fB\-\-sort\-by\fP="" + If non\-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. '{.metadata.name}'). The field in the API resource specified by this JSONPath expression must be an integer or a string. + +.PP +\fB\-\-template\fP="" + Template string or path to template file to use when \-o=go\-template, \-o=go\-template\-file. The template format is golang templates [ +\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]]. + .PP \fB\-\-validate\fP=false If true, use a schema to validate the input before sending it diff --git a/docs/man/man1/oc-create-route-passthrough.1 b/docs/man/man1/oc-create-route-passthrough.1 index 92576636c3ed..001c8584faf7 100644 --- a/docs/man/man1/oc-create-route-passthrough.1 +++ b/docs/man/man1/oc-create-route-passthrough.1 @@ -21,13 +21,28 @@ generated route should expose via the \-\-service flag. .SH OPTIONS +.PP +\fB\-\-dry\-run\fP=false + If true, only print the object that would be sent, without sending it. + .PP \fB\-\-hostname\fP="" Set a hostname for the new route +.PP +\fB\-\-no\-headers\fP=false + When using the default or custom\-column output format, don't print headers. + .PP \fB\-o\fP, \fB\-\-output\fP="" - Output mode. Use "\-o name" for shorter output (resource/name). + Output format. One of: json|yaml|wide|name|custom\-columns=...|custom\-columns\-file=...|go\-template=...|go\-template\-file=...|jsonpath=...|jsonpath\-file=... See custom columns [ +\[la]http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns\[ra]], golang template [ +\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]] and jsonpath template [ +\[la]http://kubernetes.io/docs/user-guide/jsonpath\[ra]]. + +.PP +\fB\-\-output\-version\fP="" + Output the formatted object with the given group version (for ex: 'extensions/v1beta1'). .PP \fB\-\-port\fP="" @@ -41,6 +56,23 @@ generated route should expose via the \-\-service flag. \fB\-\-service\fP="" Name of the service that the new route is exposing +.PP +\fB\-a\fP, \fB\-\-show\-all\fP=true + When printing, show all resources (false means hide terminated pods.) + +.PP +\fB\-\-show\-labels\fP=false + When printing, show all labels as the last column (default hide labels column) + +.PP +\fB\-\-sort\-by\fP="" + If non\-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. '{.metadata.name}'). The field in the API resource specified by this JSONPath expression must be an integer or a string. + +.PP +\fB\-\-template\fP="" + Template string or path to template file to use when \-o=go\-template, \-o=go\-template\-file. The template format is golang templates [ +\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]]. + .PP \fB\-\-validate\fP=false If true, use a schema to validate the input before sending it diff --git a/docs/man/man1/oc-create-route-reencrypt.1 b/docs/man/man1/oc-create-route-reencrypt.1 index 7b4e433bf505..a03c4cf4a217 100644 --- a/docs/man/man1/oc-create-route-reencrypt.1 +++ b/docs/man/man1/oc-create-route-reencrypt.1 @@ -34,6 +34,10 @@ is needed for reencrypt routes, specify one with the \-\-dest\-ca\-cert flag. \fB\-\-dest\-ca\-cert\fP="" Path to a CA certificate file, used for securing the connection from the router to the destination. +.PP +\fB\-\-dry\-run\fP=false + If true, only print the object that would be sent, without sending it. + .PP \fB\-\-hostname\fP="" Set a hostname for the new route @@ -42,9 +46,20 @@ is needed for reencrypt routes, specify one with the \-\-dest\-ca\-cert flag. \fB\-\-key\fP="" Path to a key file. +.PP +\fB\-\-no\-headers\fP=false + When using the default or custom\-column output format, don't print headers. + .PP \fB\-o\fP, \fB\-\-output\fP="" - Output mode. Use "\-o name" for shorter output (resource/name). + Output format. One of: json|yaml|wide|name|custom\-columns=...|custom\-columns\-file=...|go\-template=...|go\-template\-file=...|jsonpath=...|jsonpath\-file=... See custom columns [ +\[la]http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns\[ra]], golang template [ +\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]] and jsonpath template [ +\[la]http://kubernetes.io/docs/user-guide/jsonpath\[ra]]. + +.PP +\fB\-\-output\-version\fP="" + Output the formatted object with the given group version (for ex: 'extensions/v1beta1'). .PP \fB\-\-path\fP="" @@ -62,6 +77,23 @@ is needed for reencrypt routes, specify one with the \-\-dest\-ca\-cert flag. \fB\-\-service\fP="" Name of the service that the new route is exposing +.PP +\fB\-a\fP, \fB\-\-show\-all\fP=true + When printing, show all resources (false means hide terminated pods.) + +.PP +\fB\-\-show\-labels\fP=false + When printing, show all labels as the last column (default hide labels column) + +.PP +\fB\-\-sort\-by\fP="" + If non\-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. '{.metadata.name}'). The field in the API resource specified by this JSONPath expression must be an integer or a string. + +.PP +\fB\-\-template\fP="" + Template string or path to template file to use when \-o=go\-template, \-o=go\-template\-file. The template format is golang templates [ +\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]]. + .PP \fB\-\-validate\fP=false If true, use a schema to validate the input before sending it diff --git a/docs/man/man1/oc-create-user.1 b/docs/man/man1/oc-create-user.1 index 321c086a195c..7636f6af2f88 100644 --- a/docs/man/man1/oc-create-user.1 +++ b/docs/man/man1/oc-create-user.1 @@ -26,6 +26,10 @@ to allow logging in as the created user. .SH OPTIONS +.PP +\fB\-\-dry\-run\fP=false + If true, only print the object that would be sent, without sending it. + .PP \fB\-\-full\-name\fP="" Display name of the user diff --git a/docs/man/man1/oc-create-useridentitymapping.1 b/docs/man/man1/oc-create-useridentitymapping.1 index 25e63e98452d..693dd1b382f8 100644 --- a/docs/man/man1/oc-create-useridentitymapping.1 +++ b/docs/man/man1/oc-create-useridentitymapping.1 @@ -20,6 +20,10 @@ to create a useridentitymapping object. .SH OPTIONS +.PP +\fB\-\-dry\-run\fP=false + If true, only print the object that would be sent, without sending it. + .PP \fB\-\-no\-headers\fP=false When using the default or custom\-column output format, don't print headers. diff --git a/docs/man/man1/oc-create.1 b/docs/man/man1/oc-create.1 index 01ce942da0dc..78369c274081 100644 --- a/docs/man/man1/oc-create.1 +++ b/docs/man/man1/oc-create.1 @@ -20,6 +20,10 @@ JSON and YAML formats are accepted. .SH OPTIONS +.PP +\fB\-\-dry\-run\fP=false + If true, only print the object that would be sent, without sending it. + .PP \fB\-f\fP, \fB\-\-filename\fP=[] Filename, directory, or URL to file to use to create the resource @@ -28,9 +32,20 @@ JSON and YAML formats are accepted. \fB\-\-include\-extended\-apis\fP=true If true, include definitions of new APIs via calls to the API server. [default true] +.PP +\fB\-\-no\-headers\fP=false + When using the default or custom\-column output format, don't print headers. + .PP \fB\-o\fP, \fB\-\-output\fP="" - Output mode. Use "\-o name" for shorter output (resource/name). + Output format. One of: json|yaml|wide|name|custom\-columns=...|custom\-columns\-file=...|go\-template=...|go\-template\-file=...|jsonpath=...|jsonpath\-file=... See custom columns [ +\[la]http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns\[ra]], golang template [ +\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]] and jsonpath template [ +\[la]http://kubernetes.io/docs/user-guide/jsonpath\[ra]]. + +.PP +\fB\-\-output\-version\fP="" + Output the formatted object with the given group version (for ex: 'extensions/v1beta1'). .PP \fB\-\-record\fP=false @@ -48,6 +63,23 @@ JSON and YAML formats are accepted. \fB\-\-schema\-cache\-dir\fP="\~/.kube/schema" If non\-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema' +.PP +\fB\-a\fP, \fB\-\-show\-all\fP=true + When printing, show all resources (false means hide terminated pods.) + +.PP +\fB\-\-show\-labels\fP=false + When printing, show all labels as the last column (default hide labels column) + +.PP +\fB\-\-sort\-by\fP="" + If non\-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. '{.metadata.name}'). The field in the API resource specified by this JSONPath expression must be an integer or a string. + +.PP +\fB\-\-template\fP="" + Template string or path to template file to use when \-o=go\-template, \-o=go\-template\-file. The template format is golang templates [ +\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]]. + .PP \fB\-\-validate\fP=false If true, use a schema to validate the input before sending it diff --git a/docs/man/man1/openshift-cli-apply.1 b/docs/man/man1/openshift-cli-apply.1 index 8b49f5f85787..e34fa7ac2eab 100644 --- a/docs/man/man1/openshift-cli-apply.1 +++ b/docs/man/man1/openshift-cli-apply.1 @@ -20,6 +20,10 @@ JSON and YAML formats are accepted. .SH OPTIONS +.PP +\fB\-\-dry\-run\fP=false + If true, only print the object that would be sent, without sending it. + .PP \fB\-f\fP, \fB\-\-filename\fP=[] Filename, directory, or URL to file that contains the configuration to apply @@ -28,9 +32,20 @@ JSON and YAML formats are accepted. \fB\-\-include\-extended\-apis\fP=true If true, include definitions of new APIs via calls to the API server. [default true] +.PP +\fB\-\-no\-headers\fP=false + When using the default or custom\-column output format, don't print headers. + .PP \fB\-o\fP, \fB\-\-output\fP="" - Output mode. Use "\-o name" for shorter output (resource/name). + Output format. One of: json|yaml|wide|name|custom\-columns=...|custom\-columns\-file=...|go\-template=...|go\-template\-file=...|jsonpath=...|jsonpath\-file=... See custom columns [ +\[la]http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns\[ra]], golang template [ +\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]] and jsonpath template [ +\[la]http://kubernetes.io/docs/user-guide/jsonpath\[ra]]. + +.PP +\fB\-\-output\-version\fP="" + Output the formatted object with the given group version (for ex: 'extensions/v1beta1'). .PP \fB\-\-overwrite\fP=true @@ -48,6 +63,23 @@ JSON and YAML formats are accepted. \fB\-\-schema\-cache\-dir\fP="\~/.kube/schema" If non\-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema' +.PP +\fB\-a\fP, \fB\-\-show\-all\fP=true + When printing, show all resources (false means hide terminated pods.) + +.PP +\fB\-\-show\-labels\fP=false + When printing, show all labels as the last column (default hide labels column) + +.PP +\fB\-\-sort\-by\fP="" + If non\-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. '{.metadata.name}'). The field in the API resource specified by this JSONPath expression must be an integer or a string. + +.PP +\fB\-\-template\fP="" + Template string or path to template file to use when \-o=go\-template, \-o=go\-template\-file. The template format is golang templates [ +\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]]. + .PP \fB\-\-validate\fP=false If true, use a schema to validate the input before sending it diff --git a/docs/man/man1/openshift-cli-create-clusterresourcequota.1 b/docs/man/man1/openshift-cli-create-clusterresourcequota.1 index 63c558231796..b54a1f0d45e3 100644 --- a/docs/man/man1/openshift-cli-create-clusterresourcequota.1 +++ b/docs/man/man1/openshift-cli-create-clusterresourcequota.1 @@ -20,13 +20,28 @@ Cluster resource quota objects defined quota restrictions that span multiple pro .SH OPTIONS +.PP +\fB\-\-dry\-run\fP=false + If true, only print the object that would be sent, without sending it. + .PP \fB\-\-hard\fP=[] The resource to constrain: RESOURCE=QUANTITY (pods=10) +.PP +\fB\-\-no\-headers\fP=false + When using the default or custom\-column output format, don't print headers. + .PP \fB\-o\fP, \fB\-\-output\fP="" - Output mode. Use "\-o name" for shorter output (resource/name). + Output format. One of: json|yaml|wide|name|custom\-columns=...|custom\-columns\-file=...|go\-template=...|go\-template\-file=...|jsonpath=...|jsonpath\-file=... See custom columns [ +\[la]http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns\[ra]], golang template [ +\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]] and jsonpath template [ +\[la]http://kubernetes.io/docs/user-guide/jsonpath\[ra]]. + +.PP +\fB\-\-output\-version\fP="" + Output the formatted object with the given group version (for ex: 'extensions/v1beta1'). .PP \fB\-\-project\-annotation\-selector\fP="" @@ -36,6 +51,23 @@ Cluster resource quota objects defined quota restrictions that span multiple pro \fB\-\-project\-label\-selector\fP="" The project label selector for the cluster resource quota +.PP +\fB\-a\fP, \fB\-\-show\-all\fP=true + When printing, show all resources (false means hide terminated pods.) + +.PP +\fB\-\-show\-labels\fP=false + When printing, show all labels as the last column (default hide labels column) + +.PP +\fB\-\-sort\-by\fP="" + If non\-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. '{.metadata.name}'). The field in the API resource specified by this JSONPath expression must be an integer or a string. + +.PP +\fB\-\-template\fP="" + Template string or path to template file to use when \-o=go\-template, \-o=go\-template\-file. The template format is golang templates [ +\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]]. + .SH OPTIONS INHERITED FROM PARENT COMMANDS .PP diff --git a/docs/man/man1/openshift-cli-create-deploymentconfig.1 b/docs/man/man1/openshift-cli-create-deploymentconfig.1 index 6101190292cd..d0ed207875fb 100644 --- a/docs/man/man1/openshift-cli-create-deploymentconfig.1 +++ b/docs/man/man1/openshift-cli-create-deploymentconfig.1 @@ -20,13 +20,45 @@ Deployment configs define the template for a pod and manages deploying new image .SH OPTIONS +.PP +\fB\-\-dry\-run\fP=false + If true, only print the object that would be sent, without sending it. + .PP \fB\-\-image\fP="" The image for the container to run. +.PP +\fB\-\-no\-headers\fP=false + When using the default or custom\-column output format, don't print headers. + .PP \fB\-o\fP, \fB\-\-output\fP="" - Output mode. Use "\-o name" for shorter output (resource/name). + Output format. One of: json|yaml|wide|name|custom\-columns=...|custom\-columns\-file=...|go\-template=...|go\-template\-file=...|jsonpath=...|jsonpath\-file=... See custom columns [ +\[la]http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns\[ra]], golang template [ +\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]] and jsonpath template [ +\[la]http://kubernetes.io/docs/user-guide/jsonpath\[ra]]. + +.PP +\fB\-\-output\-version\fP="" + Output the formatted object with the given group version (for ex: 'extensions/v1beta1'). + +.PP +\fB\-a\fP, \fB\-\-show\-all\fP=true + When printing, show all resources (false means hide terminated pods.) + +.PP +\fB\-\-show\-labels\fP=false + When printing, show all labels as the last column (default hide labels column) + +.PP +\fB\-\-sort\-by\fP="" + If non\-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. '{.metadata.name}'). The field in the API resource specified by this JSONPath expression must be an integer or a string. + +.PP +\fB\-\-template\fP="" + Template string or path to template file to use when \-o=go\-template, \-o=go\-template\-file. The template format is golang templates [ +\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]]. .SH OPTIONS INHERITED FROM PARENT COMMANDS diff --git a/docs/man/man1/openshift-cli-create-identity.1 b/docs/man/man1/openshift-cli-create-identity.1 index afd8a46b3bd4..22fc72aad0aa 100644 --- a/docs/man/man1/openshift-cli-create-identity.1 +++ b/docs/man/man1/openshift-cli-create-identity.1 @@ -26,6 +26,10 @@ to allow logging in with the created identity. .SH OPTIONS +.PP +\fB\-\-dry\-run\fP=false + If true, only print the object that would be sent, without sending it. + .PP \fB\-\-no\-headers\fP=false When using the default or custom\-column output format, don't print headers. diff --git a/docs/man/man1/openshift-cli-create-imagestream.1 b/docs/man/man1/openshift-cli-create-imagestream.1 index abc1870b8abf..5b90182cb62f 100644 --- a/docs/man/man1/openshift-cli-create-imagestream.1 +++ b/docs/man/man1/openshift-cli-create-imagestream.1 @@ -21,9 +21,41 @@ access controlled destination that you can push images to. .SH OPTIONS +.PP +\fB\-\-dry\-run\fP=false + If true, only print the object that would be sent, without sending it. + +.PP +\fB\-\-no\-headers\fP=false + When using the default or custom\-column output format, don't print headers. + .PP \fB\-o\fP, \fB\-\-output\fP="" - Output mode. Use "\-o name" for shorter output (resource/name). + Output format. One of: json|yaml|wide|name|custom\-columns=...|custom\-columns\-file=...|go\-template=...|go\-template\-file=...|jsonpath=...|jsonpath\-file=... See custom columns [ +\[la]http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns\[ra]], golang template [ +\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]] and jsonpath template [ +\[la]http://kubernetes.io/docs/user-guide/jsonpath\[ra]]. + +.PP +\fB\-\-output\-version\fP="" + Output the formatted object with the given group version (for ex: 'extensions/v1beta1'). + +.PP +\fB\-a\fP, \fB\-\-show\-all\fP=true + When printing, show all resources (false means hide terminated pods.) + +.PP +\fB\-\-show\-labels\fP=false + When printing, show all labels as the last column (default hide labels column) + +.PP +\fB\-\-sort\-by\fP="" + If non\-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. '{.metadata.name}'). The field in the API resource specified by this JSONPath expression must be an integer or a string. + +.PP +\fB\-\-template\fP="" + Template string or path to template file to use when \-o=go\-template, \-o=go\-template\-file. The template format is golang templates [ +\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]]. .SH OPTIONS INHERITED FROM PARENT COMMANDS diff --git a/docs/man/man1/openshift-cli-create-route-edge.1 b/docs/man/man1/openshift-cli-create-route-edge.1 index 4076cb8cab15..765a97e3cd4c 100644 --- a/docs/man/man1/openshift-cli-create-route-edge.1 +++ b/docs/man/man1/openshift-cli-create-route-edge.1 @@ -29,6 +29,10 @@ generated route should expose via the \-\-service flag. \fB\-\-cert\fP="" Path to a certificate file. +.PP +\fB\-\-dry\-run\fP=false + If true, only print the object that would be sent, without sending it. + .PP \fB\-\-hostname\fP="" Set a hostname for the new route @@ -41,9 +45,20 @@ generated route should expose via the \-\-service flag. \fB\-\-key\fP="" Path to a key file. +.PP +\fB\-\-no\-headers\fP=false + When using the default or custom\-column output format, don't print headers. + .PP \fB\-o\fP, \fB\-\-output\fP="" - Output mode. Use "\-o name" for shorter output (resource/name). + Output format. One of: json|yaml|wide|name|custom\-columns=...|custom\-columns\-file=...|go\-template=...|go\-template\-file=...|jsonpath=...|jsonpath\-file=... See custom columns [ +\[la]http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns\[ra]], golang template [ +\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]] and jsonpath template [ +\[la]http://kubernetes.io/docs/user-guide/jsonpath\[ra]]. + +.PP +\fB\-\-output\-version\fP="" + Output the formatted object with the given group version (for ex: 'extensions/v1beta1'). .PP \fB\-\-path\fP="" @@ -61,6 +76,23 @@ generated route should expose via the \-\-service flag. \fB\-\-service\fP="" Name of the service that the new route is exposing +.PP +\fB\-a\fP, \fB\-\-show\-all\fP=true + When printing, show all resources (false means hide terminated pods.) + +.PP +\fB\-\-show\-labels\fP=false + When printing, show all labels as the last column (default hide labels column) + +.PP +\fB\-\-sort\-by\fP="" + If non\-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. '{.metadata.name}'). The field in the API resource specified by this JSONPath expression must be an integer or a string. + +.PP +\fB\-\-template\fP="" + Template string or path to template file to use when \-o=go\-template, \-o=go\-template\-file. The template format is golang templates [ +\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]]. + .PP \fB\-\-validate\fP=false If true, use a schema to validate the input before sending it diff --git a/docs/man/man1/openshift-cli-create-route-passthrough.1 b/docs/man/man1/openshift-cli-create-route-passthrough.1 index fc9bf0aa7cb7..241d15fc78fe 100644 --- a/docs/man/man1/openshift-cli-create-route-passthrough.1 +++ b/docs/man/man1/openshift-cli-create-route-passthrough.1 @@ -21,13 +21,28 @@ generated route should expose via the \-\-service flag. .SH OPTIONS +.PP +\fB\-\-dry\-run\fP=false + If true, only print the object that would be sent, without sending it. + .PP \fB\-\-hostname\fP="" Set a hostname for the new route +.PP +\fB\-\-no\-headers\fP=false + When using the default or custom\-column output format, don't print headers. + .PP \fB\-o\fP, \fB\-\-output\fP="" - Output mode. Use "\-o name" for shorter output (resource/name). + Output format. One of: json|yaml|wide|name|custom\-columns=...|custom\-columns\-file=...|go\-template=...|go\-template\-file=...|jsonpath=...|jsonpath\-file=... See custom columns [ +\[la]http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns\[ra]], golang template [ +\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]] and jsonpath template [ +\[la]http://kubernetes.io/docs/user-guide/jsonpath\[ra]]. + +.PP +\fB\-\-output\-version\fP="" + Output the formatted object with the given group version (for ex: 'extensions/v1beta1'). .PP \fB\-\-port\fP="" @@ -41,6 +56,23 @@ generated route should expose via the \-\-service flag. \fB\-\-service\fP="" Name of the service that the new route is exposing +.PP +\fB\-a\fP, \fB\-\-show\-all\fP=true + When printing, show all resources (false means hide terminated pods.) + +.PP +\fB\-\-show\-labels\fP=false + When printing, show all labels as the last column (default hide labels column) + +.PP +\fB\-\-sort\-by\fP="" + If non\-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. '{.metadata.name}'). The field in the API resource specified by this JSONPath expression must be an integer or a string. + +.PP +\fB\-\-template\fP="" + Template string or path to template file to use when \-o=go\-template, \-o=go\-template\-file. The template format is golang templates [ +\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]]. + .PP \fB\-\-validate\fP=false If true, use a schema to validate the input before sending it diff --git a/docs/man/man1/openshift-cli-create-route-reencrypt.1 b/docs/man/man1/openshift-cli-create-route-reencrypt.1 index cedff409c5d5..c5369885af2b 100644 --- a/docs/man/man1/openshift-cli-create-route-reencrypt.1 +++ b/docs/man/man1/openshift-cli-create-route-reencrypt.1 @@ -34,6 +34,10 @@ is needed for reencrypt routes, specify one with the \-\-dest\-ca\-cert flag. \fB\-\-dest\-ca\-cert\fP="" Path to a CA certificate file, used for securing the connection from the router to the destination. +.PP +\fB\-\-dry\-run\fP=false + If true, only print the object that would be sent, without sending it. + .PP \fB\-\-hostname\fP="" Set a hostname for the new route @@ -42,9 +46,20 @@ is needed for reencrypt routes, specify one with the \-\-dest\-ca\-cert flag. \fB\-\-key\fP="" Path to a key file. +.PP +\fB\-\-no\-headers\fP=false + When using the default or custom\-column output format, don't print headers. + .PP \fB\-o\fP, \fB\-\-output\fP="" - Output mode. Use "\-o name" for shorter output (resource/name). + Output format. One of: json|yaml|wide|name|custom\-columns=...|custom\-columns\-file=...|go\-template=...|go\-template\-file=...|jsonpath=...|jsonpath\-file=... See custom columns [ +\[la]http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns\[ra]], golang template [ +\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]] and jsonpath template [ +\[la]http://kubernetes.io/docs/user-guide/jsonpath\[ra]]. + +.PP +\fB\-\-output\-version\fP="" + Output the formatted object with the given group version (for ex: 'extensions/v1beta1'). .PP \fB\-\-path\fP="" @@ -62,6 +77,23 @@ is needed for reencrypt routes, specify one with the \-\-dest\-ca\-cert flag. \fB\-\-service\fP="" Name of the service that the new route is exposing +.PP +\fB\-a\fP, \fB\-\-show\-all\fP=true + When printing, show all resources (false means hide terminated pods.) + +.PP +\fB\-\-show\-labels\fP=false + When printing, show all labels as the last column (default hide labels column) + +.PP +\fB\-\-sort\-by\fP="" + If non\-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. '{.metadata.name}'). The field in the API resource specified by this JSONPath expression must be an integer or a string. + +.PP +\fB\-\-template\fP="" + Template string or path to template file to use when \-o=go\-template, \-o=go\-template\-file. The template format is golang templates [ +\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]]. + .PP \fB\-\-validate\fP=false If true, use a schema to validate the input before sending it diff --git a/docs/man/man1/openshift-cli-create-user.1 b/docs/man/man1/openshift-cli-create-user.1 index 2d40e83701f2..32b4b67acac7 100644 --- a/docs/man/man1/openshift-cli-create-user.1 +++ b/docs/man/man1/openshift-cli-create-user.1 @@ -26,6 +26,10 @@ to allow logging in as the created user. .SH OPTIONS +.PP +\fB\-\-dry\-run\fP=false + If true, only print the object that would be sent, without sending it. + .PP \fB\-\-full\-name\fP="" Display name of the user diff --git a/docs/man/man1/openshift-cli-create-useridentitymapping.1 b/docs/man/man1/openshift-cli-create-useridentitymapping.1 index 1ab32cdb8a76..10aa852d58cf 100644 --- a/docs/man/man1/openshift-cli-create-useridentitymapping.1 +++ b/docs/man/man1/openshift-cli-create-useridentitymapping.1 @@ -20,6 +20,10 @@ to create a useridentitymapping object. .SH OPTIONS +.PP +\fB\-\-dry\-run\fP=false + If true, only print the object that would be sent, without sending it. + .PP \fB\-\-no\-headers\fP=false When using the default or custom\-column output format, don't print headers. diff --git a/docs/man/man1/openshift-cli-create.1 b/docs/man/man1/openshift-cli-create.1 index 66a281e1e5b1..59b00b0cf3de 100644 --- a/docs/man/man1/openshift-cli-create.1 +++ b/docs/man/man1/openshift-cli-create.1 @@ -20,6 +20,10 @@ JSON and YAML formats are accepted. .SH OPTIONS +.PP +\fB\-\-dry\-run\fP=false + If true, only print the object that would be sent, without sending it. + .PP \fB\-f\fP, \fB\-\-filename\fP=[] Filename, directory, or URL to file to use to create the resource @@ -28,9 +32,20 @@ JSON and YAML formats are accepted. \fB\-\-include\-extended\-apis\fP=true If true, include definitions of new APIs via calls to the API server. [default true] +.PP +\fB\-\-no\-headers\fP=false + When using the default or custom\-column output format, don't print headers. + .PP \fB\-o\fP, \fB\-\-output\fP="" - Output mode. Use "\-o name" for shorter output (resource/name). + Output format. One of: json|yaml|wide|name|custom\-columns=...|custom\-columns\-file=...|go\-template=...|go\-template\-file=...|jsonpath=...|jsonpath\-file=... See custom columns [ +\[la]http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns\[ra]], golang template [ +\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]] and jsonpath template [ +\[la]http://kubernetes.io/docs/user-guide/jsonpath\[ra]]. + +.PP +\fB\-\-output\-version\fP="" + Output the formatted object with the given group version (for ex: 'extensions/v1beta1'). .PP \fB\-\-record\fP=false @@ -48,6 +63,23 @@ JSON and YAML formats are accepted. \fB\-\-schema\-cache\-dir\fP="\~/.kube/schema" If non\-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema' +.PP +\fB\-a\fP, \fB\-\-show\-all\fP=true + When printing, show all resources (false means hide terminated pods.) + +.PP +\fB\-\-show\-labels\fP=false + When printing, show all labels as the last column (default hide labels column) + +.PP +\fB\-\-sort\-by\fP="" + If non\-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. '{.metadata.name}'). The field in the API resource specified by this JSONPath expression must be an integer or a string. + +.PP +\fB\-\-template\fP="" + Template string or path to template file to use when \-o=go\-template, \-o=go\-template\-file. The template format is golang templates [ +\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]]. + .PP \fB\-\-validate\fP=false If true, use a schema to validate the input before sending it diff --git a/docs/man/man1/openshift-kube-apply.1 b/docs/man/man1/openshift-kube-apply.1 index 35d01e5bdec7..b4718faaace6 100644 --- a/docs/man/man1/openshift-kube-apply.1 +++ b/docs/man/man1/openshift-kube-apply.1 @@ -22,6 +22,10 @@ JSON and YAML formats are accepted. .SH OPTIONS +.PP +\fB\-\-dry\-run\fP=false + If true, only print the object that would be sent, without sending it. + .PP \fB\-f\fP, \fB\-\-filename\fP=[] Filename, directory, or URL to file that contains the configuration to apply @@ -30,9 +34,20 @@ JSON and YAML formats are accepted. \fB\-\-include\-extended\-apis\fP=true If true, include definitions of new APIs via calls to the API server. [default true] +.PP +\fB\-\-no\-headers\fP=false + When using the default or custom\-column output format, don't print headers. + .PP \fB\-o\fP, \fB\-\-output\fP="" - Output mode. Use "\-o name" for shorter output (resource/name). + Output format. One of: json|yaml|wide|name|custom\-columns=...|custom\-columns\-file=...|go\-template=...|go\-template\-file=...|jsonpath=...|jsonpath\-file=... See custom columns [ +\[la]http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns\[ra]], golang template [ +\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]] and jsonpath template [ +\[la]http://kubernetes.io/docs/user-guide/jsonpath\[ra]]. + +.PP +\fB\-\-output\-version\fP="" + Output the formatted object with the given group version (for ex: 'extensions/v1beta1'). .PP \fB\-\-overwrite\fP=true @@ -50,6 +65,23 @@ JSON and YAML formats are accepted. \fB\-\-schema\-cache\-dir\fP="\~/.kube/schema" If non\-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema' +.PP +\fB\-a\fP, \fB\-\-show\-all\fP=false + When printing, show all resources (default hide terminated pods.) + +.PP +\fB\-\-show\-labels\fP=false + When printing, show all labels as the last column (default hide labels column) + +.PP +\fB\-\-sort\-by\fP="" + If non\-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. '{.metadata.name}'). The field in the API resource specified by this JSONPath expression must be an integer or a string. + +.PP +\fB\-\-template\fP="" + Template string or path to template file to use when \-o=go\-template, \-o=go\-template\-file. The template format is golang templates [ +\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]]. + .PP \fB\-\-validate\fP=true If true, use a schema to validate the input before sending it diff --git a/docs/man/man1/openshift-kube-create.1 b/docs/man/man1/openshift-kube-create.1 index 825a6dd82928..06020330d739 100644 --- a/docs/man/man1/openshift-kube-create.1 +++ b/docs/man/man1/openshift-kube-create.1 @@ -20,6 +20,10 @@ JSON and YAML formats are accepted. .SH OPTIONS +.PP +\fB\-\-dry\-run\fP=false + If true, only print the object that would be sent, without sending it. + .PP \fB\-f\fP, \fB\-\-filename\fP=[] Filename, directory, or URL to file to use to create the resource @@ -28,9 +32,20 @@ JSON and YAML formats are accepted. \fB\-\-include\-extended\-apis\fP=true If true, include definitions of new APIs via calls to the API server. [default true] +.PP +\fB\-\-no\-headers\fP=false + When using the default or custom\-column output format, don't print headers. + .PP \fB\-o\fP, \fB\-\-output\fP="" - Output mode. Use "\-o name" for shorter output (resource/name). + Output format. One of: json|yaml|wide|name|custom\-columns=...|custom\-columns\-file=...|go\-template=...|go\-template\-file=...|jsonpath=...|jsonpath\-file=... See custom columns [ +\[la]http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns\[ra]], golang template [ +\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]] and jsonpath template [ +\[la]http://kubernetes.io/docs/user-guide/jsonpath\[ra]]. + +.PP +\fB\-\-output\-version\fP="" + Output the formatted object with the given group version (for ex: 'extensions/v1beta1'). .PP \fB\-\-record\fP=false @@ -48,6 +63,23 @@ JSON and YAML formats are accepted. \fB\-\-schema\-cache\-dir\fP="\~/.kube/schema" If non\-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema' +.PP +\fB\-a\fP, \fB\-\-show\-all\fP=false + When printing, show all resources (default hide terminated pods.) + +.PP +\fB\-\-show\-labels\fP=false + When printing, show all labels as the last column (default hide labels column) + +.PP +\fB\-\-sort\-by\fP="" + If non\-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. '{.metadata.name}'). The field in the API resource specified by this JSONPath expression must be an integer or a string. + +.PP +\fB\-\-template\fP="" + Template string or path to template file to use when \-o=go\-template, \-o=go\-template\-file. The template format is golang templates [ +\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]]. + .PP \fB\-\-validate\fP=true If true, use a schema to validate the input before sending it