mirror of
https://github.com/kubesphere/kubekey.git
synced 2025-12-26 01:22:51 +00:00
fix: update containerd config template to handle image registry authentication more robustly (#2842)
Signed-off-by: redscholar <blacktiledhouse@gmail.com>
This commit is contained in:
parent
c75b70bbcd
commit
6e382eaa73
|
|
@ -59,6 +59,7 @@ state = "/run/containerd"
|
|||
{{- if or (.cri.registry.auths | empty | not) (.groups.image_registry | default list | empty | not) }}
|
||||
[plugins."io.containerd.grpc.v1.cri".registry.configs]
|
||||
{{- end }}
|
||||
{{- if .image_registry.auth.registry | empty | not }}
|
||||
[plugins."io.containerd.grpc.v1.cri".registry.configs."{{ .image_registry.auth.registry }}".auth]
|
||||
username = "{{ .image_registry.auth.username }}"
|
||||
password = "{{ .image_registry.auth.password }}"
|
||||
|
|
@ -73,6 +74,7 @@ state = "/run/containerd"
|
|||
key_file = "/etc/containerd/certs.d/{{ .image_registry.auth.registry }}/server.key"
|
||||
{{- end }}
|
||||
insecure_skip_verify = {{ .image_registry.auth.insecure | default true }}
|
||||
{{- end }}
|
||||
{{- if .cri.registry.auths | empty | not }}
|
||||
{{- range .cri.registry.auths }}
|
||||
[plugins."io.containerd.grpc.v1.cri".registry.configs."{{ .repo }}".auth]
|
||||
|
|
|
|||
Loading…
Reference in New Issue