Skip to content

Commit

Permalink
fix: add existing secret env var in deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
saumilmac committed Oct 1, 2024
1 parent b827386 commit eea0c58
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
8 changes: 8 additions & 0 deletions charts/snyk-broker/templates/broker_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,14 @@ spec:
value: /home/node/cacert/cacert
{{- end }}

{{- if .Values.caCertFileSecret.name }}
# HTTPS Inspection
- name: CA_CERT
value: /home/node/cacert/{{ .Values.caCertFileSecret.key }}
- name: NODE_EXTRA_CA_CERTS
value: /home/node/cacert/{{ .Values.caCertFileSecret.key }}
{{- end }}

{{- if .Values.httpsCert }}
# HTTPS Config
- name: HTTPS_CERT
Expand Down
12 changes: 12 additions & 0 deletions charts/snyk-broker/tests/broker_deployment_ca_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,18 @@ tests:
mountPath: /home/node/cacert
readOnly: true
template: broker_deployment.yaml
- contains:
path: spec.template.spec.containers[0].env
content:
name: NODE_EXTRA_CA_CERTS
value: "/home/node/cacert/caCert"
template: broker_deployment.yaml
- contains:
path: spec.template.spec.containers[0].env
content:
name: CA_CERT
value: "/home/node/cacert/caCert"
template: broker_deployment.yaml


- it: correctly mounts an external CA secret with default key
Expand Down

0 comments on commit eea0c58

Please sign in to comment.