Skip to content

Akeyless gateway helm chart install fails when multiple nodeselectors are defined when cache is enabled #320

@shaik2419

Description

@shaik2419

Currently https://github.com/akeylesslabs/helm-charts/blob/main/charts/akeyless-gateway/templates/deployment.yaml#L50 uses "intend 4" as below to add nodeselectors which fails with below error when more than one nodeselector is defined.

      {{- if .Values.gateway.deployment.nodeSelector }}
      nodeSelector:
      {{ toYaml .Values.gateway.deployment.nodeSelector | indent 4 }}
      {{- end }}

Error:

Error: YAML parse error on akeyless-gateway/templates/deployment.yaml: error converting YAML to JSON: yaml: line 32: mapping values are not allowed in this context
helm.go:84: [debug] error converting YAML to JSON: yaml: line 32: mapping values are not allowed in this context
YAML parse error on akeyless-gateway/templates/deployment.yaml

Suggested fix:
Change intent and use nintent as below.

      {{- if .Values.gateway.deployment.nodeSelector }}
      nodeSelector:
        {{- toYaml .Values.gateway.deployment.nodeSelector | nindent 8 }}
      {{- end }}

Secondly below error appears with helm installation when cache enabled
Error: malformed chart or values: templates/akeyless-cache/cache.yaml: unable to parse YAML: error converting YAML to JSON: yaml: line 31: mapping values are not allowed in this context

Fix is to correct the indentation for imagepullsecret as below.

{{- include "cache.imagePullSecrets" . | nindent 6 }}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions