bugfix: change k8s default config image tags (#2741)

Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com>
This commit is contained in:
zuoxuesong-worker 2025-09-02 15:08:02 +08:00 committed by GitHub
parent 516bd99af8
commit 363fa287f7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 9 deletions

View File

@ -80,7 +80,6 @@
{{- if (index .hostvars (.groups.image_registry | first) "internal_ipv6") | empty | not }}
{{ index .hostvars (.groups.image_registry | first) "internal_ipv6" }} {{ .image_registry.auth.registry }}
{{- end }}
{{ .image_registry.auth.registry }}
{{- end }}
{{- end }}
# kubekey image_registry control_plane_endpoint END
@ -132,7 +131,9 @@
# - Worker: 127.0.0.1 {{ .kubernetes.control_plane_endpoint.host }}
- name: DNS | Set local DNS for kubernetes control plane endpoint
loop: "{{ .native.localDNS | toJson }}"
loop: "{{ .native.localDNS | toJson }}"
when:
- .groups.k8s_cluster | default list | has .inventory_hostname
command: |
# Remove any previous Kubekey-managed kubernetes control plane endpoint DNS entries
sed -i ':a;$!{N;ba};s@# kubekey kubernetes control_plane_endpoint BEGIN.*# kubekey kubernetes control_plane_endpoint END@@' {{ .item }}
@ -145,5 +146,5 @@
127.0.0.1 {{ .kubernetes.control_plane_endpoint.host }}
::1 {{ .kubernetes.control_plane_endpoint.host }}
{{- end }}
# kubekey kubernetes kubernetes control_plane_endpoint END
# kubekey kubernetes control_plane_endpoint END
EOF

View File

@ -1,15 +1,18 @@
dependencies:
# install nfs for nfs nodes
- role: native/nfs
when: .groups.nfs | default list | has .inventory_hostname
# Always perform initialization steps for all nodes
- role: native/ntp
- role: native/dns
# Initialize new Kubernetes nodes
- role: native/repository
when:
- .groups.k8s_cluster | default list | has .inventory_hostname
- .kubernetes_install_LoadState.stdout | eq "not-found"
# install nfs for nfs nodes
- role: native/nfs
when: .groups.nfs | default list | has .inventory_hostname
# Always perform initialization steps for all nodes
- role: native/ntp
when:
- .groups.k8s_cluster | default list | has .inventory_hostname
- .kubernetes_install_LoadState.stdout | eq "not-found"
- role: native/dns
- role: native/init