Closed LemonDouble closed 1 day ago
I ran into this problem and fixed it with:
singleNode: true
rbac:
create: true
automountServiceAccountToken: true
ingress:
enabled: true
annotations:
traefik.ingress.kubernetes.io/router.entrypoints: web
kubernetes.io/ingress.class: traefik
hosts:
- opensearch.127.0.0.1.sslip.io
config:
opensearch.yml: "" #disable the default due to https://github.com/opensearch-project/helm-charts/issues/617
extraEnvs:
- name: OPENSEARCH_INITIAL_ADMIN_PASSWORD
value: <some-password>
for Rancher Desktop
Can someone give me a working values.yaml configuration? I am facing the same problem with chart versions 2.26.1 and 2.27.0 . I tried with different combinations of:
config:
opensearch.yml: ""
# or the default one
and with or without
extraEnvs:
- name: DISABLE_INSTALL_DEMO_CONFIG
value: "true"
(Also tried version 2.25.0 and got a different error: java.lang.IllegalArgumentException: Could not load codec 'Lucene95'. Did you forget to add lucene-backward-codecs.jar?)
It works for me emptying opensearch.yml
:
config:
opensearch.yml: ""
singleNode: true
@StefanSchuhart Could you share the error message that occurs when opensearch.yml is left as an empty string?
Describe the bug When deploying the OpenSearch chart with default settings, an error occurs in the Security plugin, causing the deployment to fail.
To Reproduce
When deploying the default chart with only the OPENSEARCH_INITIAL_ADMIN_PASSWORD environment variable set, the deployment fails.
Error Log
``` Enabling OpenSearch Security Plugin Enabling execution of install_demo_configuration.sh for OpenSearch Security Plugin OpenSearch 2.12.0 onwards, the OpenSearch Security Plugin a change that requires an initial password for 'admin' user. Please define an environment variable 'OPENSEARCH_INITIAL_ADMIN_PASSWORD' with a strong password string. If a password is not provided, the setup will quit. For more details, please visit: https://opensearch.org/docs/latest/install-and-configure/install-opensearch/docker/ ### OpenSearch Security Demo Installer ### ** Warning: Do not use on production or public reachable systems ** OpenSearch install type: rpm/deb on Linux 5.15.0-124-generic amd64 OpenSearch config dir: /usr/share/opensearch/config/ OpenSearch config file: /usr/share/opensearch/config/opensearch.yml OpenSearch bin dir: /usr/share/opensearch/bin/ OpenSearch plugins dir: /usr/share/opensearch/plugins/ OpenSearch lib dir: /usr/share/opensearch/lib/ Detected OpenSearch Version: 2.18.0 Detected OpenSearch Security Version: 2.18.0.0 /usr/share/opensearch/config/opensearch.yml seems to be already configured for Security. Quit. Enabling execution of OPENSEARCH_HOME/bin/opensearch-performance-analyzer/performance-analyzer-agent-cli for OpenSearch Performance Analyzer Plugin WARNING: Using incubator modules: jdk.incubator.vector WARNING: A terminally deprecated method in java.lang.System has been called WARNING: System::setSecurityManager has been called by org.opensearch.bootstrap.OpenSearch (file:/usr/share/opensearch/lib/opensearch-2.18.0.jar) WARNING: Please consider reporting this to the maintainers of org.opensearch.bootstrap.OpenSearch WARNING: System::setSecurityManager will be removed in a future release Nov 08, 2024 11:43:26 PM sun.util.locale.provider.LocaleProviderAdapterExpected behavior
The chart should be deployed successfully with the default settings.
Chart Name opensearch
Host/Environment (please complete the following information):
Additional context
"It seems that the Security Plugin's demo configuration is not working because the opensearch.yml file is declared in the values.yaml."
In the Security plugin, if the opensearch.yml file is missing, it generates demo certificates. However, since the values.yaml file creates an opensearch.yml file, the plugin skips generating demo certificates, leading to this issue. (See Link)
Previously, the Security Plugin could not detect nested YAML, resulting in the demo configuration of the Security Plugin always being executed. However, it appears that this bug has been fixed with this PR(from Security Plugin release 2.18.0 onwards).
Therefore, it appears that this issue started occurring from the Opensearch chart version 2.27.0.
Would it be okay if I submit a PR for this issue? It seems that commenting out lines 49 to 99 in values.yaml would resolve the problem.