-
-
Notifications
You must be signed in to change notification settings - Fork 64
feat: custom secret labels #173
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
feat: custom secret labels #173
Conversation
commit dbb7c8d Author: Kamil Markowicz <kamil@markowicz.net> Date: Thu Apr 24 17:06:33 2025 -0400 fix: fix e2e, add updated CRDs, bump helm chart chore: add schema generated by old operator-sdk chore: add generated crds fix: e2e test logic fix: use local chart dir for e2e and not remote repo update deploy CRDs and bump Helm chart version Signed-off-by: Kamil Markowicz <kamil@markowicz.net> Signed-off-by: Kamil Markowicz <kamil@markowicz.net>
Added testing resources: Helm Repo: # Provide following Helm values if using the chart
image:
repository: ghcr.io/geekifier/postgres-operator
tag: "1.3.5-test" In addition to e2e, I tested on my k8s cluster and it worked as intended. |
Hey @geekifier, thank you for this PR. This looks great. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙌
Description of changes
Support for user-defined labels on secrets generated from the PostgresUser resources
Motivation
labels are commonly used on Kubernetes resources, but currently only an
app
label is hardcoded by the operator.Other Changes included in the PR
Notes
I added some very basic tests for the PostgresUser.newSecretForCR function. There were no tests for that file.
It was a huge pain to get the e2e tests working due to the old SDK versions, which cannot be build on Apple silicon. The tests are now passing after I changed the Helm install to use the updated chart/CRDs. I added a basic check for the new label map in the secret (same should be probably done for annotations as well).
I am not a Go dev by any means, so please let me know if anything needs to be worked on.
Edit: Added testing resources in #173 (comment)