feat: update kubeadm-config file (#2850)

feat: update kubeadm-config file

Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com>
This commit is contained in:
zuoxuesong-worker 2025-11-11 17:21:27 +08:00 committed by GitHub
parent 2aa8cf140b
commit 423d9f1b33
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -29,7 +29,7 @@
- name: InitKubernetes | Kubernetes Already Installed
when: .kubernetes_install_LoadState.stdout | eq "load"
command: |
if [ ! -f /etc/kubernetes/kubeadm-config.yaml ]; then
if ! grep -q 'ClusterConfiguration' /etc/kubernetes/kubeadm-config.yaml 2>/dev/null; then
kubectl get cm kubeadm-config -n kube-system -o=jsonpath='{.data.ClusterConfiguration}' > /etc/kubernetes/kubeadm-config.yaml
fi
- name: InitKubernetes | Fetch kubeconfig to local workspace