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

[bitnami/cassandra] Making TLS existingSecrets more configurable #28746

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

tbalzer
Copy link
Contributor

@tbalzer tbalzer commented Aug 7, 2024

Description of the change

Added values to allow for more configuration of the TLS settings, e.g. alternate secret keys, split secrets.

Benefits

E.g. interoperability with cert-manager and trust-manager.

Possible drawbacks

None really?

Applicable issues

Additional information

TLS configuration is not currently covered by automated tests.

Checklist

  • Chart version bumped in Chart.yaml according to semver. This is not necessary when the changes only affect README.md files.
  • Variables are documented in the values.yaml and added to the README.md using readme-generator-for-helm
  • Title of the pull request follows this pattern [bitnami/<name_of_the_chart>] Descriptive title
  • All commits signed off and in agreement of Developer Certificate of Origin (DCO)

@github-actions github-actions bot added cassandra triage Triage is needed labels Aug 7, 2024
@github-actions github-actions bot requested a review from carrodher August 7, 2024 13:38
@tbalzer tbalzer force-pushed the cassandra-make-tls-more-configurable branch 5 times, most recently from 7230aa0 to 655999d Compare August 7, 2024 14:45
@tbalzer
Copy link
Contributor Author

tbalzer commented Aug 7, 2024

@carrodher I'd appreciate any help you can give me with getting the pipeline to succeed.

I have invited @bitnami-bot to the repository which could be accepted to resolve this.
As it's an organization owned fork I can't use the GitHub builtin-functionality to give access (as it's only for personally owned forks).

Unfortunately the log of the changelog job doesn't show the diff which I could apply and I seem to be unable to locally reproduce what this job generates.

@carrodher carrodher added verify Execute verification workflow for these changes in-progress labels Aug 7, 2024
@github-actions github-actions bot removed the triage Triage is needed label Aug 7, 2024
@github-actions github-actions bot removed the request for review from carrodher August 7, 2024 16:14
@github-actions github-actions bot requested a review from migruiz4 August 7, 2024 16:14
Copy link
Member

@migruiz4 migruiz4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for your contribution @tbalzer! Could you please take a look at my comments?

Comment on lines +555 to +574
{{- if (include "cassandra.createTlsSecret" . ) }}
secret:
secretName: {{ include "cassandra.tlsSecretName" . }}
secretName: {{ include "cassandra.keystoreSecretName" . }}
defaultMode: 256
{{- else }}
projected:
sources:
- secret:
name: {{ include "cassandra.truststoreSecretName" . }}
items:
- key: {{ .Values.tls.secretKeys.truststore }}
path: truststore
mode: 256
- secret:
name: {{ include "cassandra.keystoreSecretName" . }}
items:
- key: {{ .Values.tls.secretKeys.keystore }}
path: keystore
mode: 256
{{- end }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about using projected in both cases? As far as cassandra.truststoreSecretName returns cassandra.keystoreSecretName when tls.existingTrustSecret is empty it should be fine.

Because this PR adds tls.secretKeys.keystore and tls.secretKeys.truststore, we can no longer assume files will be named 'keystore' and 'truststore', so using projected would fix that issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The created secret from https://github.com/bitnami/charts/blob/main/bitnami/cassandra/templates/tls-secret.yaml still uses hardcoded keys, as those are then not in JKS format. This is then handled differently in the init-container.

I think it wouldn't make sense there to use a projected secret then?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@migruiz4 It's been a month now, any thoughts?

bitnami/cassandra/templates/_helpers.tpl Outdated Show resolved Hide resolved
bitnami/cassandra/values.yaml Outdated Show resolved Hide resolved
@tbalzer
Copy link
Contributor Author

tbalzer commented Aug 9, 2024

Thank you very much for your contribution @tbalzer! Could you please take a look at my comments?

Thanks @migruiz4, I've incorporated all but one and left a reply the last. When you have time please take a look.

Copy link

This Pull Request has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thank you for your contribution.

@github-actions github-actions bot added the stale 15 days without activity label Aug 25, 2024
@tbalzer
Copy link
Contributor Author

tbalzer commented Aug 27, 2024

Hey @migruiz4 , this is getting stale right now. Anything I can do to move this forward?

@github-actions github-actions bot removed the stale 15 days without activity label Aug 28, 2024
@carrodher
Copy link
Member

Sorry for the delay! Please note a new version was released in the meantime, you need to rebase from main and bump the chart version in the Chart.yaml again

@tbalzer tbalzer force-pushed the cassandra-make-tls-more-configurable branch from 0ba748f to d89e9e8 Compare September 2, 2024 10:49
@tbalzer
Copy link
Contributor Author

tbalzer commented Sep 2, 2024

Sorry for the delay! Please note a new version was released in the meantime, you need to rebase from main and bump the chart version in the Chart.yaml again

I've rebased and updated accordingly.

@tbalzer tbalzer force-pushed the cassandra-make-tls-more-configurable branch from d89e9e8 to 00f107a Compare September 4, 2024 09:59
bitnami-bot and others added 3 commits September 4, 2024 10:03
Signed-off-by: Bitnami Containers <[email protected]>
Signed-off-by: Bitnami Containers <[email protected]>
@tbalzer
Copy link
Contributor Author

tbalzer commented Sep 9, 2024

@carrodher @migruiz4 Can I get a review here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cassandra in-progress verify Execute verification workflow for these changes
Projects
None yet
4 participants