Skip to content

Feature Gates  #849

@erictune

Description

@erictune

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

Metadata

Metadata

Assignees

Labels

help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/featureCategorizes issue or PR as related to a new feature.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.priority/backlogHigher priority than priority/awaiting-more-evidence.triage/blocked

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions