hashicorp / vault-helm

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

Server side apply does not properly render volumeClaimTemplates #981

Open thomaspetit opened 7 months ago

thomaspetit commented 7 months ago

Describe the bug Server side apply does not properly render volumeClaimTemplates. When rendering the Helm chart with server side apply we can see that the volumeClaimTemplates object (with datastorage enabled) renders the following:

  volumeClaimTemplates:
    - metadata:
        ...
      spec:
        accessModes:
          ...

While it should actually be the following

  volumeClaimTemplates:
    - apiVersion: v1
      kind: PersistentVolumeClaim
      metadata:
        ...
      spec:
        accessModes:
          ...

To Reproduce

  1. Setup ArgoCD
  2. Add Vault helm chart as an application
  3. Enable datastorage on the Helm chart

Expected behavior Make the volumeClaimTemplate more explicit/declarative and thus eliminate possible errors when applying

Environment

Chart values:

vault:
  controller:
    imagePullSecrets: []
  ui:
    enabled: true
  injector:
    enabled: false
  server:
    ingress:
      enabled: true
      hosts:
        - host: vault.foo.bar

Additional context

Issue was introduced with the following change: https://github.com/kubernetes/kubernetes/pull/87706

Good to know is that this issue is not new: https://github.com/argoproj/argo-cd/issues/11143 Other downstream applications nicely fixed this: https://github.com/vernemq/docker-vernemq/pull/347