@@ -26,35 +26,35 @@ spec:
26
26
kubeletExtraArgs :
27
27
cloud-provider : external
28
28
postKubeadmCommands :
29
- - |
29
+ - |
30
30
cat <<EOF >> /etc/network/interfaces
31
31
auto lo:0
32
32
iface lo:0 inet static
33
33
address {{ .controlPlaneEndpoint }}
34
34
netmask 255.255.255.255
35
35
EOF
36
- - systemctl restart networking
37
- - ' kubectl --kubeconfig /etc/kubernetes/admin.conf create secret generic -n kube-system packet-cloud-config --from-literal=cloud-sa.json='' {"apiKey": "{{ .apiKey }}","projectID": "${PROJECT_ID}", "eipTag": "cluster-api-provider-packet:cluster-id:${CLUSTER_NAME}"}'' '
38
- - kubectl apply --kubeconfig /etc/kubernetes/admin.conf -f https://github.com/packethost/packet-ccm/releases/download/v1.1.0/deployment.yaml
36
+ - systemctl restart networking
37
+ - ' kubectl --kubeconfig /etc/kubernetes/admin.conf create secret generic -n kube-system packet-cloud-config --from-literal=cloud-sa.json='' {"apiKey": "{{ .apiKey }}","projectID": "${PROJECT_ID}", "eipTag": "cluster-api-provider-packet:cluster-id:${CLUSTER_NAME}"}'' '
38
+ - kubectl apply --kubeconfig /etc/kubernetes/admin.conf -f https://github.com/packethost/packet-ccm/releases/download/v1.1.0/deployment.yaml
39
39
preKubeadmCommands :
40
- - sed -ri '/\sswap\s/s/^#?/#/' /etc/fstab
41
- - swapoff -a
42
- - mount -a
43
- - apt-get -y update
44
- - DEBIAN_FRONTEND=noninteractive apt-get install -y apt-transport-https curl
45
- - curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
46
- - echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" > /etc/apt/sources.list.d/kubernetes.list
47
- - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
48
- - apt-key fingerprint 0EBFCD88
49
- - add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
50
- - apt-get update -y
51
- - TRIMMED_KUBERNETES_VERSION=$(echo $KUBERNETES_VERSION | sed 's/\./\\./g' | sed 's/^v//')
52
- - RESOLVED_KUBERNETES_VERSION=$(apt-cache policy kubelet | awk -v " VERSION=${TRIMMED_KUBERNETES_VERSION}" '$1~ VERSION { print $1 }' | head -n1)
53
- - apt-get install -y ca-certificates socat jq ebtables apt-transport-https cloud-utils prips docker-ce docker-ce-cli containerd.io kubelet=${RESOLVED_KUBERNETES_VERSION} kubeadm=${RESOLVED_KUBERNETES_VERSION} kubectl=${RESOLVED_KUBERNETES_VERSION}
54
- - systemctl daemon-reload
55
- - systemctl enable docker
56
- - systemctl start docker
57
- - ping -c 3 -q {{ .controlPlaneEndpoint }} && echo OK || ip addr add {{ .controlPlaneEndpoint }} dev lo
40
+ - sed -ri '/\sswap\s/s/^#?/#/' /etc/fstab
41
+ - swapoff -a
42
+ - mount -a
43
+ - apt-get -y update
44
+ - DEBIAN_FRONTEND=noninteractive apt-get install -y apt-transport-https curl
45
+ - curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
46
+ - echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" > /etc/apt/sources.list.d/kubernetes.list
47
+ - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
48
+ - apt-key fingerprint 0EBFCD88
49
+ - add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
50
+ - apt-get update -y
51
+ - TRIMMED_KUBERNETES_VERSION=$(echo $KUBERNETES_VERSION | sed 's/\./\\./g' | sed 's/^v//')
52
+ - RESOLVED_KUBERNETES_VERSION=$(apt-cache policy kubelet | awk -v VERSION=${TRIMMED_KUBERNETES_VERSION} '$1~ VERSION { print $1 }' | head -n1)
53
+ - apt-get install -y ca-certificates socat jq ebtables apt-transport-https cloud-utils prips docker-ce docker-ce-cli containerd.io kubelet=${RESOLVED_KUBERNETES_VERSION} kubeadm=${RESOLVED_KUBERNETES_VERSION} kubectl=${RESOLVED_KUBERNETES_VERSION}
54
+ - systemctl daemon-reload
55
+ - systemctl enable docker
56
+ - systemctl start docker
57
+ - ping -c 3 -q {{ .controlPlaneEndpoint }} && echo OK || ip addr add {{ .controlPlaneEndpoint }} dev lo
58
58
---
59
59
apiVersion : infrastructure.cluster.x-k8s.io/v1alpha3
60
60
kind : PacketMachineTemplate
67
67
billingCycle : hourly
68
68
machineType : " ${WORKER_NODE_TYPE}"
69
69
sshKeys :
70
- - " ${SSH_KEY}"
70
+ - " ${SSH_KEY}"
71
71
tags : []
72
72
---
73
73
apiVersion : cluster.x-k8s.io/v1alpha3
@@ -140,7 +140,7 @@ spec:
140
140
billingCycle : hourly
141
141
machineType : " ${WORKER_NODE_TYPE}"
142
142
sshKeys :
143
- - " ${SSH_KEY}"
143
+ - " ${SSH_KEY}"
144
144
tags : []
145
145
---
146
146
kind : KubeadmConfigTemplate
@@ -163,7 +163,7 @@ spec:
163
163
- add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
164
164
- apt-get update -y
165
165
- TRIMMED_KUBERNETES_VERSION=$(echo $KUBERNETES_VERSION | sed 's/\./\\./g' | sed 's/^v//')
166
- - RESOLVED_KUBERNETES_VERSION=$(apt-cache policy kubelet | awk -v " VERSION=${TRIMMED_KUBERNETES_VERSION}" '$1~ VERSION { print $1 }' | head -n1)
166
+ - RESOLVED_KUBERNETES_VERSION=$(apt-cache policy kubelet | awk -v VERSION=${TRIMMED_KUBERNETES_VERSION} '$1~ VERSION { print $1 }' | head -n1)
167
167
- apt-get install -y ca-certificates socat jq ebtables apt-transport-https cloud-utils prips docker-ce docker-ce-cli containerd.io kubelet=${RESOLVED_KUBERNETES_VERSION} kubeadm=${RESOLVED_KUBERNETES_VERSION} kubectl=${RESOLVED_KUBERNETES_VERSION}
168
168
- systemctl daemon-reload
169
169
- systemctl enable docker
0 commit comments