Skip to content
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

Kustomize support for config/samples #1573

Closed
joelanford opened this issue Jun 23, 2020 · 9 comments · Fixed by #3084
Closed

Kustomize support for config/samples #1573

joelanford opened this issue Jun 23, 2020 · 9 comments · Fixed by #3084
Assignees
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@joelanford
Copy link
Member

joelanford commented Jun 23, 2020

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 using kustomize 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 and config/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 and config/samples.

Is there currently another issue associated with this?
Not that I could find.

Does it require a particular kubernetes version? No

/kind feature

@joelanford joelanford added the kind/feature Categorizes issue or PR as related to a new feature. label Jun 23, 2020
@fejta-bot
Copy link

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

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 21, 2020
@camilamacedo86
Copy link
Member

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 21, 2020
@camilamacedo86 camilamacedo86 added the triage/accepted Indicates an issue or PR is ready to be actively worked on. label Dec 1, 2020
@Adirio
Copy link
Contributor

Adirio commented Dec 1, 2020

Just a note: #1831 approach may be also considered

@fejta-bot
Copy link

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

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Mar 1, 2021
@fejta-bot
Copy link

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

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Mar 31, 2021
@joelanford
Copy link
Member Author

/lifecycle frozen

Since this has label triage/accepted

@k8s-ci-robot k8s-ci-robot added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. labels Apr 22, 2021
@camilamacedo86
Copy link
Member

It should be done in the kustomize/v2-alpha plugin.

@camilamacedo86 camilamacedo86 added help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. labels Jul 1, 2022
@camilamacedo86 camilamacedo86 added this to the kustomize/v2-alpha milestone Jul 1, 2022
@camilamacedo86
Copy link
Member

@estroz I unassigned this one since we have no longer with and others might able to help with this one.

@Kavinjsir
Copy link
Contributor

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants