Skip to content

Commit

Permalink
Move kube-vip manifest modification step to pre-kubeadm commands for …
Browse files Browse the repository at this point in the history
…Nutanix (#7536)
  • Loading branch information
abhay-krishna authored Feb 9, 2024
1 parent a407d44 commit 7a59cc5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/providers/nutanix/config/cp-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,12 @@ spec:
- echo "::1 ipv6-localhost ipv6-loopback" >/etc/hosts
- echo "127.0.0.1 localhost" >>/etc/hosts
- echo "127.0.0.1 {{`{{ ds.meta_data.hostname }}`}}" >> /etc/hosts
postKubeadmCommands:
- echo export KUBECONFIG=/etc/kubernetes/admin.conf >> /root/.bashrc
{{- $kube_minor_version := (index (splitList "." (trimPrefix "v" .kubernetesVersion)) 1) }}
{{- if (ge (atoi $kube_minor_version) 29) }}
- "if [ -f /run/kubeadm/kubeadm.yaml ]; then sed -i 's#path: /etc/kubernetes/admin.conf#path: /etc/kubernetes/super-admin.conf#' /etc/kubernetes/manifests/kube-vip.yaml; fi"
{{- end }}
postKubeadmCommands:
- echo export KUBECONFIG=/etc/kubernetes/admin.conf >> /root/.bashrc
useExperimentalRetryJoin: true
---
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
Expand Down

0 comments on commit 7a59cc5

Please sign in to comment.