-
-
Notifications
You must be signed in to change notification settings - Fork 36
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
feat(overrides): add JSON patch for deployments #875
base: main
Are you sure you want to change the base?
Conversation
Addresses #793 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this awesome contribution.
I really like this!
JsonPatch is way more common than overrides.
Both are maybe too much.
Maybe we can provide this feature for every components (adminstools, services, monitoring, istio, ...) ? In a next PR. This is already a good start!
webhooks/temporalcluster_webhook.go
Outdated
errs = append(errs, | ||
field.Forbidden( | ||
field.NewPath("spec", "services", "overrides", "deployment", "jsonPatch"), | ||
fmt.Sprintf("Can't set JsonPatch when Spec is set on Deployment override"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fmt.Sprintf("Can't set JsonPatch when Spec is set on Deployment override"), | |
"Can't set JsonPatch when Spec is set on Deployment override", |
No need for Sprintf
:)
webhooks/temporalcluster_webhook.go
Outdated
errs = append(errs, | ||
field.Forbidden( | ||
field.NewPath("spec", "services", string(service), "overrides", "deployment", "jsonPatch"), | ||
fmt.Sprintf("Can't set JsonPatch when Spec is set on Deployment override"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fmt.Sprintf("Can't set JsonPatch when Spec is set on Deployment override"), | |
"Can't set JsonPatch when Spec is set on Deployment override", |
Quality Gate passedIssues Measures |
Add additional functionality to override spec to allow for JSON patching. This is to allow users to patch arrays inside deployment overrides, as this functionality is not possible with StrategicPatchMerge. Follows similar functionality to what Kustomize provides.