hashicorp / vault-helm

Helm chart to install Vault and other associated components.
Mozilla Public License 2.0
1.08k stars 873 forks source link

helm chart 0.26.0 Error: failed to parse values.yaml: error converting YAML to JSON: yaml: line ???: did not find expected key #968

Closed patrickdung closed 11 months ago

patrickdung commented 11 months ago

Describe the bug Syntax error when upgrade with the chart

To Reproduce Steps to reproduce the behavior:

$  helm upgrade -n vault vault hashicorp/vault \
    --version 0.26.0 \
    --values vault-helm-0.26.0-install-helm-values.yaml
Error: failed to parse vault-helm-0.26.0-install-helm-values.yaml: error converting YAML to JSON: yaml: line ???: did not find expected key

It should be related to these new settings in 0.26.0, especailly line 667

 657   # Enables a headless service to be used by the Vault Statefulset
 658   service:
 659     enabled: true
 660     # Enable or disable the vault-active service, which selects Vault pods that
 661     # have labeled themselves as the cluster leader with `vault-active: "true"`.
 662     active:
 663       enabled: true
 664       # Extra annotations for the service definition. This can either be YAML or a
 665       # YAML-formatted multi-line templated string map of the annotations to apply
 666       # to the active service.
 667       annotations: {}
 668     # Enable or disable the vault-standby service, which selects Vault pods that
 669     # have labeled themselves as a cluster follower with `vault-active: "false"`.

Other useful info to include: vault pod logs, kubectl describe statefulset vault and kubectl get statefulset vault -o yaml output

Expected behavior It should run without problem.

Environment

Chart values:

# Paste your user-supplied values here (`helm get values <release>`).
# Be sure to scrub any sensitive values!

Additional context Add any other context about the problem here.

tvoran commented 11 months ago

Hi @patrickdung, can you show what you have server.service.active.annotations set to? And any other values that aren't the default?

patrickdung commented 11 months ago

@tvoran

Sorry, it is a mistake from me when I doing the copy and paste...

This is the problem part, I had an extra space fro line 743 to 746.

 741     standby:
 742       enabled: true
 743        # Extra annotations for the service definition. This can either be YAML or a
 744        # YAML-formatted multi-line templated string map of the annotations to apply
 745        # to the standby service.
 746        # annotations: {}

This is fixed, those line should align with line 742.

 741     standby:
 742       enabled: true
 743       # Extra annotations for the service definition. This can either be YAML or a
 744       # YAML-formatted multi-line templated string map of the annotations to apply
 745       # to the standby service.
 746       annotations: {}

Sorry for opening this issue. I would close it. Thanks for the help.

tvoran commented 11 months ago

No worries, glad you got it working!