diff --git a/charts/snyk-broker/templates/broker_deployment.yaml b/charts/snyk-broker/templates/broker_deployment.yaml index 73fd4ce..2925658 100644 --- a/charts/snyk-broker/templates/broker_deployment.yaml +++ b/charts/snyk-broker/templates/broker_deployment.yaml @@ -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 diff --git a/charts/snyk-broker/tests/broker_deployment_ca_test.yaml b/charts/snyk-broker/tests/broker_deployment_ca_test.yaml index 9536172..e1ffd97 100644 --- a/charts/snyk-broker/tests/broker_deployment_ca_test.yaml +++ b/charts/snyk-broker/tests/broker_deployment_ca_test.yaml @@ -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