-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add openapi schema for proper patching of CRDs #314
Conversation
@larsks is the openshift-api-schema.json file specific to a certain cluster? What if we want to patch a GrafanaDataSource CRD on the upcoming observability cluster that doesn't manage secrets well and requires the Patch Operator: apiVersion: integreatly.org/v1alpha1
kind: GrafanaDataSource |
It is not. It needs to be a superset of the resources available in all of our clusters (at least those we want to patch).
Then we would need to add the appropriate schemas to the file. I've partly addressed this in the README:
|
41fc511
to
32c483f
Compare
I've had a change of heart about how to implement this; I've moved all the sausage making to https://github.com/nerc-project/openshift-schemas; the generated schema is included here by URL. |
32c483f
to
ca564ba
Compare
Due to issues with the way Kustomize handles patching lists in custom resource types, we need to provide a complete OpenAPI schema that includes schema definitions for any CRDs we wish to patch. See kubernetes-sigs/kustomize#4613 for more discussion on this topic. See `cluster-scope/base/openapi/README.md` for more information.
ca564ba
to
4abace2
Compare
That new repo is very clever, I like your sausage recipe. |
So OCP-on-NERC#314 was totally broken; Kustomize can't import an openapi schema from a URL (which is annoying), so this includes the schema directly in the repository. Sorry for the noise!
Due to issues with the way Kustomize handles patching lists in custom
resource types, we need to provide a complete OpenAPI schema that
includes schema definitions for any CRDs we wish to patch.
See
cluster-scope/base/openapi/README.md
for more information.