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

[Bug] check-elasticsearch-index init container on main deployment is not using ES secret for credentials #529

Closed
csabatuz-chess opened this issue Jul 8, 2024 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@csabatuz-chess
Copy link
Contributor

What are you really trying to do?

We are trying to configure our in-house Temporal deployment with an external Elasticsearch, using authentication.

The credentials are put in the secret and key specified under:

elasticsearch:
  ...
  secretName: ...
  secretKey: ...

Describe the bug

The check-elasticsearch-index init container on the main deployment fails due to credential errors.
https://github.com/temporalio/helm-charts/blob/main/charts/temporal/templates/server-deployment.yaml#L69-L75

Our own analysis

It appears that it expects the password under elasticsearch.password value in cleartext.
While this is good for testing, in our actual deployment we do need to use it from the secret.

It appears that jobs are using the secret as expected, via _admintools-env.yaml:
https://github.com/temporalio/helm-charts/blob/main/charts/temporal/templates/server-job.yaml#L44-L46

It's possible that the Deployment template's current state is a leftover after a previous refactor

Our naive fix attempt (untested for now): https://github.com/csabatuz-chess/temporal-helm-charts/compare/main..CST/elasticsearch-password-from-secret

Minimal Reproduction

Stock charts with

elasticsearch:
  enabled: false
  external: true
  ... other configs ...
  username: elastic
  secretName: <your secret>
  secretKey: password
apiVersion: v1
data:
  password: <your password>
kind: Secret

Environment/Versions

We are using Kubernetes, with 0.44.0 version of the chart.

@csabatuz-chess csabatuz-chess added the bug Something isn't working label Jul 8, 2024
@csabatuz-chess csabatuz-chess changed the title [Bug] FILL_TITLE_HERE [Bug] check-elasticsearch-index init container on main deployment is not using ES secret for credentials Jul 8, 2024
@robholland robholland added the good first issue Good for newcomers label Jul 15, 2024
@robholland
Copy link
Contributor

Fixed by: #530

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants