-
Notifications
You must be signed in to change notification settings - Fork 780
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
Dynamically change the API version of the PDB in Helm Chart #1502
Changes from 2 commits
84bea4a
65ecd98
b7164ae
4d46ffa
7dbacee
ae8cc57
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,4 +66,10 @@ var replacements = map[string]string{ | |
{{- range .Values.controllerManager.exemptNamespaces}} | ||
- --exempt-namespace={{ . }} | ||
{{- end }}`, | ||
`HELMSUBSET_PDB_POLICY_GROUP_VERSION: "" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This could break if the ordering of fields in the Kustomize output is not maintained. It might be better to modify https://github.com/open-policy-agent/gatekeeper/blob/master/cmd/build/helmify/main.go to directly detect these and make the replacement? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @maxsmythe I followed the documentation below and made some changes outside of
I will modify |
||
apiVersion: policy/v1beta1`: `{{- if .Capabilities.APIVersions.Has "policy/v1" }} | ||
apiVersion: policy/v1 | ||
{{ else }} | ||
apiVersion: policy/v1beta1 | ||
{{ end -}}`, | ||
} |
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.
nit:
HELMSUBST
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.
@maxsmythe thanks!