Skip to content
This repository was archived by the owner on Aug 12, 2025. It is now read-only.

Commit 7544fc0

Browse files
Chris Priviteredavidspek
authored andcommitted
Further refinements to the templates. bgp sections are only for kube-vip, remove systemctl restart networking to avoid networking service error.
Signed-off-by: Chris Privitere <cprivite@users.noreply.github.com>
1 parent 887d959 commit 7544fc0

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

templates/cluster-template-crs-cni.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ spec:
143143
address {{ .controlPlaneEndpoint }}
144144
netmask 255.255.255.255
145145
EOF
146-
systemctl restart networking
147146
if [ -f "/run/kubeadm/kubeadm.yaml" ]; then
148147
export KUBECONFIG=/etc/kubernetes/admin.conf
149148
export CPEM_YAML=https://github.com/equinix/cloud-provider-equinix-metal/releases/download/v3.4.0/deployment.yaml
@@ -176,11 +175,6 @@ spec:
176175
TRIMMED_KUBERNETES_VERSION=$(echo {{ .kubernetesVersion }} | sed 's/\./\\\\./g' | sed 's/^v//')
177176
RESOLVED_KUBERNETES_VERSION=$(apt-cache madison kubelet | awk -v VERSION=$${TRIMMED_KUBERNETES_VERSION} '$3~ VERSION { print $3 }' | head -n1)
178177
DEBIAN_FRONTEND=noninteractive apt-get install -y containerd kubelet=$${RESOLVED_KUBERNETES_VERSION} kubeadm=$${RESOLVED_KUBERNETES_VERSION} kubectl=$${RESOLVED_KUBERNETES_VERSION}
179-
curl -o /run/metadata.json -fsSL https://metadata.platformequinix.com/metadata
180-
for i in $(cat /run/metadata.json | jq -r '.bgp_neighbors[0].peer_ips[]'); do
181-
ip route add $i via $(cat /run/metadata.json | jq -r '.network.addresses[] | select(.public == false and .address_family == 4) | .gateway')
182-
done
183-
rm /run/metadata.json
184178
ping -c 3 -q {{ .controlPlaneEndpoint }} && echo OK || ip addr add {{ .controlPlaneEndpoint }} dev lo
185179
machineTemplate:
186180
infrastructureRef:

templates/cluster-template.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,6 @@ spec:
5555
TRIMMED_KUBERNETES_VERSION=$(echo {{ .kubernetesVersion }} | sed 's/\./\\\\./g' | sed 's/^v//')
5656
RESOLVED_KUBERNETES_VERSION=$(apt-cache madison kubelet | awk -v VERSION=$${TRIMMED_KUBERNETES_VERSION} '$3~ VERSION { print $3 }' | head -n1)
5757
DEBIAN_FRONTEND=noninteractive apt-get install -y containerd kubelet=$${RESOLVED_KUBERNETES_VERSION} kubeadm=$${RESOLVED_KUBERNETES_VERSION} kubectl=$${RESOLVED_KUBERNETES_VERSION}
58-
curl -o /run/metadata.json -fsSL https://metadata.platformequinix.com/metadata
59-
for i in $(cat /run/metadata.json | jq -r '.bgp_neighbors[0].peer_ips[]'); do
60-
ip route add $i via $(cat /run/metadata.json | jq -r '.network.addresses[] | select(.public == false and .address_family == 4) | .gateway')
61-
done
62-
rm /run/metadata.json
6358
ping -c 3 -q {{ .controlPlaneEndpoint }} && echo OK || ip addr add {{ .controlPlaneEndpoint }} dev lo
6459
postKubeadmCommands:
6560
- |
@@ -69,7 +64,6 @@ spec:
6964
address {{ .controlPlaneEndpoint }}
7065
netmask 255.255.255.255
7166
EOF
72-
systemctl restart networking
7367
if [ -f "/run/kubeadm/kubeadm.yaml" ]; then
7468
export KUBECONFIG=/etc/kubernetes/admin.conf
7569
export CPEM_YAML=https://github.com/equinix/cloud-provider-equinix-metal/releases/download/v3.4.0/deployment.yaml

0 commit comments

Comments
 (0)