hashicorp / vault-helm

Helm chart to install Vault and other associated components.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

patrickdung opened this issue · comments

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

  • Kubernetes version:
    k3s 1.27.5
    • Distribution or cloud vendor (OpenShift, EKS, GKE, AKS, etc.):
    • Other configuration options or runtime services (istio, etc.):
  • vault-helm version:

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.

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

@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.

No worries, glad you got it working!