Skip to content

Commit

Permalink
tweak variables so --list-variables shows accurate output
Browse files Browse the repository at this point in the history
  • Loading branch information
AshleyDumaine committed Feb 20, 2024
1 parent 76bd223 commit 1f647d3
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions templates/cluster-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ spec:
key: kubeadm-pre-init.sh
permissions: "0500"
preKubeadmCommands:
- /kubeadm-pre-init.sh '{{ ds.meta_data.label }}' ${KUBERNETES_VERSION#[vV]}
- /kubeadm-pre-init.sh '{{ ds.meta_data.label }}' ${KUBERNETES_VERSION}
clusterConfiguration:
apiServer:
extraArgs:
Expand Down Expand Up @@ -91,11 +91,11 @@ metadata:
spec:
template:
spec:
image: ${LINODE_OS:=""}
image: ${LINODE_OS:="linode/ubuntu22.04"}
type: ${LINODE_CONTROL_PLANE_MACHINE_TYPE}
region: ${LINODE_REGION}
authorizedKeys:
- ${LINODE_SSH_KEY:=""}
- ${LINODE_SSH_KEY}
---
apiVersion: cluster.x-k8s.io/v1beta1
kind: MachineDeployment
Expand Down Expand Up @@ -127,11 +127,11 @@ metadata:
spec:
template:
spec:
image: ${LINODE_OS:=""}
image: ${LINODE_OS:="linode/ubuntu22.04"}
type: ${LINODE_MACHINE_TYPE}
region: ${LINODE_REGION}
authorizedKeys:
- ${LINODE_SSH_KEY:=""}
- ${LINODE_SSH_KEY}
---
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
kind: KubeadmConfigTemplate
Expand Down Expand Up @@ -163,7 +163,7 @@ spec:
key: kubeadm-pre-init.sh
permissions: "0500"
preKubeadmCommands:
- /kubeadm-pre-init.sh '{{ ds.meta_data.label }}' ${KUBERNETES_VERSION#[vV]}
- /kubeadm-pre-init.sh '{{ ds.meta_data.label }}' ${KUBERNETES_VERSION}
joinConfiguration:
nodeRegistration:
kubeletExtraArgs:
Expand Down Expand Up @@ -199,7 +199,8 @@ stringData:
export DEBIAN_FRONTEND=noninteractive
hostnamectl set-hostname "$1" && hostname -F /etc/hostname
mkdir -p -m 755 /etc/apt/keyrings
VERSION=$${2%.*}
VERSION=$${2#[v]}
VERSION=$${VERSION%.*}
curl -fsSL "https://pkgs.k8s.io/core:/stable:/v$VERSION/deb/Release.key" | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
echo "deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v$VERSION/deb/ /" | sudo tee /etc/apt/sources.list.d/kubernetes.list
apt-get update -y
Expand Down

0 comments on commit 1f647d3

Please sign in to comment.