opensearch-project / helm-charts

:wheel_of_dharma: A community repository for Helm Charts of OpenSearch Project.
https://opensearch.org/docs/latest/opensearch/install/helm/
Apache License 2.0
173 stars 234 forks source link

[BUG][opensearch] CrashLoop when keystore secret has data but script can't create keystore #446

Closed hm2thr33 closed 1 year ago

hm2thr33 commented 1 year ago

Describe the bug When the key store secret is configured and has entries in it, the shell script imports it incorrectly.

To Reproduce Steps to reproduce the behavior:

  1. Create a Kubernetes Keystore Secret:
    apiVersion: v1
    kind: Secret
    metadata:
    name: keystore-secrets
    type: Opaque
    data:
    s3.client.default.access_key: foo
    s3.client.default.secret_key: bar
  2. Configure a keystore secret in value.yml
    keystore:
    - secretName: keystore-secrets
  3. Deploy the chart and observe CrashLoop from the keystore init container logs:
    Created opensearch keystore in /usr/share/opensearch/config/opensearch.keystore
    sh: line 6: file: unbound variable

    Expected behavior No CrashLoop

Chart Name Opensearch

Screenshots N/A

Host/Environment (please complete the following information):

Additional context From my side any updates of value.yml files only pull of new version of helm chart https://github.com/opensearch-project/helm-charts/commit/4e4f82672f79704b38ae9063ea6c67655dd7a101

Temporary reverted my cluster configuration to OpenSearch Helm Chart version [2.13.1]

prudhvigodithi commented 1 year ago

Closing this as the fix has been pushed through the PR https://github.com/opensearch-project/helm-charts/pull/445, thanks to @hobti01 and @uncycler.