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: Consume policy-server-root-ca Secret in auditScanner Cronjob #265

Merged
merged 3 commits into from
Jul 31, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion charts/kubewarden-controller/chart-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ preDeleteJob:
# The registry is defined in the global.cattle.systemDefaultRegistry value
# kubectl image to be used in the pre-delete helm hook
repository: "kubewarden/kubectl"
tag: "v1.26.6"
tag: "v1.27.4"
# kubewarden-controller deployment settings:
podAnnotations: {}
nodeSelector: {}
Expand Down
2 changes: 2 additions & 0 deletions charts/kubewarden-controller/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ Create the name of the service account to use for kubewarden-controller
- /audit-scanner
- --loglevel
- info
- --extra-ca
- "/pki/policy-server-root-ca-pem"
{{- range .Values.global.skipNamespaces }}
- {{ printf "-i" }}
- {{ printf "%s" . }}
Expand Down
12 changes: 12 additions & 0 deletions charts/kubewarden-controller/templates/audit-scanner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,25 @@ spec:
{{- toYaml .Values.imagePullSecrets | nindent 12 }}
{{- end }}
restartPolicy: {{ .Values.auditScanner.containerRestartPolicy }}
volumes:
- name: policyservers-ca-cert
secret:
defaultMode: 420
secretName: policy-server-root-ca
items:
- key: policy-server-root-ca-pem
path: "policy-server-root-ca-pem"
containers:
- name: audit-scanner
image: '{{ template "system_default_registry" . }}{{ .Values.auditScanner.image.repository }}:{{ .Values.auditScanner.image.tag }}'
imagePullPolicy: {{ .Values.auditScanner.image.pullPolicy }}
command:
{{- include "audit-scanner.command" . | nindent 14 -}}
{{- with .Values.containerSecurityContext }}
volumeMounts:
- mountPath: "/pki"
name: policyservers-ca-cert
readOnly: true
securityContext:
{{- toYaml . | nindent 14 }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion charts/kubewarden-controller/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ preDeleteJob:
# The registry is defined in the global.cattle.systemDefaultRegistry value
# kubectl image to be used in the pre-delete helm hook
repository: "kubewarden/kubectl"
tag: "v1.26.6"
tag: "v1.27.4"
# kubewarden-controller deployment settings:
podAnnotations: {}
nodeSelector: {}
Expand Down
Loading