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] Duplicate image and serviceName variables in opensearch-cluster v3.0.0 helm chart #939

Open
rajeshm90 opened this issue Jan 13, 2025 · 1 comment · May be fixed by #940
Open

[BUG] Duplicate image and serviceName variables in opensearch-cluster v3.0.0 helm chart #939

rajeshm90 opened this issue Jan 13, 2025 · 1 comment · May be fixed by #940
Labels
bug Something isn't working

Comments

@rajeshm90
Copy link

rajeshm90 commented Jan 13, 2025

What is the bug?

Getting below error while deploying opensearch-cluster with v3.0.0 helm chart.

error while running post render on files: map[string]interface {}(nil): yaml: unmarshal errors:
        line 70: mapping key "image" already defined at line 36
        line 97: mapping key "image" already defined at line 77
        line 98: mapping key "serviceName" already defined at line 92

How can one reproduce the bug?

We can reproduce by running helm template for v3.0.0 too.

  • Download the helm chart from v3.0.0
  • run helm template test . and it returns below
  general:
    serviceName: ""
    image: docker.io/opensearchproject/opensearch
    serviceName: test
    image: docker.io/opensearchproject/opensearch:2.3.0

  dashboards:
    image: docker.io/opensearchproject/opensearch-dashboards
    image: docker.io/opensearchproject/opensearch-dashboards:2.3.0

What is the expected behavior?

There shouldn't be any duplicate for the keys under any.

What is your host/environment?

Kubernetes - v1.27.11 (same error on latest versions too)
CONTAINER-RUNTIME - containerd://1.6.23
OS - Talos v1.5.3
Kernel - 6.1.54-talos
Helm Version - v3.15.2

Do you have any screenshots?

image

Do you have any additional context?

The issue is from the template definition.

  • in values.yaml, image and serviceName are defined under dashboards and general sections. Here both are defined without any versions.
cluster:
  general:
    image: docker.io/opensearchproject/opensearch
    serviceName: ""
  dashboards:
    image: docker.io/opensearchproject/opensearch-dashboards
  • in template cluster.yaml, reading all under dashboards & general section, and additionally image is defined with version.
  {{- with .Values.cluster.dashboards }}
  dashboards:
    {{- . | toYaml | nindent 4 }}
    image: {{ .image }}:{{ .version }}
  {{- end }}

  {{- with .Values.cluster.general }}
  general:
    {{- . | toYaml | nindent 4 }}
    image: {{ .image }}:{{ .version }}
    serviceName: {{ .serviceName | default $clusterName }}
  {{- end }}

So, dashboards and general returns two image & serviceName variables!!

@rajeshm90 rajeshm90 added bug Something isn't working untriaged Issues that have not yet been triaged labels Jan 13, 2025
@rajeshm90 rajeshm90 linked a pull request Jan 13, 2025 that will close this issue
3 tasks
@prudhvigodithi
Copy link
Member

[Triage]
Thanks for the PR #940 @rajeshm90. Will take a look at it.
Adding @swoehrl-mw

@prudhvigodithi prudhvigodithi removed the untriaged Issues that have not yet been triaged label Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 🆕 New
Development

Successfully merging a pull request may close this issue.

2 participants