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

Commit a92b217

Browse files
committed
fix: run make generate
Signed-off-by: Chris Privitere <[email protected]>
1 parent d7148f7 commit a92b217

File tree

3 files changed

+372
-372
lines changed

3 files changed

+372
-372
lines changed

templates/cluster-template-crs-cni.yaml

Lines changed: 112 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ spec:
1313
matchLabels:
1414
cni: ${CLUSTER_NAME}-crs-cni
1515
resources:
16-
- kind: ConfigMap
17-
name: ${CLUSTER_NAME}-crs-cni
16+
- kind: ConfigMap
17+
name: ${CLUSTER_NAME}-crs-cni
1818
strategy: ApplyOnce
1919
---
2020
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
@@ -30,46 +30,46 @@ spec:
3030
cloud-provider: external
3131
provider-id: equinixmetal://{{ `{{ v1.instance_id }}` }}
3232
preKubeadmCommands:
33-
- |
34-
sed -ri '/\sswap\s/s/^#?/#/' /etc/fstab
35-
swapoff -a
36-
mount -a
37-
cat <<EOF > /etc/modules-load.d/containerd.conf
38-
overlay
39-
br_netfilter
40-
EOF
41-
modprobe overlay
42-
modprobe br_netfilter
43-
cat <<EOF > /etc/sysctl.d/99-kubernetes-cri.conf
44-
net.bridge.bridge-nf-call-iptables = 1
45-
net.ipv4.ip_forward = 1
46-
net.bridge.bridge-nf-call-ip6tables = 1
47-
EOF
48-
sysctl --system
49-
export DEBIAN_FRONTEND=noninteractive
50-
apt-get update -y
51-
apt-get remove -y docker docker-engine containerd runc
52-
apt-get install -y apt-transport-https ca-certificates curl gnupg lsb-release linux-generic jq
53-
install -m 0755 -d /etc/apt/keyrings
54-
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
55-
MINOR_KUBERNETES_VERSION=$(echo {{ .kubernetesVersion }} | cut -d. -f1-2 )
56-
curl -fsSL https://pkgs.k8s.io/core:/stable:/$${MINOR_KUBERNETES_VERSION}/deb/Release.key | gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
57-
chmod a+r /etc/apt/keyrings/docker.gpg
58-
chmod a+r /etc/apt/keyrings/kubernetes-archive-keyring.gpg
59-
echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" > /etc/apt/sources.list.d/docker.list
60-
echo "deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/$${MINOR_KUBERNETES_VERSION}/deb/ /" > /etc/apt/sources.list.d/kubernetes.list
61-
apt-get update -y
62-
TRIMMED_KUBERNETES_VERSION=$(echo {{ .kubernetesVersion }} | sed 's/\./\\\\./g' | sed 's/^v//')
63-
RESOLVED_KUBERNETES_VERSION=$(apt-cache madison kubelet | awk -v VERSION=$${TRIMMED_KUBERNETES_VERSION} '$3~ VERSION { print $3 }' | head -n1)
64-
apt-get install -y containerd.io kubelet=$${RESOLVED_KUBERNETES_VERSION} kubeadm=$${RESOLVED_KUBERNETES_VERSION} kubectl=$${RESOLVED_KUBERNETES_VERSION}
65-
cat <<EOF > /etc/crictl.yaml
66-
runtime-endpoint: unix:///run/containerd/containerd.sock
67-
image-endpoint: unix:///run/containerd/containerd.sock
68-
EOF
69-
containerd config default > /etc/containerd/config.toml
70-
sed -i 's/SystemdCgroup = false/SystemdCgroup = true/' /etc/containerd/config.toml
71-
sed -i "s,sandbox_image.*$,sandbox_image = \"$(kubeadm config images list | grep pause | sort -r | head -n1)\"," /etc/containerd/config.toml
72-
systemctl restart containerd
33+
- |
34+
sed -ri '/\sswap\s/s/^#?/#/' /etc/fstab
35+
swapoff -a
36+
mount -a
37+
cat <<EOF > /etc/modules-load.d/containerd.conf
38+
overlay
39+
br_netfilter
40+
EOF
41+
modprobe overlay
42+
modprobe br_netfilter
43+
cat <<EOF > /etc/sysctl.d/99-kubernetes-cri.conf
44+
net.bridge.bridge-nf-call-iptables = 1
45+
net.ipv4.ip_forward = 1
46+
net.bridge.bridge-nf-call-ip6tables = 1
47+
EOF
48+
sysctl --system
49+
export DEBIAN_FRONTEND=noninteractive
50+
apt-get update -y
51+
apt-get remove -y docker docker-engine containerd runc
52+
apt-get install -y apt-transport-https ca-certificates curl gnupg lsb-release linux-generic jq
53+
install -m 0755 -d /etc/apt/keyrings
54+
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
55+
MINOR_KUBERNETES_VERSION=$(echo {{ .kubernetesVersion }} | cut -d. -f1-2 )
56+
curl -fsSL https://pkgs.k8s.io/core:/stable:/$${MINOR_KUBERNETES_VERSION}/deb/Release.key | gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
57+
chmod a+r /etc/apt/keyrings/docker.gpg
58+
chmod a+r /etc/apt/keyrings/kubernetes-archive-keyring.gpg
59+
echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" > /etc/apt/sources.list.d/docker.list
60+
echo "deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/$${MINOR_KUBERNETES_VERSION}/deb/ /" > /etc/apt/sources.list.d/kubernetes.list
61+
apt-get update -y
62+
TRIMMED_KUBERNETES_VERSION=$(echo {{ .kubernetesVersion }} | sed 's/\./\\\\./g' | sed 's/^v//')
63+
RESOLVED_KUBERNETES_VERSION=$(apt-cache madison kubelet | awk -v VERSION=$${TRIMMED_KUBERNETES_VERSION} '$3~ VERSION { print $3 }' | head -n1)
64+
apt-get install -y containerd.io kubelet=$${RESOLVED_KUBERNETES_VERSION} kubeadm=$${RESOLVED_KUBERNETES_VERSION} kubectl=$${RESOLVED_KUBERNETES_VERSION}
65+
cat <<EOF > /etc/crictl.yaml
66+
runtime-endpoint: unix:///run/containerd/containerd.sock
67+
image-endpoint: unix:///run/containerd/containerd.sock
68+
EOF
69+
containerd config default > /etc/containerd/config.toml
70+
sed -i 's/SystemdCgroup = false/SystemdCgroup = true/' /etc/containerd/config.toml
71+
sed -i "s,sandbox_image.*$,sandbox_image = \"$(kubeadm config images list | grep pause | sort -r | head -n1)\"," /etc/containerd/config.toml
72+
systemctl restart containerd
7373
---
7474
apiVersion: cluster.x-k8s.io/v1beta1
7575
kind: Cluster
@@ -81,10 +81,10 @@ spec:
8181
clusterNetwork:
8282
pods:
8383
cidrBlocks:
84-
- ${POD_CIDR:=192.168.0.0/16}
84+
- ${POD_CIDR:=192.168.0.0/16}
8585
services:
8686
cidrBlocks:
87-
- ${SERVICE_CIDR:=172.26.0.0/16}
87+
- ${SERVICE_CIDR:=172.26.0.0/16}
8888
controlPlaneRef:
8989
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
9090
kind: KubeadmControlPlane
@@ -147,77 +147,77 @@ spec:
147147
joinConfiguration:
148148
nodeRegistration:
149149
ignorePreflightErrors:
150-
- DirAvailable--etc-kubernetes-manifests
150+
- DirAvailable--etc-kubernetes-manifests
151151
kubeletExtraArgs:
152152
cloud-provider: external
153153
provider-id: equinixmetal://{{ `{{ v1.instance_id }}` }}
154154
postKubeadmCommands:
155-
- |
156-
cat <<EOF >> /etc/network/interfaces
157-
auto lo:0
158-
iface lo:0 inet static
159-
address {{ .controlPlaneEndpoint }}
160-
netmask 255.255.255.255
161-
EOF
162-
systemctl restart networking
163-
mkdir -p $HOME/.kube
164-
cp /etc/kubernetes/admin.conf $HOME/.kube/config
165-
echo "source <(kubectl completion bash)" >> $HOME/.bashrc
166-
echo "alias k=kubectl" >> $HOME/.bashrc
167-
echo "complete -o default -F __start_kubectl k" >> $HOME/.bashrc
168-
if [ -f "/run/kubeadm/kubeadm.yaml" ]; then
169-
export KUBECONFIG=/etc/kubernetes/admin.conf
170-
export CPEM_YAML=https://github.com/equinix/cloud-provider-equinix-metal/releases/download/${CPEM_VERSION:=v3.7.0}/deployment.yaml
171-
export SECRET_DATA='cloud-sa.json=''{"apiKey": "{{ .apiKey }}","projectID": "${PROJECT_ID}", "eipTag": "cluster-api-provider-packet:cluster-id:${CLUSTER_NAME}", "eipHealthCheckUseHostIP": true}'''
172-
kubectl create secret generic -n kube-system metal-cloud-config --from-literal="$${SECRET_DATA}" || (sleep 1 && kubectl create secret generic -n kube-system metal-cloud-config --from-literal="$${SECRET_DATA}") || (sleep 1 && kubectl create secret generic -n kube-system metal-cloud-config --from-literal="$${SECRET_DATA}")
173-
kubectl apply -f $${CPEM_YAML} || (sleep 1 && kubectl apply -f $${CPEM_YAML}) || (sleep 1 && kubectl apply -f $${CPEM_YAML})
174-
fi
155+
- |
156+
cat <<EOF >> /etc/network/interfaces
157+
auto lo:0
158+
iface lo:0 inet static
159+
address {{ .controlPlaneEndpoint }}
160+
netmask 255.255.255.255
161+
EOF
162+
systemctl restart networking
163+
mkdir -p $HOME/.kube
164+
cp /etc/kubernetes/admin.conf $HOME/.kube/config
165+
echo "source <(kubectl completion bash)" >> $HOME/.bashrc
166+
echo "alias k=kubectl" >> $HOME/.bashrc
167+
echo "complete -o default -F __start_kubectl k" >> $HOME/.bashrc
168+
if [ -f "/run/kubeadm/kubeadm.yaml" ]; then
169+
export KUBECONFIG=/etc/kubernetes/admin.conf
170+
export CPEM_YAML=https://github.com/equinix/cloud-provider-equinix-metal/releases/download/${CPEM_VERSION:=v3.7.0}/deployment.yaml
171+
export SECRET_DATA='cloud-sa.json=''{"apiKey": "{{ .apiKey }}","projectID": "${PROJECT_ID}", "eipTag": "cluster-api-provider-packet:cluster-id:${CLUSTER_NAME}", "eipHealthCheckUseHostIP": true}'''
172+
kubectl create secret generic -n kube-system metal-cloud-config --from-literal="$${SECRET_DATA}" || (sleep 1 && kubectl create secret generic -n kube-system metal-cloud-config --from-literal="$${SECRET_DATA}") || (sleep 1 && kubectl create secret generic -n kube-system metal-cloud-config --from-literal="$${SECRET_DATA}")
173+
kubectl apply -f $${CPEM_YAML} || (sleep 1 && kubectl apply -f $${CPEM_YAML}) || (sleep 1 && kubectl apply -f $${CPEM_YAML})
174+
fi
175175
preKubeadmCommands:
176-
- |
177-
sed -ri '/\sswap\s/s/^#?/#/' /etc/fstab
178-
swapoff -a
179-
mount -a
180-
cat <<EOF > /etc/modules-load.d/containerd.conf
181-
overlay
182-
br_netfilter
183-
EOF
184-
modprobe overlay
185-
modprobe br_netfilter
186-
cat <<EOF > /etc/sysctl.d/99-kubernetes-cri.conf
187-
net.bridge.bridge-nf-call-iptables = 1
188-
net.ipv4.ip_forward = 1
189-
net.bridge.bridge-nf-call-ip6tables = 1
190-
EOF
191-
sysctl --system
192-
export DEBIAN_FRONTEND=noninteractive
193-
apt-get update -y
194-
apt-get remove -y docker docker-engine containerd runc
195-
apt-get install -y apt-transport-https ca-certificates curl gnupg lsb-release linux-generic jq
196-
major_vers=$(lsb_release -r | awk '{ print $2 }' | cut -d. -f1)
197-
if [ "$major_vers" -ge 20 ]; then
198-
apt-get install -y kubetail
199-
fi
200-
install -m 0755 -d /etc/apt/keyrings
201-
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
202-
MINOR_KUBERNETES_VERSION=$(echo {{ .kubernetesVersion }} | cut -d. -f1-2 )
203-
curl -fsSL https://pkgs.k8s.io/core:/stable:/$${MINOR_KUBERNETES_VERSION}/deb/Release.key | gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
204-
chmod a+r /etc/apt/keyrings/docker.gpg
205-
chmod a+r /etc/apt/keyrings/kubernetes-archive-keyring.gpg
206-
echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" > /etc/apt/sources.list.d/docker.list
207-
echo "deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/$${MINOR_KUBERNETES_VERSION}/deb/ /" > /etc/apt/sources.list.d/kubernetes.list
208-
apt-get update -y
209-
TRIMMED_KUBERNETES_VERSION=$(echo {{ .kubernetesVersion }} | sed 's/\./\\\\./g' | sed 's/^v//')
210-
RESOLVED_KUBERNETES_VERSION=$(apt-cache madison kubelet | awk -v VERSION=$${TRIMMED_KUBERNETES_VERSION} '$3~ VERSION { print $3 }' | head -n1)
211-
apt-get install -y containerd.io kubelet=$${RESOLVED_KUBERNETES_VERSION} kubeadm=$${RESOLVED_KUBERNETES_VERSION} kubectl=$${RESOLVED_KUBERNETES_VERSION}
212-
containerd config default > /etc/containerd/config.toml
213-
cat <<EOF > /etc/crictl.yaml
214-
runtime-endpoint: unix:///run/containerd/containerd.sock
215-
image-endpoint: unix:///run/containerd/containerd.sock
216-
EOF
217-
sed -i 's/SystemdCgroup = false/SystemdCgroup = true/' /etc/containerd/config.toml
218-
sed -i "s,sandbox_image.*$,sandbox_image = \"$(kubeadm config images list | grep pause | sort -r | head -n1)\"," /etc/containerd/config.toml
219-
systemctl restart containerd
220-
ping -c 3 -q {{ .controlPlaneEndpoint }} && echo OK || ip addr add {{ .controlPlaneEndpoint }} dev lo
176+
- |
177+
sed -ri '/\sswap\s/s/^#?/#/' /etc/fstab
178+
swapoff -a
179+
mount -a
180+
cat <<EOF > /etc/modules-load.d/containerd.conf
181+
overlay
182+
br_netfilter
183+
EOF
184+
modprobe overlay
185+
modprobe br_netfilter
186+
cat <<EOF > /etc/sysctl.d/99-kubernetes-cri.conf
187+
net.bridge.bridge-nf-call-iptables = 1
188+
net.ipv4.ip_forward = 1
189+
net.bridge.bridge-nf-call-ip6tables = 1
190+
EOF
191+
sysctl --system
192+
export DEBIAN_FRONTEND=noninteractive
193+
apt-get update -y
194+
apt-get remove -y docker docker-engine containerd runc
195+
apt-get install -y apt-transport-https ca-certificates curl gnupg lsb-release linux-generic jq
196+
major_vers=$(lsb_release -r | awk '{ print $2 }' | cut -d. -f1)
197+
if [ "$major_vers" -ge 20 ]; then
198+
apt-get install -y kubetail
199+
fi
200+
install -m 0755 -d /etc/apt/keyrings
201+
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
202+
MINOR_KUBERNETES_VERSION=$(echo {{ .kubernetesVersion }} | cut -d. -f1-2 )
203+
curl -fsSL https://pkgs.k8s.io/core:/stable:/$${MINOR_KUBERNETES_VERSION}/deb/Release.key | gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
204+
chmod a+r /etc/apt/keyrings/docker.gpg
205+
chmod a+r /etc/apt/keyrings/kubernetes-archive-keyring.gpg
206+
echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" > /etc/apt/sources.list.d/docker.list
207+
echo "deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/$${MINOR_KUBERNETES_VERSION}/deb/ /" > /etc/apt/sources.list.d/kubernetes.list
208+
apt-get update -y
209+
TRIMMED_KUBERNETES_VERSION=$(echo {{ .kubernetesVersion }} | sed 's/\./\\\\./g' | sed 's/^v//')
210+
RESOLVED_KUBERNETES_VERSION=$(apt-cache madison kubelet | awk -v VERSION=$${TRIMMED_KUBERNETES_VERSION} '$3~ VERSION { print $3 }' | head -n1)
211+
apt-get install -y containerd.io kubelet=$${RESOLVED_KUBERNETES_VERSION} kubeadm=$${RESOLVED_KUBERNETES_VERSION} kubectl=$${RESOLVED_KUBERNETES_VERSION}
212+
containerd config default > /etc/containerd/config.toml
213+
cat <<EOF > /etc/crictl.yaml
214+
runtime-endpoint: unix:///run/containerd/containerd.sock
215+
image-endpoint: unix:///run/containerd/containerd.sock
216+
EOF
217+
sed -i 's/SystemdCgroup = false/SystemdCgroup = true/' /etc/containerd/config.toml
218+
sed -i "s,sandbox_image.*$,sandbox_image = \"$(kubeadm config images list | grep pause | sort -r | head -n1)\"," /etc/containerd/config.toml
219+
systemctl restart containerd
220+
ping -c 3 -q {{ .controlPlaneEndpoint }} && echo OK || ip addr add {{ .controlPlaneEndpoint }} dev lo
221221
machineTemplate:
222222
infrastructureRef:
223223
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
@@ -246,7 +246,7 @@ spec:
246246
machineType: ${CONTROLPLANE_NODE_TYPE}
247247
os: ${NODE_OS:=ubuntu_20_04}
248248
sshKeys:
249-
- ${SSH_KEY}
249+
- ${SSH_KEY}
250250
tags: []
251251
---
252252
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
@@ -260,5 +260,5 @@ spec:
260260
machineType: ${WORKER_NODE_TYPE}
261261
os: ${NODE_OS:=ubuntu_20_04}
262262
sshKeys:
263-
- ${SSH_KEY}
263+
- ${SSH_KEY}
264264
tags: []

0 commit comments

Comments
 (0)