Skip to content

Commit

Permalink
fix: add existing secret env var in deployment (#140)
Browse files Browse the repository at this point in the history
* fix: add existing secret env var in deployment

* fix: bump the version
  • Loading branch information
saumilmac authored Oct 2, 2024
1 parent b827386 commit 388913f
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/snyk-broker/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
name: snyk-broker
version: 2.8.3
version: 2.8.4
description: A Helm chart for Kubernetes
type: application
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 388913f

Please sign in to comment.