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

fix: Avoid CrashLoop when keystore secret has no data #434

Closed hobti01 closed 1 year ago

hobti01 commented 1 year ago

Description

When a keystore secret is configured and it does not have any entries, the shell script incorrectly attempts to import a non-existent file due to fileglobbing.

Issues Resolved

433

Check List

For any changes to files within Helm chart directories:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.

hobti01 commented 1 year ago

Oops, my markdown autoformat made a mess of your file. I will update that.

hobti01 commented 1 year ago

Thanks @TheAlgo, would you be able to take another look please?

prudhvigodithi commented 1 year ago

Hey @hobti01 also please take at the Conflicting files. Thanks

hobti01 commented 1 year ago

Sorry, that was messy but should be in order now

prudhvigodithi commented 1 year ago

Thanks @hobti01 LGTM, I assume chart upgrade wont break the existing running helm release when user upgraded the chart with this new change, can you please test it ? @TheAlgo @peterzhuamazon please take a look at this PR. Thank you

hobti01 commented 1 year ago

These changes do not break any release or upgrade.

prudhvigodithi commented 1 year ago

This is a useful change for 1.x as well, @hobti01 can you please backport this to 1.x branch ?

hobti01 commented 1 year ago

@prudhvigodithi this has a typo in the shell variable name. It should be $i not $file. This will apply without issue but no secrets will be imported.

edit: fixed in both