2022-06-22 11:45:36 +01:00

18 lines
613 B
YAML

{{- if .Values.registryAuth }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ include "openstack-cluster.componentName" (list . "containerd-auth") }}
labels: {{ include "openstack-cluster.componentLabels" (list . "containerd-auth") | nindent 4 }}
stringData:
auth.toml: |
version = 2
[plugins."io.containerd.grpc.v1.cri".registry.configs]
{{- range $registry, $auth := .Values.registryAuth }}
[plugins."io.containerd.grpc.v1.cri".registry.configs."{{ $registry }}".auth]
username = "{{ $auth.username }}"
password = "{{ $auth.password }}"
{{- end }}
{{- end }}