diff --git a/docs/cmd/kn_container_add.md b/docs/cmd/kn_container_add.md index 36e33a11a..9dcc71be9 100644 --- a/docs/cmd/kn_container_add.md +++ b/docs/cmd/kn_container_add.md @@ -35,7 +35,6 @@ kn container add NAME --env-file string Path to a file containing environment variables (e.g. --env-file=/home/knative/service1/env). --env-from stringArray Add environment variables from a ConfigMap (prefix cm: or config-map:) or a Secret (prefix secret:). Example: --env-from cm:myconfigmap or --env-from secret:mysecret. You can use this flag multiple times. To unset a ConfigMap/Secret reference, append "-" to the name, e.g. --env-from cm:myconfigmap-. --env-value-from stringArray Add environment variable from a value of key in ConfigMap (prefix cm: or config-map:) or a Secret (prefix sc: or secret:). Example: --env-value-from NAME=cm:myconfigmap:key or --env-value-from NAME=secret:mysecret:key. You can use this flag multiple times. To unset a value from a ConfigMap/Secret key reference, append "-" to the key, e.g. --env-value-from ENV-. - --extra-containers string Deprecated, use --containers instead. -h, --help help for add --image string Image to run. --limit strings The resource requirement limits for this Service. For example, 'cpu=100m,memory=256Mi'. You can use this flag multiple times. To unset a resource limit, append "-" to the resource name, e.g. '--limit memory-'. diff --git a/docs/cmd/kn_service_apply.md b/docs/cmd/kn_service_apply.md index a1187a588..064ffaa4f 100644 --- a/docs/cmd/kn_service_apply.md +++ b/docs/cmd/kn_service_apply.md @@ -33,18 +33,14 @@ kn service apply s0 --filename my-svc.yml --annotation-revision stringArray Revision annotation to set. name=value; you may provide this flag any number of times to set multiple annotations. To unset, specify the annotation name followed by a "-" (e.g., name-). This flag takes precedence over the "annotation" flag. --annotation-service stringArray Service annotation to set. name=value; you may provide this flag any number of times to set multiple annotations. To unset, specify the annotation name followed by a "-" (e.g., name-). This flag takes precedence over the "annotation" flag. --arg stringArray Add argument to the container command. Example: --arg myArg1 --arg --myArg2 --arg myArg3=3. You can use this flag multiple times. - --autoscale-window string Deprecated option, please use --scale-window --cluster-local Specify that the service be private. (--no-cluster-local will make the service publicly available) --cmd stringArray Specify command to be used as entrypoint instead of default one. Example: --cmd /app/start or --cmd sh --cmd /app/start.sh or --cmd /app/start --arg myArg to pass additional arguments. --concurrency-limit int Hard Limit of concurrent requests to be processed by a single replica. - --concurrency-target int Deprecated, use --scale-target instead. - --concurrency-utilization int Deprecated, use --scale-utilization instead. (default 70) --containers string Specify path to file including definition for additional containers, alternatively use '-' to read from stdin. Example: --containers ./containers.yaml or --containers -. -e, --env stringArray Environment variable to set. NAME=value; you may provide this flag any number of times to set multiple environment variables. To unset, specify the environment variable name followed by a "-" (e.g., NAME-). --env-file string Path to a file containing environment variables (e.g. --env-file=/home/knative/service1/env). --env-from stringArray Add environment variables from a ConfigMap (prefix cm: or config-map:) or a Secret (prefix secret:). Example: --env-from cm:myconfigmap or --env-from secret:mysecret. You can use this flag multiple times. To unset a ConfigMap/Secret reference, append "-" to the name, e.g. --env-from cm:myconfigmap-. --env-value-from stringArray Add environment variable from a value of key in ConfigMap (prefix cm: or config-map:) or a Secret (prefix sc: or secret:). Example: --env-value-from NAME=cm:myconfigmap:key or --env-value-from NAME=secret:mysecret:key. You can use this flag multiple times. To unset a value from a ConfigMap/Secret key reference, append "-" to the key, e.g. --env-value-from ENV-. - --extra-containers string Deprecated, use --containers instead. -f, --filename string Create a service from file. The created service can be further modified by combining with other options. For example, -f /path/to/file --env NAME=value adds also an environment variable. --force Create service forcefully, replaces existing service if any. -h, --help help for apply diff --git a/docs/cmd/kn_service_create.md b/docs/cmd/kn_service_create.md index 596e5dde8..af2e7cbb9 100644 --- a/docs/cmd/kn_service_create.md +++ b/docs/cmd/kn_service_create.md @@ -58,18 +58,14 @@ kn service create NAME --image IMAGE --annotation-revision stringArray Revision annotation to set. name=value; you may provide this flag any number of times to set multiple annotations. To unset, specify the annotation name followed by a "-" (e.g., name-). This flag takes precedence over the "annotation" flag. --annotation-service stringArray Service annotation to set. name=value; you may provide this flag any number of times to set multiple annotations. To unset, specify the annotation name followed by a "-" (e.g., name-). This flag takes precedence over the "annotation" flag. --arg stringArray Add argument to the container command. Example: --arg myArg1 --arg --myArg2 --arg myArg3=3. You can use this flag multiple times. - --autoscale-window string Deprecated option, please use --scale-window --cluster-local Specify that the service be private. (--no-cluster-local will make the service publicly available) --cmd stringArray Specify command to be used as entrypoint instead of default one. Example: --cmd /app/start or --cmd sh --cmd /app/start.sh or --cmd /app/start --arg myArg to pass additional arguments. --concurrency-limit int Hard Limit of concurrent requests to be processed by a single replica. - --concurrency-target int Deprecated, use --scale-target instead. - --concurrency-utilization int Deprecated, use --scale-utilization instead. (default 70) --containers string Specify path to file including definition for additional containers, alternatively use '-' to read from stdin. Example: --containers ./containers.yaml or --containers -. -e, --env stringArray Environment variable to set. NAME=value; you may provide this flag any number of times to set multiple environment variables. To unset, specify the environment variable name followed by a "-" (e.g., NAME-). --env-file string Path to a file containing environment variables (e.g. --env-file=/home/knative/service1/env). --env-from stringArray Add environment variables from a ConfigMap (prefix cm: or config-map:) or a Secret (prefix secret:). Example: --env-from cm:myconfigmap or --env-from secret:mysecret. You can use this flag multiple times. To unset a ConfigMap/Secret reference, append "-" to the name, e.g. --env-from cm:myconfigmap-. --env-value-from stringArray Add environment variable from a value of key in ConfigMap (prefix cm: or config-map:) or a Secret (prefix sc: or secret:). Example: --env-value-from NAME=cm:myconfigmap:key or --env-value-from NAME=secret:mysecret:key. You can use this flag multiple times. To unset a value from a ConfigMap/Secret key reference, append "-" to the key, e.g. --env-value-from ENV-. - --extra-containers string Deprecated, use --containers instead. -f, --filename string Create a service from file. The created service can be further modified by combining with other options. For example, -f /path/to/file --env NAME=value adds also an environment variable. --force Create service forcefully, replaces existing service if any. -h, --help help for create diff --git a/docs/cmd/kn_service_update.md b/docs/cmd/kn_service_update.md index 07313c1d4..5e0c6787f 100644 --- a/docs/cmd/kn_service_update.md +++ b/docs/cmd/kn_service_update.md @@ -47,18 +47,14 @@ kn service update NAME --annotation-revision stringArray Revision annotation to set. name=value; you may provide this flag any number of times to set multiple annotations. To unset, specify the annotation name followed by a "-" (e.g., name-). This flag takes precedence over the "annotation" flag. --annotation-service stringArray Service annotation to set. name=value; you may provide this flag any number of times to set multiple annotations. To unset, specify the annotation name followed by a "-" (e.g., name-). This flag takes precedence over the "annotation" flag. --arg stringArray Add argument to the container command. Example: --arg myArg1 --arg --myArg2 --arg myArg3=3. You can use this flag multiple times. - --autoscale-window string Deprecated option, please use --scale-window --cluster-local Specify that the service be private. (--no-cluster-local will make the service publicly available) --cmd stringArray Specify command to be used as entrypoint instead of default one. Example: --cmd /app/start or --cmd sh --cmd /app/start.sh or --cmd /app/start --arg myArg to pass additional arguments. --concurrency-limit int Hard Limit of concurrent requests to be processed by a single replica. - --concurrency-target int Deprecated, use --scale-target instead. - --concurrency-utilization int Deprecated, use --scale-utilization instead. (default 70) --containers string Specify path to file including definition for additional containers, alternatively use '-' to read from stdin. Example: --containers ./containers.yaml or --containers -. -e, --env stringArray Environment variable to set. NAME=value; you may provide this flag any number of times to set multiple environment variables. To unset, specify the environment variable name followed by a "-" (e.g., NAME-). --env-file string Path to a file containing environment variables (e.g. --env-file=/home/knative/service1/env). --env-from stringArray Add environment variables from a ConfigMap (prefix cm: or config-map:) or a Secret (prefix secret:). Example: --env-from cm:myconfigmap or --env-from secret:mysecret. You can use this flag multiple times. To unset a ConfigMap/Secret reference, append "-" to the name, e.g. --env-from cm:myconfigmap-. --env-value-from stringArray Add environment variable from a value of key in ConfigMap (prefix cm: or config-map:) or a Secret (prefix sc: or secret:). Example: --env-value-from NAME=cm:myconfigmap:key or --env-value-from NAME=secret:mysecret:key. You can use this flag multiple times. To unset a value from a ConfigMap/Secret key reference, append "-" to the key, e.g. --env-value-from ENV-. - --extra-containers string Deprecated, use --containers instead. -h, --help help for update --image string Image to run. -l, --label stringArray Labels to set for both Service and Revision. name=value; you may provide this flag any number of times to set multiple labels. To unset, specify the label name followed by a "-" (e.g., name-). diff --git a/docs/cmd/kn_source_container_create.md b/docs/cmd/kn_source_container_create.md index a7cd5ac57..f2c730eaa 100644 --- a/docs/cmd/kn_source_container_create.md +++ b/docs/cmd/kn_source_container_create.md @@ -24,7 +24,6 @@ kn source container create NAME --image IMAGE --sink SINK --env-file string Path to a file containing environment variables (e.g. --env-file=/home/knative/service1/env). --env-from stringArray Add environment variables from a ConfigMap (prefix cm: or config-map:) or a Secret (prefix secret:). Example: --env-from cm:myconfigmap or --env-from secret:mysecret. You can use this flag multiple times. To unset a ConfigMap/Secret reference, append "-" to the name, e.g. --env-from cm:myconfigmap-. --env-value-from stringArray Add environment variable from a value of key in ConfigMap (prefix cm: or config-map:) or a Secret (prefix sc: or secret:). Example: --env-value-from NAME=cm:myconfigmap:key or --env-value-from NAME=secret:mysecret:key. You can use this flag multiple times. To unset a value from a ConfigMap/Secret key reference, append "-" to the key, e.g. --env-value-from ENV-. - --extra-containers string Deprecated, use --containers instead. -h, --help help for create --image string Image to run. --limit strings The resource requirement limits for this Service. For example, 'cpu=100m,memory=256Mi'. You can use this flag multiple times. To unset a resource limit, append "-" to the resource name, e.g. '--limit memory-'. diff --git a/docs/cmd/kn_source_container_update.md b/docs/cmd/kn_source_container_update.md index 672eb5a39..cff08abc9 100644 --- a/docs/cmd/kn_source_container_update.md +++ b/docs/cmd/kn_source_container_update.md @@ -24,7 +24,6 @@ kn source container update NAME --image IMAGE --env-file string Path to a file containing environment variables (e.g. --env-file=/home/knative/service1/env). --env-from stringArray Add environment variables from a ConfigMap (prefix cm: or config-map:) or a Secret (prefix secret:). Example: --env-from cm:myconfigmap or --env-from secret:mysecret. You can use this flag multiple times. To unset a ConfigMap/Secret reference, append "-" to the name, e.g. --env-from cm:myconfigmap-. --env-value-from stringArray Add environment variable from a value of key in ConfigMap (prefix cm: or config-map:) or a Secret (prefix sc: or secret:). Example: --env-value-from NAME=cm:myconfigmap:key or --env-value-from NAME=secret:mysecret:key. You can use this flag multiple times. To unset a value from a ConfigMap/Secret key reference, append "-" to the key, e.g. --env-value-from ENV-. - --extra-containers string Deprecated, use --containers instead. -h, --help help for update --image string Image to run. --limit strings The resource requirement limits for this Service. For example, 'cpu=100m,memory=256Mi'. You can use this flag multiple times. To unset a resource limit, append "-" to the resource name, e.g. '--limit memory-'. diff --git a/pkg/kn/commands/service/configuration_edit_flags.go b/pkg/kn/commands/service/configuration_edit_flags.go index c54add5b5..52461481b 100644 --- a/pkg/kn/commands/service/configuration_edit_flags.go +++ b/pkg/kn/commands/service/configuration_edit_flags.go @@ -103,6 +103,7 @@ func (p *ConfigurationEditFlags) addSharedFlags(command *cobra.Command) { // DEPRECATED since 1.0 command.Flags().StringVar(&p.ScaleWindow, "autoscale-window", "", "Deprecated option, please use --scale-window") p.markFlagMakesRevision("autoscale-window") + command.Flags().MarkHidden("autoscale-window") command.Flags().StringVar(&p.ScaleWindow, "scale-window", "", "Duration to look back for making auto-scaling decisions. The service is scaled to zero if no request was received in during that time. (eg: 10s)") p.markFlagMakesRevision("scale-window") @@ -114,6 +115,7 @@ func (p *ConfigurationEditFlags) addSharedFlags(command *cobra.Command) { command.Flags().IntVar(&p.ScaleTarget, "concurrency-target", 0, "Deprecated, use --scale-target instead.") p.markFlagMakesRevision("concurrency-target") + command.Flags().MarkHidden("concurrency-target") command.Flags().IntVar(&p.ScaleTarget, "scale-target", 0, "Recommendation for when to scale up based on the concurrent number of incoming request. "+ @@ -128,6 +130,7 @@ func (p *ConfigurationEditFlags) addSharedFlags(command *cobra.Command) { command.Flags().IntVar(&p.ScaleUtilization, "concurrency-utilization", 70, "Deprecated, use --scale-utilization instead.") p.markFlagMakesRevision("concurrency-utilization") + command.Flags().MarkHidden("concurrency-utilization") command.Flags().IntVar(&p.ScaleUtilization, "scale-utilization", 70, "Percentage of concurrent requests utilization before scaling up.") diff --git a/pkg/kn/flags/podspec.go b/pkg/kn/flags/podspec.go index 9dd3d5ef0..0dee6dc43 100644 --- a/pkg/kn/flags/podspec.go +++ b/pkg/kn/flags/podspec.go @@ -132,6 +132,7 @@ func (p *PodSpecFlags) AddFlags(flagset *pflag.FlagSet) []string { // DEPRECATED since 1.0 flagset.StringVarP(&p.ExtraContainers, "extra-containers", "", "", "Deprecated, use --containers instead.") + flagset.MarkHidden("extra-containers") flagNames = append(flagNames, "containers") flagset.StringVarP(&p.ExtraContainers, "containers", "", "",