Skip to content

✨ Add feature gates support for experimental API fields #4973

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/book/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
- [Object/DeepCopy](./reference/markers/object.md)
- [RBAC](./reference/markers/rbac.md)
- [Scaffold](./reference/markers/scaffold.md)
- [Feature Gates](./reference/markers/feature-gates.md)

- [controller-gen CLI](./reference/controller-gen.md)
- [completion](./reference/completion.md)
Expand Down
17 changes: 17 additions & 0 deletions docs/book/src/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,23 @@ Run the following command to create a new API (group/version) as `webapp/v1` and
kubebuilder create api --group webapp --version v1 --kind Guestbook
```

<aside class="note">
<h1>Feature Gates (Optional)</h1>

If you plan to use experimental features with feature gates, you can include the infrastructure during project creation:

```bash
# Initialize project with feature gate support
kubebuilder init --domain my.domain --repo my.domain/guestbook --with-feature-gates

# Or add feature gate support when creating APIs
kubebuilder create api --group webapp --version v1 --kind Guestbook --with-feature-gates
```

Feature gate infrastructure is only generated when explicitly requested or when `+feature-gate` markers are detected in your API types. See the [Feature Gates reference](/reference/markers/feature-gates.md) for more details.

</aside>

<aside class="note">
<h1>Press Options</h1>

Expand Down
4 changes: 2 additions & 2 deletions docs/book/src/reference/markers.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ controller-gen:

- `make manifests` generates Kubernetes object YAML, like
[CustomResourceDefinitions](./markers/crd.md),
[WebhookConfigurations](./markers/webhook.md), and [RBAC
roles](./markers/rbac.md).
[WebhookConfigurations](./markers/webhook.md), [RBAC
roles](./markers/rbac.md), and [Feature Gates](./markers/feature-gates.md).

- `make generate` generates code, like [runtime.Object/DeepCopy
implementations](./markers/object.md).
Expand Down
Loading