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

Swap to emptyDir for connectors integration password #1626

Merged
merged 3 commits into from
Dec 18, 2024

Conversation

andrewstucki
Copy link
Contributor

It looks like when this code was introduced swapping from the raw template to gotohelm, the mount type for the directory used in writing user passwords to was accidentally modified. There are currently no golden file tests for this so it wasn't caught. Here is the original mount type, which as you can see is emptyDir:

{{ $extraVolumes = append $extraVolumes (dict
"name" (printf "%s-user-password" ((include "redpanda.fullname" .)) | trunc 49)
"emptyDir" (dict)
)}}
{{ $extraVolumeMounts = append $extraVolumeMounts (dict
"name" (printf "%s-user-password" ((include "redpanda.fullname" .)) | trunc 49)
"mountPath" "/opt/kafka/connect-password/rc-credentials"
)}}

@andrewstucki
Copy link
Contributor Author

Just FYI, this only affects installations with SASL + connectors enabled, so I added a test case for that. Here's the diff from reverting the change after generating the golden file with the fixed test just to show it validates the change properly:

➜  helm-charts git:(fix-connectors-mount) ✗ go test ./charts/redpanda -short
--- FAIL: TestTemplate (7.62s)
    --- FAIL: TestTemplate/enable-connectors-sasl (0.08s)
        chart_template_test.go:144:
            	Error Trace:	/Users/andrewstucki/code/helm-charts/pkg/testutil/testutil.go:131
            	            				/Users/andrewstucki/code/helm-charts/pkg/testutil/testutil.go:209
            	            				/Users/andrewstucki/code/helm-charts/charts/redpanda/chart_template_test.go:144
            	Error:
            	            	spec.template.spec.volumes.redpanda-user-password  (apps/v1/Deployment/redpanda-connectors)
            	            	  - one map entry removed:     + one map entry added:
            	            	    emptyDir: {}                 secret:
            	            	                                   secretName: redpanda-users

            	Test:       	TestTemplate/enable-connectors-sasl

@andrewstucki andrewstucki merged commit e75bc56 into main Dec 18, 2024
43 checks passed
@andrewstucki andrewstucki deleted the fix-connectors-mount branch December 18, 2024 21:58
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