kubernetes/cmd
Patrick Ohly ea3f25f49b logs: add alpha+beta feature gates
It is useful to have the ability to control whether alpha or beta features are
enabled. We can group features under LoggingAlphaOptions and LoggingBetaOptions
because the configuration is designed so that each feature individually must be
enabled via its own option.

Currently, the JSON format itself is beta (graduated in 1.23) but additional
options for it were only added in 1.23 and thus are still alpha:

  $ go run ./staging/src/k8s.io/component-base/logs/example/cmd/logger.go --logging-format=json --log-json-split-stream --log-json-info-buffer-size 1M --feature-gates LoggingBetaOptions=false
  [format: Forbidden: Log format json is BETA and disabled, see LoggingBetaOptions feature, options.json.splitStream: Forbidden: Feature LoggingAlphaOptions is disabled, options.json.infoBufferSize: Forbidden: Feature LoggingAlphaOptions is disabled]

  $ go run ./staging/src/k8s.io/component-base/logs/example/cmd/logger.go --logging-format=json --log-json-split-stream --log-json-info-buffer-size 1M
  [options.json.splitStream: Forbidden: Feature LoggingAlphaOptions is disabled, options.json.infoBufferSize: Forbidden: Feature LoggingAlphaOptions is disabled]

This is the same approach that was taken for CPUManagerPolicyAlphaOptions and
CPUManagerPolicyBetaOptions.

In order to test this without modifying the global feature gate in a test file,
ValidateKubeletConfiguration must take a feature gate as argument.
2022-06-17 20:22:13 +02:00
..
clicheck Update sig-cli OWNERS 2022-02-14 10:55:35 -07:00
cloud-controller-manager Merge pull request #107293 from dims/jan-1-owners-cleanup 2022-01-13 10:30:30 -08:00
dependencycheck replace deprecated io/ioutil with os and io for cmd 2022-02-01 13:59:41 +08:00
dependencyverifier replace deprecated io/ioutil with os and io for cmd 2022-02-01 13:59:41 +08:00
gendocs Add cli-maintainers as approvers to cmd/(gendocs|genman|genyaml) 2022-03-28 14:00:35 +02:00
genkubedocs replace deprecated io/ioutil with os and io for cmd 2022-02-01 13:59:41 +08:00
genman Add cli-maintainers as approvers to cmd/(gendocs|genman|genyaml) 2022-03-28 14:00:35 +02:00
genswaggertypedocs hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
genutils hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
genyaml Add cli-maintainers as approvers to cmd/(gendocs|genman|genyaml) 2022-03-28 14:00:35 +02:00
importverifier replace deprecated io/ioutil with os and io for cmd 2022-02-01 13:59:41 +08:00
kube-apiserver logs: make LoggingConfiguration an unversioned API 2022-06-17 20:22:13 +02:00
kube-controller-manager logs: make LoggingConfiguration an unversioned API 2022-06-17 20:22:13 +02:00
kube-proxy Enable local traffic detection using the interface options 2022-03-25 20:06:12 +01:00
kube-scheduler logs: make LoggingConfiguration an unversioned API 2022-06-17 20:22:13 +02:00
kubeadm kubeadm: ensure kubelet patch results are in YAML 2022-06-15 13:38:04 +03:00
kubectl Update sig-cli OWNERS 2022-02-14 10:55:35 -07:00
kubectl-convert Update sig-cli OWNERS 2022-02-14 10:55:35 -07:00
kubelet logs: add alpha+beta feature gates 2022-06-17 20:22:13 +02:00
kubemark Add option to bootstrap kubeconfig for hollow-node 2022-02-01 11:56:02 +00:00
linkcheck replace deprecated io/ioutil with os and io for cmd 2022-02-01 13:59:41 +08:00
preferredimports replace deprecated io/ioutil with os and io for cmd 2022-02-01 13:59:41 +08:00
prune-junit-xml Correctly attribute some datastructures from gotestsum repository 2022-04-01 14:49:15 -04:00
yamlfmt replace deprecated io/ioutil with os and io for cmd 2022-02-01 13:59:41 +08:00
OWNERS Update dims as approver for some top level dirs 2021-11-12 08:50:24 -05:00