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

Add patch support (with merge strategy) for containers and env elements in the OpenAPI spec #15416

Open
idofl opened this issue Jul 28, 2024 · 0 comments
Labels
area/API API objects and controllers kind/feature Well-understood/specified features, ready for coding. kind/spec Discussion of how a feature should be exposed to customers.

Comments

@idofl
Copy link

idofl commented Jul 28, 2024

/area API
/kind spec

Describe the feature

When using kustomize on a knative yaml (e.g. to create a Cloud Run service), patching env elements from multiple yaml files causes the elements to be replaced instead of being merged. To support merging env elements, as well as other array elements, we need to add x-kubernetes-patch-* attributes to the openAPI spec.

For example:

"env": {
  "description": "List of environment variables to set in the container.\nCannot be updated.",
  "items": {},
  "type": "array",
  "x-kubernetes-patch-merge-key": "name",
  "x-kubernetes-patch-strategy": "merge"
},
@idofl idofl added the kind/feature Well-understood/specified features, ready for coding. label Jul 28, 2024
@knative-prow knative-prow bot added area/API API objects and controllers kind/spec Discussion of how a feature should be exposed to customers. labels Jul 28, 2024
@idofl idofl changed the title Add patch support (with merge strategy ) for containers and env elements in the OpenAPI spec Add patch support (with merge strategy) for containers and env elements in the OpenAPI spec Jul 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/API API objects and controllers kind/feature Well-understood/specified features, ready for coding. kind/spec Discussion of how a feature should be exposed to customers.
Projects
None yet
Development

No branches or pull requests

1 participant