Describe the bug
To specify additional volumes and volumeMounts for the manager container a single array parameter .Values.controller.manager.volumes is used.
The {{- define "vso.controller.volumeMounts" -}} helper passes only name, mountPath and readOnly parameters, so the chart generates a clear volumeMounts array.
On the other hand, the {{- define "vso.controller.volumes" -}} helper doesn't filter out mountPath and readOnly parameters, which have no sense in the volumes array.
To Reproduce
Steps to reproduce the behavior:
- Create values.yaml:
controller:
manager:
volumes:
- name: test
emptyDir: {}
mountPath: /mnt
readOnly: false
- helm install:
$ helm install --version 1.3.0 --namespace vault-secrets-operator vault-secrets-operator --create-namespace -f values.yaml hashicorp/vault-secrets-operator
Error: INSTALLATION FAILED: failed to create typed patch object (vault-secrets-operator/vault-secrets-operator-controller-manager; apps/v1, Kind=Deployment): .spec.template.spec.volumes[name="test"].mountPath: field not declared in schema
❗ Error occurred ⤴️
- Deployment haven't been installed:
$ kubectl -n vault-secrets-operator get deploy
No resources found in vault-secrets-operator namespace.
Expected behavior
VSO should be created with custom volume. The mountPath and readOnly fields should be filtered out from volumes array.
Environment
- Kubernetes version:
v1.35.1
- Distribution or cloud vendor (OpenShift, EKS, GKE, AKS, etc.): minikube version:
v1.38.1
- Other configuration options or runtime services (istio, etc.):
-
- vault-secrets-operator version:
1.3.0
Additional context
Add any other context about the problem here.
Describe the bug
To specify additional volumes and volumeMounts for the manager container a single array parameter
.Values.controller.manager.volumesis used.The
{{- define "vso.controller.volumeMounts" -}}helper passes onlyname,mountPathandreadOnlyparameters, so the chart generates a clear volumeMounts array.On the other hand, the
{{- define "vso.controller.volumes" -}}helper doesn't filter out mountPath and readOnly parameters, which have no sense in the volumes array.To Reproduce
Steps to reproduce the behavior:
Expected behavior
VSO should be created with custom volume. The
mountPathandreadOnlyfields should be filtered out from volumes array.Environment
v1.35.1v1.38.1-1.3.0Additional context
Add any other context about the problem here.