Skip to content

Commit

Permalink
Add custom CA support to kspm-admission-controller container
Browse files Browse the repository at this point in the history
  • Loading branch information
airadier committed Aug 22, 2023
1 parent ef9c253 commit aeabc27
Show file tree
Hide file tree
Showing 2 changed files with 161 additions and 67 deletions.
11 changes: 11 additions & 0 deletions charts/admission-controller/templates/webhook/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ spec:
- name: NO_PROXY
value: {{ include "webhook.noProxy" . }},{{ include "admissionController.scanner.fullname" . }}
{{- end }}
{{- if or .Values.webhook.ssl.ca.cert (eq (include "sysdig.custom_ca.enabled" (dict "global" .Values.global.ssl "component" .Values.webhook.ssl)) "true") }}
- name: SSL_CERT_DIR
value: /ca-certs
{{- end }}
ports:
- containerPort: {{ .Values.webhook.v2.http.port }}
protocol: TCP
Expand All @@ -78,6 +82,11 @@ spec:
- name: configs
mountPath: /configs
readOnly: true
{{- if or .Values.webhook.ssl.ca.cert (eq (include "sysdig.custom_ca.enabled" (dict "global" .Values.global.ssl "component" .Values.webhook.ssl)) "true") }}
- name: ca-cert
mountPath: /ca-certs
readOnly: true
{{- end }}
resources:
{{- toYaml .Values.webhook.resources | nindent 12 }}
{{- end}}
Expand Down Expand Up @@ -109,6 +118,8 @@ spec:
{{- end }}
imagePullPolicy: {{ .Values.webhook.image.pullPolicy | default .Values.global.image.pullPolicy }}
env:
- name: foo
value: bar
{{- if (or (include "webhook.httpProxy" .) (include "webhook.httpsProxy" .) (include "webhook.noProxy" .) )}}
- name: HTTP_PROXY
value: {{ include "webhook.httpProxy" . }}
Expand Down
Loading

0 comments on commit aeabc27

Please sign in to comment.