vmware-tanzu / helm-charts

Contains Helm charts for Kubernetes related open source tools
https://vmware-tanzu.github.io/helm-charts/
Apache License 2.0
248 stars 360 forks source link

Velero Helm Chart 7.0.0 service account imagePullSecrets invalid malformed #595

Closed adonispd closed 2 months ago

adonispd commented 3 months ago

What steps did you take and what happened: Using the Helm Chart 7.0.0 of velero we could not set the imagePullSecrets on service account due to a error

similar to

# serviceaccounts "velero" was not valid:
# * patch: Invalid value: "map[metadata:map[imagePullSecrets:[map[name:acr-pull-secret]]]]": strict decoding error: unknown field "metadata.imagePullSecrets"

What did you expect to happen:

the https://github.com/vmware-tanzu/helm-charts/blob/velero-7.0.0/charts/velero/templates/serviceaccount-server.yaml#L20-L23 instead

metadata:
...
  imagePullSecrets:
  {{- range .Values.serviceAccount.server.imagePullSecrets }}
    - name: {{ . }}
  {{- end }}
...

should be

metadata:
...
imagePullSecrets:
{{- range .Values.serviceAccount.server.imagePullSecrets }}
  - name: {{ . }}
{{- end }}
...

Anything else you would like to add: Kubernetes guidelines about serviceaccount https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#add-image-pull-secret-to-service-account

Seems be a small issue but its impacts on data mover as it uses the same image of velero, but there is no configuration for imagePullSecrets to it. https://github.com/vmware-tanzu/velero/blob/v1.14.0/pkg/exposer/image.go#L45-L46

Environment:

adonispd commented 3 months ago

Suggestion to solve the issue: https://github.com/vmware-tanzu/helm-charts/pull/596