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

fix: create volume mount with cacert when caCertFile is defined #112

Merged
merged 3 commits into from
Apr 3, 2024

Conversation

pavel-snyk
Copy link
Contributor

@pavel-snyk pavel-snyk commented Apr 2, 2024

This PR fixes an issue when cacert configmap was not created with defined caCertFile value.

Developer notes:

Failing unit tests (and snapshots) after fix show that exactly this envvar and volume was not mounted to the deployment.

	- asserts[0] `matchSnapshot` fail
			Template:	snyk-broker/templates/broker_deployment.yaml
			DocumentIndex:	0
			Path:	
			Expected to match snapshot 1:
				--- Expected
				+++ Actual
				@@ -48,2 +48,6 @@
				               value: "false"
				+            - name: CA_CERT
				+              value: /home/node/cacert/cacert
				+            - name: NODE_EXTRA_CA_CERTS
				+              value: /home/node/cacert/cacert
				             - name: ACCEPT_CODE
				@@ -93,6 +97,12 @@
				             runAsUser: 1000
				-          volumeMounts: null
				+          volumeMounts:
				+            - mountPath: /home/node/cacert
				+              name: RELEASE-NAME-snyk-broker-cacert-volume
				+              readOnly: true
				       securityContext: {}
				       serviceAccountName: snyk-broker
				-      volumes: null
				+      volumes:
				+        - configMap:
				+            name: RELEASE-NAME-snyk-broker-cacert-configmap
				+          name: RELEASE-NAME-snyk-broker-cacert-volume

@pavel-snyk pavel-snyk requested a review from a team as a code owner April 2, 2024 22:44
@pavel-snyk pavel-snyk force-pushed the fix/missing-caCert-data branch from c830c56 to bb626fc Compare April 3, 2024 11:18
@pavel-snyk pavel-snyk requested a review from soniqua April 3, 2024 11:20
@pavel-snyk pavel-snyk merged commit 895d701 into main Apr 3, 2024
4 checks passed
@pavel-snyk pavel-snyk deleted the fix/missing-caCert-data branch April 3, 2024 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants