kubebuilder
kubebuilder copied to clipboard
Kustomize support for config/samples
What do you want to happen?
When I run kubebuilder create api
, a sample CR gets created in config/samples
. I'm wondering if there is any appetite for config/samples
to be a valid kustomize directory, such that one could run kustomize build config/samples
to get kubectl-appliable yaml.
If we were to add such a feature, I think we would add a scaffold that supports updates via a marker such that kubebuilder create api
would append the new sample file to the resources
list in config/samples/kustomization.yaml
.
Use cases:
- After running
make deploy
, I want to be able to quickly spin up a sample set of CRs usingkustomize build config/samples | kubectl apply -f -
- I want to be able to utilize all of the benefits of kustomize with the samples, e.g. to set a namePrefix, commonLabels, overlays, etc.
- I want to include samples in other kustomize scenarios. E.g.:
- Generating Operator Lifecycle Manager (OLM) manifests where the combination of
config/default
andconfig/samples
is useful. - Executing schema validation of samples by building CRDs and samples and verifying CRDs exist for each sample and that each sample validates against the CRD schema. This would combine
config/crd
andconfig/samples
.
- Generating Operator Lifecycle Manager (OLM) manifests where the combination of
Is there currently another issue associated with this? Not that I could find.
Does it require a particular kubernetes version? No
/kind feature
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
/remove-lifecycle stale
Just a note: #1831 approach may be also considered
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-contributor-experience at kubernetes/community. /lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten
/lifecycle frozen
Since this has label triage/accepted
It should be done in the kustomize/v2-alpha plugin.
@estroz I unassigned this one since we have no longer with and others might able to help with this one.
/assign