kubebuilder icon indicating copy to clipboard operation
kubebuilder copied to clipboard

Feature Gates

Open erictune opened this issue 6 years ago • 3 comments
trafficstars

Core Kubernetes types have Feature Gates. They are documented here: https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/

This is a good practice for anyone, whether they are building a CRD as part of the K8s org, or their own API.

Sadly, CRDs don't have feature gate support built into them.

KubeBuilder could close this gap. It could provide a feature-gate feature.
It might work like this:

  • Developer tags a field in an API as belonging to a feature gate, like `// +feature-gate the-new-hotness
  • KB (or controller-runtime or controller-tools) makes your controller binary have a --feature-gates flag.
  • all "gate names" mentioned in tags are added as valid comma-separated arguments to --feature-gates flag.
  • When installing the CRD, controller-tools will blank out disabled parts of the schema. This causes pruning to prune them.
  • Generated documentation lists the supported feature gate strings.

/kind feature

erictune avatar Jul 09 '19 23:07 erictune

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale

fejta-bot avatar Oct 08 '19 00:10 fejta-bot

/lifecycle frozen

DirectXMan12 avatar Oct 11 '19 17:10 DirectXMan12

It is related to: https://github.com/kubernetes-sigs/controller-tools/issues/600 Also, if you would like to understand more about the use cases see: https://www.youtube.com/watch?v=AJa2B-twtG4

camilamacedo86 avatar Feb 19 '23 09:02 camilamacedo86