Closed
Description
Enhancement Description
- One-line enhancement description (can be used as a release note): Add an
openapi
field to the kustomization file to allow users to specify their own OpenAPI schemas to use - Kubernetes Enhancement Proposal:
- Discussion Link: Strategic merge support for CRDs kubernetes-sigs/kustomize#2825
- Primary contact (assignee): @natasha41575
- Responsible SIGs: cli
- Enhancement target (which target equals to which milestone):
- Beta release target (x.y): 1.22
- Beta
- Docs (
k/website
) update PR(s): update kustomize docs for patches and openapi kubernetes-sigs/cli-experimental#131
Please keep this description up to date. This will help the Enhancement Team to track the evolution of the enhancement efficiently.
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
k8s-ci-robot commentedon Dec 21, 2020
@natasha41575: The label(s)
sig/sig-cli
cannot be applied, because the repository doesn't have themIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
natasha41575 commentedon Dec 21, 2020
/sig cli
kustomize openapi fetch
command to get schema from local cluster kubernetes-sigs/kustomize#3621afirth commentedon May 7, 2021
@natasha41575 thanks heaps for implementing this!
2 Qs:
1.
when running
kustomize openapi fetch <CRD>
it seems the info is printed to stdout, which results in an invalid schema. Is there an option I'm missing here?Additionally when piping the output this seems to leave kubectl broken (proxy stays running forever)
Let me know if you want me to open tix for these somewhere else. Thanks again for building this!
natasha41575 commentedon May 7, 2021
Thanks for your questions! There are a couple things here.
kustomize openapi fetch
does not have an argument. It will hit the /openapi/v2 endpoint of the apiserver and return the whole document; there is no<CRD>
argument. I'd be very surprised and confused to learn that adding a<CRD>
changes the output at all.I also realized that "Fetching schema from cluster" was printed out, which messes things up for people who are piping stdout. I've removed it, see update openapi fetch command kubernetes-sigs/kustomize#3854. This will be reflected in the next release of kustomize.
With the same PR mentioned above, the proxy/port shouldn't be an issue because the mechanism for hitting the /openapi/v2 will be different.
Thank you for using this feature and testing it out for us. Hopefully your issues will be resolved in the next release.
KnVerey commentedon May 19, 2021
/kind feature
/assign @natasha41575
@natasha41575 I'm thinking this should have "/stage beta" since it has already been implemented in Kustomization (which itself is a beta kind) and is not behind an alpha flag. I'm also thinking the milestone should be set to 1.22, since that's both when the feature merged in Kustomize and likely the kubectl release it will show up in. Could you please update the enhancement description? (with whatever you think is best if you don't agree with my assessment)
5 remaining items