helm-charts icon indicating copy to clipboard operation
helm-charts copied to clipboard

opensearchHosts partially overrides DISABLE_SECURITY_DASHBOARDS_PLUGIN behaviour

Open Cobraeti opened this issue 1 year ago • 1 comments

Hello, After a long time digging in documentation/issues here and directly on https://github.com/opensearch-project/opensearch-build project, I realized there must be a conflict between this chart value: https://github.com/opensearch-project/helm-charts/blob/086c52202c5755d504c6c3462720a57a86cc8998/charts/opensearch-dashboards/values.yaml#L8 and the function triggered by the DISABLE_SECURITY_DASHBOARDS_PLUGIN environment variable defined in the Docker image.

I don't know if it's desirable to update the templates to take those parameters into account or if only the documentation should be updated with a warning when using such variables...

Here is what I see as templates updates, but there must be a simpler way (I'm just a newbie with Helm 😅) :

  • opensearchHosts should take a list of <host>:<port> values
  • a disableSecurityPlugin boolean value should be added for both opensearch and opensearch-dashboards
  • an helper function should be created to turn the list into a CSV list and prepending http:// or https:// depending on disableSecurityPlugin value (example skeleton of helper function that should do the job: https://stackoverflow.com/a/49147648)
  • This line should be updated to use the helper function instead of directly setting the value: https://github.com/opensearch-project/helm-charts/blob/086c52202c5755d504c6c3462720a57a86cc8998/charts/opensearch-dashboards/templates/deployment.yaml#L121
  • DISABLE_INSTALL_DEMO_CONFIG and DISABLE_SECURITY_PLUGIN should be set to true in opensearch env if disableSecurityPlugin is true
  • DISABLE_SECURITY_DASHBOARDS_PLUGIN should be set to true in opensearch-dashboards env if disableSecurityPlugin is true

Chart versions tested:

  • opensearch-1.18.1
  • opensearch-dashboards-1.11.0

Corresponding Docker images:

  • opensearchproject/opensearch:1.3.8
  • opensearchproject/opensearch-dashboards:1.3.8

But is seems even more recent versions might be affected...

Thanks in advance for your feedbacks 😉

Cobraeti avatar Jun 13 '23 19:06 Cobraeti

@prudhvigodithi Can you take a look at this request? Thanks!

gaiksaya avatar Jun 20 '23 19:06 gaiksaya