Skip to content

[bitnami/elasticsearch] sidecars in curator is placed at the wrong level #6956

Description

@nc-ruth

Which chart:
bitnami/elasticsearch 15.9.1

Describe the bug
When adding sidecars to curator, it is placed on the wrong level (wrong indent).
Sidecars are added using the following property: curator.sidecars

To Reproduce
Steps to reproduce the behavior:

  1. Create a curator.values.yaml file with the following values:
## Elasticsearch curator parameters
##
curator:
  enabled: true

  sidecars:
  - name: my-sidecar
    image: bitnami/bitnami-shell
    command:
    - whoami
  1. Run the following Helm command: helm template elasticsearch bitnami/elasticsearch --debug -f curator.values.yaml
    The following error occurs:
Error: YAML parse error on elasticsearch/charts/elasticsearch/templates/cronjob.yaml: error converting YAML to JSON: yaml: line 69: did not find expected key
helm.go:81: [debug] error converting YAML to JSON: yaml: line 69: did not find expected key
YAML parse error on elasticsearch/charts/elasticsearch/templates/cronjob.yaml
helm.sh/helm/v3/pkg/releaseutil.(*manifestFile).sort
        /home/circleci/helm.sh/helm/pkg/releaseutil/manifest_sorter.go:146
helm.sh/helm/v3/pkg/releaseutil.SortManifests
        /home/circleci/helm.sh/helm/pkg/releaseutil/manifest_sorter.go:106
helm.sh/helm/v3/pkg/action.(*Configuration).renderResources
        /home/circleci/helm.sh/helm/pkg/action/action.go:165
helm.sh/helm/v3/pkg/action.(*Install).Run
        /home/circleci/helm.sh/helm/pkg/action/install.go:240
main.runInstall
        /home/circleci/helm.sh/helm/cmd/helm/install.go:242
main.newTemplateCmd.func2
        /home/circleci/helm.sh/helm/cmd/helm/template.go:73
github.com/spf13/cobra.(*Command).execute
        /go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:850
github.com/spf13/cobra.(*Command).ExecuteC
        /go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:958
github.com/spf13/cobra.(*Command).Execute
        /go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:895
main.main
        /home/circleci/helm.sh/helm/cmd/helm/helm.go:80
runtime.main
        /usr/local/go/src/runtime/proc.go:204
runtime.goexit
        /usr/local/go/src/runtime/asm_amd64.s:1374

Expected behavior
I expected that the "helm template" would parse the curator.values.yaml file, and return all manifests for the elasticsearch chart.

Version of Helm and Kubernetes:

  • Output of helm version:
version.BuildInfo{Version:"v3.5.4", GitCommit:"1b5edb69df3d3a08df77c9902dc17af864ff05d1", GitTreeState:"clean", GoVersion:"go1.15.11"}
  • Output of kubectl version:
Client Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.2", GitCommit:"59603c6e503c87169aea6106f57b9f242f64df89", GitTreeState:"clean", BuildDate:"2020-01-18T23:30:10Z", GoVersion:"go1.13.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.9", GitCommit:"1af681ff123a96cc50f4f6323a83c70a1daf6950", GitTreeState:"clean", BuildDate:"2021-05-25T17:37:16Z", GoVersion:"go1.15.8", Compiler:"gc", Platform:"linux/amd64"}

Additional context
I suspect the indentation level of the sidecars yaml block is wrong, I have created a PR which might fix the problem.
#6950

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions