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

Feat/add dns policy #1624

Merged
merged 9 commits into from
Oct 26, 2021
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion charts/gatekeeper/templates/gatekeeper-audit-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,12 @@ spec:
runAsNonRoot: true
runAsUser: 1000
hostNetwork: {{ .Values.audit.hostNetwork }}
dnsPolicy: {{ .Values.audit.dnsPolicy | default Default }}
notjames marked this conversation as resolved.
Show resolved Hide resolved
imagePullSecrets:
{{- toYaml .Values.image.pullSecrets | nindent 8 }}
nodeSelector:
{{- toYaml .Values.audit.nodeSelector | nindent 8 }}
{{- if .Values.audit.priorityClassName }}
{{- if .Values.audit.priorityClassName }}
priorityClassName: {{ .Values.audit.priorityClassName }}
{{- end }}
serviceAccountName: gatekeeper-admin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ spec:
- --exempt-namespace={{ .Release.Namespace }}
- --operation=webhook
- --enable-mutation={{ .Values.experimentalEnableMutation}}

{{- range .Values.disabledBuiltins}}
- --disable-opa-builtin={{ . }}
{{- end }}

{{- range .Values.controllerManager.exemptNamespaces}}
- --exempt-namespace={{ . }}
{{- end }}

{{- range .Values.controllerManager.exemptNamespacePrefixes}}
- --exempt-namespace-prefix={{ . }}
{{- end }}
Expand Down Expand Up @@ -112,11 +112,12 @@ spec:
name: cert
readOnly: true
hostNetwork: {{ .Values.controllerManager.hostNetwork }}
dnsPolicy: {{ .Values.controllerManager.dnsPolicy | default Default }}
imagePullSecrets:
{{- toYaml .Values.image.pullSecrets | nindent 8 }}
nodeSelector:
{{- toYaml .Values.controllerManager.nodeSelector | nindent 8 }}
{{- if .Values.controllerManager.priorityClassName }}
{{- if .Values.controllerManager.priorityClassName }}
priorityClassName: {{ .Values.controllerManager.priorityClassName }}
{{- end }}
serviceAccountName: gatekeeper-admin
Expand Down
2 changes: 2 additions & 0 deletions charts/gatekeeper/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ controllerManager:
exemptNamespaces: []
exemptNamespacePrefixes: []
hostNetwork: false
dnsPolicy: Default
port: 8443
metricsPort: 8888
healthPort: 9090
Expand Down Expand Up @@ -67,6 +68,7 @@ controllerManager:
memory: 256Mi
audit:
hostNetwork: false
dnsPolicy: Default
metricsPort: 8888
healthPort: 9090
priorityClassName: system-cluster-critical
Expand Down
2 changes: 2 additions & 0 deletions cmd/build/helmify/kustomize-for-helm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ spec:
imagePullSecrets:
HELMSUBST_DEPLOYMENT_CONTROLLER_MANAGER_IMAGE_PULL_SECRETS: ""
hostNetwork: HELMSUBST_DEPLOYMENT_CONTROLLER_MANAGER_HOST_NETWORK
dnsPolicy: HELMSUBST_DEPLOYMENT_CONTROLLER_MANAGER_DNS_POLICY
---
apiVersion: apps/v1
kind: Deployment
Expand Down Expand Up @@ -168,6 +169,7 @@ spec:
imagePullSecrets:
HELMSUBST_DEPLOYMENT_AUDIT_IMAGE_PULL_SECRETS: ""
hostNetwork: HELMSUBST_DEPLOYMENT_AUDIT_HOST_NETWORK
dnsPolicy: HELMSUBST_DEPLOYMENT_AUDIT_DNS_POLICY
---
apiVersion: v1
kind: Secret
Expand Down
4 changes: 4 additions & 0 deletions cmd/build/helmify/replacements.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ var replacements = map[string]string{

"HELMSUBST_DEPLOYMENT_CONTROLLER_MANAGER_HOST_NETWORK": `{{ .Values.controllerManager.hostNetwork }}`,

"HELMSUBST_DEPLOYMENT_CONTROLLER_MANAGER_DNS_POLICY": `{{ .Values.controllerManager.dnsPolicy }}`,

"HELMSUBST_DEPLOYMENT_CONTROLLER_MANAGER_PORT": `{{ .Values.controllerManager.port }}`,

"HELMSUBST_DEPLOYMENT_CONTROLLER_MANAGER_HEALTH_PORT": `{{ .Values.controllerManager.healthPort }}`,
Expand All @@ -15,6 +17,8 @@ var replacements = map[string]string{

"HELMSUBST_DEPLOYMENT_AUDIT_HOST_NETWORK": `{{ .Values.audit.hostNetwork }}`,

"HELMSUBST_DEPLOYMENT_AUDIT_DNS_POLICY": `{{ .Values.audit.dnsPolicy }}`,

"HELMSUBST_DEPLOYMENT_AUDIT_HEALTH_PORT": `{{ .Values.audit.healthPort }}`,

"HELMSUBST_DEPLOYMENT_AUDIT_METRICS_PORT": `{{ .Values.audit.metricsPort }}`,
Expand Down
2 changes: 2 additions & 0 deletions cmd/build/helmify/static/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ controllerManager:
exemptNamespaces: []
exemptNamespacePrefixes: []
hostNetwork: false
dnsPolicy: Default
port: 8443
metricsPort: 8888
healthPort: 9090
Expand Down Expand Up @@ -67,6 +68,7 @@ controllerManager:
memory: 256Mi
audit:
hostNetwork: false
dnsPolicy: Default
metricsPort: 8888
healthPort: 9090
priorityClassName: system-cluster-critical
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ spec:
runAsGroup: 999
runAsNonRoot: true
runAsUser: 1000
dnsPolicy: {{ .Values.audit.dnsPolicy }}
hostNetwork: {{ .Values.audit.hostNetwork }}
imagePullSecrets:
{{- toYaml .Values.image.pullSecrets | nindent 8 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ spec:
- mountPath: /certs
name: cert
readOnly: true
dnsPolicy: {{ .Values.controllerManager.dnsPolicy }}
hostNetwork: {{ .Values.controllerManager.hostNetwork }}
imagePullSecrets:
{{- toYaml .Values.image.pullSecrets | nindent 8 }}
Expand Down
2 changes: 2 additions & 0 deletions manifest_staging/charts/gatekeeper/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ controllerManager:
exemptNamespaces: []
exemptNamespacePrefixes: []
hostNetwork: false
dnsPolicy: Default
port: 8443
metricsPort: 8888
healthPort: 9090
Expand Down Expand Up @@ -67,6 +68,7 @@ controllerManager:
memory: 256Mi
audit:
hostNetwork: false
dnsPolicy: Default
metricsPort: 8888
healthPort: 9090
priorityClassName: system-cluster-critical
Expand Down