Skip to content

Commit

Permalink
Set kubeconfig volume path for kube-vip static pod based on OS
Browse files Browse the repository at this point in the history
  • Loading branch information
abhay-krishna committed Jan 29, 2024
1 parent 5ef28bb commit 31e7d1e
Show file tree
Hide file tree
Showing 19 changed files with 25 additions and 17 deletions.
4 changes: 4 additions & 0 deletions pkg/providers/tinkerbell/config/template-cp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,11 @@ spec:
hostNetwork: true
volumes:
- hostPath:
{{- if (eq .format "bottlerocket") }}
path: /var/lib/kubeadm/admin.conf
{{- else }}
path: /etc/kubernetes/admin.conf
{{- end }}
name: kubeconfig
status: {}
owner: root:root
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ spec:
hostNetwork: true
volumes:
- hostPath:
path: /etc/kubernetes/admin.conf
path: /var/lib/kubeadm/admin.conf
name: kubeconfig
status: {}
owner: root:root
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ spec:
hostNetwork: true
volumes:
- hostPath:
path: /etc/kubernetes/admin.conf
path: /var/lib/kubeadm/admin.conf
name: kubeconfig
status: {}
owner: root:root
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ spec:
hostNetwork: true
volumes:
- hostPath:
path: /etc/kubernetes/admin.conf
path: /var/lib/kubeadm/admin.conf
name: kubeconfig
status: {}
owner: root:root
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ spec:
hostNetwork: true
volumes:
- hostPath:
path: /etc/kubernetes/admin.conf
path: /var/lib/kubeadm/admin.conf
name: kubeconfig
status: {}
owner: root:root
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ spec:
hostNetwork: true
volumes:
- hostPath:
path: /etc/kubernetes/admin.conf
path: /var/lib/kubeadm/admin.conf
name: kubeconfig
status: {}
owner: root:root
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ spec:
hostNetwork: true
volumes:
- hostPath:
path: /etc/kubernetes/admin.conf
path: /var/lib/kubeadm/admin.conf
name: kubeconfig
status: {}
owner: root:root
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ spec:
hostNetwork: true
volumes:
- hostPath:
path: /etc/kubernetes/admin.conf
path: /var/lib/kubeadm/admin.conf
name: kubeconfig
status: {}
owner: root:root
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ spec:
hostNetwork: true
volumes:
- hostPath:
path: /etc/kubernetes/admin.conf
path: /var/lib/kubeadm/admin.conf
name: kubeconfig
status: {}
owner: root:root
Expand Down
4 changes: 4 additions & 0 deletions pkg/providers/vsphere/config/template-cp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,11 @@ spec:
hostNetwork: true
volumes:
- hostPath:
{{- if (eq .format "bottlerocket") }}
path: /var/lib/kubeadm/admin.conf
{{- else }}
path: /etc/kubernetes/admin.conf
{{- end }}
name: kubeconfig
status: {}
owner: root:root
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ spec:
hostNetwork: true
volumes:
- hostPath:
path: /etc/kubernetes/admin.conf
path: /var/lib/kubeadm/admin.conf
name: kubeconfig
status: {}
owner: root:root
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ spec:
hostNetwork: true
volumes:
- hostPath:
path: /etc/kubernetes/admin.conf
path: /var/lib/kubeadm/admin.conf
name: kubeconfig
status: {}
owner: root:root
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ spec:
hostNetwork: true
volumes:
- hostPath:
path: /etc/kubernetes/admin.conf
path: /var/lib/kubeadm/admin.conf
name: kubeconfig
status: {}
owner: root:root
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ spec:
hostNetwork: true
volumes:
- hostPath:
path: /etc/kubernetes/admin.conf
path: /var/lib/kubeadm/admin.conf
name: kubeconfig
status: {}
owner: root:root
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ spec:
hostNetwork: true
volumes:
- hostPath:
path: /etc/kubernetes/admin.conf
path: /var/lib/kubeadm/admin.conf
name: kubeconfig
status: {}
owner: root:root
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ spec:
hostNetwork: true
volumes:
- hostPath:
path: /etc/kubernetes/admin.conf
path: /var/lib/kubeadm/admin.conf
name: kubeconfig
status: {}
owner: root:root
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ spec:
hostNetwork: true
volumes:
- hostPath:
path: /etc/kubernetes/admin.conf
path: /var/lib/kubeadm/admin.conf
name: kubeconfig
status: {}
owner: root:root
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ spec:
hostNetwork: true
volumes:
- hostPath:
path: /etc/kubernetes/admin.conf
path: /var/lib/kubeadm/admin.conf
name: kubeconfig
status: {}
owner: root:root
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ spec:
hostNetwork: true
volumes:
- hostPath:
path: /etc/kubernetes/admin.conf
path: /var/lib/kubeadm/admin.conf
name: kubeconfig
status: {}
owner: root:root
Expand Down

0 comments on commit 31e7d1e

Please sign in to comment.