Skip to content

Commit

Permalink
chore: Removing setting alpha flags for vap/vapb generation unless ex…
Browse files Browse the repository at this point in the history
…plicitly set through helm (#3481)

Signed-off-by: Jaydip Gabani <gabanijaydip@gmail.com>
  • Loading branch information
JaydipGabani authored Aug 12, 2024
1 parent 5ef6d32 commit b222d13
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 10 deletions.
8 changes: 4 additions & 4 deletions cmd/build/helmify/kustomize-for-helm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ spec:
- --mutating-webhook-configuration-name={{ .Values.mutatingWebhookName }}
- --external-data-provider-response-cache-ttl={{ .Values.externaldataProviderResponseCacheTTL }}
- --enable-k8s-native-validation={{ .Values.enableK8sNativeValidation }}
- --default-create-vap-for-templates={{ .Values.defaultCreateVAPForTemplates }}
- --default-create-vap-binding-for-constraints={{ .Values.defaultCreateVAPBindingForConstraints }}
- HELMBUST_ENABLE_TLS_APISERVER_AUTHENTICATION
- HELMSUBST_METRICS_BACKEND_ARG
- HELMSUBST_TLS_HEALTHCHECK_ENABLED_ARG
Expand All @@ -106,6 +104,8 @@ spec:
- HELMSUBST_DEPLOYMENT_CONTROLLER_MANAGER_EXEMPT_NAMESPACE_PREFIXES
- HELMSUBST_DEPLOYMENT_CONTROLLER_MANAGER_EXEMPT_NAMESPACE_SUFFIXES
- HELMSUBST_DEPLOYMENT_CONTROLLER_MANAGER_LOGFILE
- HELMSUBST_DEPLOYMENT_DEFAULT_CREATE_VAP_FOR_TEMPLATES
- HELMSUBST_DEPLOYMENT_DEFAULT_CREATE_VAPB_FOR_CONSTRAINTS
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
HELMSUBST_AUDIT_CONTROLLER_MANAGER_DEPLOYMENT_IMAGE_RELEASE: ""
ports:
Expand Down Expand Up @@ -188,8 +188,8 @@ spec:
- --disable-cert-rotation={{ or .Values.audit.disableCertRotation .Values.externalCertInjection.enabled }}
- --external-data-provider-response-cache-ttl={{ .Values.externaldataProviderResponseCacheTTL }}
- --enable-k8s-native-validation={{ .Values.enableK8sNativeValidation }}
- --default-create-vap-for-templates={{ .Values.defaultCreateVAPForTemplates }}
- --default-create-vap-binding-for-constraints={{ .Values.defaultCreateVAPBindingForConstraints }}
- HELMSUBST_DEPLOYMENT_DEFAULT_CREATE_VAP_FOR_TEMPLATES
- HELMSUBST_DEPLOYMENT_DEFAULT_CREATE_VAPB_FOR_CONSTRAINTS
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
HELMSUBST_AUDIT_CONTROLLER_MANAGER_DEPLOYMENT_IMAGE_RELEASE: ""
ports:
Expand Down
10 changes: 10 additions & 0 deletions cmd/build/helmify/replacements.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,4 +309,14 @@ var replacements = map[string]string{
{{- if .Values.audit.logFile}}
- --log-file={{ .Values.audit.logFile }}
{{- end }}`,

"- HELMSUBST_DEPLOYMENT_DEFAULT_CREATE_VAP_FOR_TEMPLATES": `
{{- if hasKey .Values "defaultCreateVAPForTemplates"}}
- --default-create-vap-for-templates={{ .Values.defaultCreateVAPForTemplates }}
{{- end }}`,

"- HELMSUBST_DEPLOYMENT_DEFAULT_CREATE_VAPB_FOR_CONSTRAINTS": `
{{- if hasKey .Values "defaultCreateVAPBindingForConstraints"}}
- --default-create-vap-binding-for-constraints={{ .Values.defaultCreateVAPBindingForConstraints }}
{{- end }}`,
}
2 changes: 0 additions & 2 deletions cmd/build/helmify/static/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ auditEventsInvolvedNamespace: false
resourceQuota: true
externaldataProviderResponseCacheTTL: 3m
enableK8sNativeValidation: true
defaultCreateVAPForTemplates: false
defaultCreateVAPBindingForConstraints: false
image:
repository: openpolicyagent/gatekeeper
crdRepository: openpolicyagent/gatekeeper-crds
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,14 @@ spec:
- --disable-cert-rotation={{ or .Values.audit.disableCertRotation .Values.externalCertInjection.enabled }}
- --external-data-provider-response-cache-ttl={{ .Values.externaldataProviderResponseCacheTTL }}
- --enable-k8s-native-validation={{ .Values.enableK8sNativeValidation }}

{{- if hasKey .Values "defaultCreateVAPForTemplates"}}
- --default-create-vap-for-templates={{ .Values.defaultCreateVAPForTemplates }}
{{- end }}

{{- if hasKey .Values "defaultCreateVAPBindingForConstraints"}}
- --default-create-vap-binding-for-constraints={{ .Values.defaultCreateVAPBindingForConstraints }}
{{- end }}
command:
- /manager
env:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ spec:
- --mutating-webhook-configuration-name={{ .Values.mutatingWebhookName }}
- --external-data-provider-response-cache-ttl={{ .Values.externaldataProviderResponseCacheTTL }}
- --enable-k8s-native-validation={{ .Values.enableK8sNativeValidation }}
- --default-create-vap-for-templates={{ .Values.defaultCreateVAPForTemplates }}
- --default-create-vap-binding-for-constraints={{ .Values.defaultCreateVAPBindingForConstraints }}
{{ if ne .Values.controllerManager.clientCertName "" }}- --client-cert-name={{ .Values.controllerManager.clientCertName }}{{- end }}

{{- range .Values.metricsBackends}}
Expand Down Expand Up @@ -108,6 +106,14 @@ spec:
{{- if .Values.controllerManager.logFile}}
- --log-file={{ .Values.controllerManager.logFile }}
{{- end }}

{{- if hasKey .Values "defaultCreateVAPForTemplates"}}
- --default-create-vap-for-templates={{ .Values.defaultCreateVAPForTemplates }}
{{- end }}

{{- if hasKey .Values "defaultCreateVAPBindingForConstraints"}}
- --default-create-vap-binding-for-constraints={{ .Values.defaultCreateVAPBindingForConstraints }}
{{- end }}
command:
- /manager
env:
Expand Down
2 changes: 0 additions & 2 deletions manifest_staging/charts/gatekeeper/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ auditEventsInvolvedNamespace: false
resourceQuota: true
externaldataProviderResponseCacheTTL: 3m
enableK8sNativeValidation: true
defaultCreateVAPForTemplates: false
defaultCreateVAPBindingForConstraints: false
image:
repository: openpolicyagent/gatekeeper
crdRepository: openpolicyagent/gatekeeper-crds
Expand Down

0 comments on commit b222d13

Please # to comment.