diff --git a/argocd-helm-charts/capi-cluster/charts/hetzner/templates/KubeadmControlPlane.yaml b/argocd-helm-charts/capi-cluster/charts/hetzner/templates/KubeadmControlPlane.yaml index a663b5014..bdae82cb4 100644 --- a/argocd-helm-charts/capi-cluster/charts/hetzner/templates/KubeadmControlPlane.yaml +++ b/argocd-helm-charts/capi-cluster/charts/hetzner/templates/KubeadmControlPlane.yaml @@ -172,41 +172,51 @@ spec: rotate-server-certificates: "true" tls-cipher-suites: TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_GCM_SHA256 preKubeadmCommands: - - set -x - - export CONTAINERD=1.7.19 - - export KUBERNETES_VERSION=$(echo {{ .Values.global.kubernetes.version }} | sed 's/^v//') - - export TRIMMED_KUBERNETES_VERSION=$(echo {{ .Values.global.kubernetes.version }} | sed 's/^v//' | awk -F . '{print - $1 "." $2}') - - localectl set-locale LANG=en_US.UTF-8 - - localectl set-locale LANGUAGE=en_US.UTF-8 - - apt-get update -y - - apt-get -y install at jq unzip wget socat mtr logrotate apt-transport-https - - sed -i '/swap/d' /etc/fstab - - swapoff -a - - modprobe overlay && modprobe br_netfilter && sysctl --system - - wget https://github.com/containerd/containerd/releases/download/v$CONTAINERD/cri-containerd-cni-$CONTAINERD-linux-amd64.tar.gz - - wget https://github.com/containerd/containerd/releases/download/v$CONTAINERD/cri-containerd-cni-$CONTAINERD-linux-amd64.tar.gz.sha256sum - - sha256sum --check cri-containerd-cni-$CONTAINERD-linux-amd64.tar.gz.sha256sum - - tar --no-overwrite-dir -C / -xzf cri-containerd-cni-$CONTAINERD-linux-amd64.tar.gz - - rm -f cri-containerd-cni-$CONTAINERD-linux-amd64.tar.gz cri-containerd-cni-$CONTAINERD-linux-amd64.tar.gz.sha256sum - - chmod -R 644 /etc/cni && chown -R root:root /etc/cni - - mkdir -p /etc/containerd - - containerd config default > /etc/containerd/config.toml - - sed -i "s/SystemdCgroup = false/SystemdCgroup = true/" /etc/containerd/config.toml - - systemctl daemon-reload && systemctl enable containerd && systemctl start containerd - - mkdir -p /etc/apt/keyrings/ - - curl -fsSL https://pkgs.k8s.io/core:/stable:/v$TRIMMED_KUBERNETES_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$TRIMMED_KUBERNETES_VERSION/deb/ - /" | sudo tee /etc/apt/sources.list.d/kubernetes.list - - apt-get update - - apt-get install -y kubelet=$KUBERNETES_VERSION-1.1 kubeadm=$KUBERNETES_VERSION-1.1 - kubectl=$KUBERNETES_VERSION-1.1 bash-completion && apt-mark hold kubelet kubectl - kubeadm && systemctl enable kubelet - - kubeadm config images pull --kubernetes-version $KUBERNETES_VERSION - - echo 'source <(kubectl completion bash)' >>/root/.bashrc - - echo 'export KUBECONFIG=/etc/kubernetes/admin.conf' >>/root/.bashrc - - apt-get -y autoremove && apt-get -y clean all + - set -x + - export CONTAINERD=1.7.19 + - export KUBERNETES_VERSION=$(echo {{ .Values.global.kubernetes.version }} | sed 's/^v//') + - export TRIMMED_KUBERNETES_VERSION=$(echo {{ .Values.global.kubernetes.version }} | sed 's/^v//' | awk -F . '{print + $1 "." $2}') + - localectl set-locale LANG=en_US.UTF-8 + - localectl set-locale LANGUAGE=en_US.UTF-8 + - apt-get update -y + - apt-get -y install at jq unzip wget socat mtr logrotate apt-transport-https + - sed -i '/swap/d' /etc/fstab + - swapoff -a + - modprobe overlay && modprobe br_netfilter && sysctl --system + - wget https://github.com/containerd/containerd/releases/download/v$CONTAINERD/cri-containerd-cni-$CONTAINERD-linux-amd64.tar.gz + - wget https://github.com/containerd/containerd/releases/download/v$CONTAINERD/cri-containerd-cni-$CONTAINERD-linux-amd64.tar.gz.sha256sum + - sha256sum --check cri-containerd-cni-$CONTAINERD-linux-amd64.tar.gz.sha256sum + - tar --no-overwrite-dir -C / -xzf cri-containerd-cni-$CONTAINERD-linux-amd64.tar.gz + - rm -f cri-containerd-cni-$CONTAINERD-linux-amd64.tar.gz cri-containerd-cni-$CONTAINERD-linux-amd64.tar.gz.sha256sum + - chmod -R 644 /etc/cni && chown -R root:root /etc/cni + - mkdir -p /etc/containerd + - containerd config default > /etc/containerd/config.toml + - sed -i "s/SystemdCgroup = false/SystemdCgroup = true/" /etc/containerd/config.toml + - systemctl daemon-reload && systemctl enable containerd && systemctl start containerd + - mkdir -p /etc/apt/keyrings/ + - curl -fsSL https://pkgs.k8s.io/core:/stable:/v$TRIMMED_KUBERNETES_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$TRIMMED_KUBERNETES_VERSION/deb/ + /" | sudo tee /etc/apt/sources.list.d/kubernetes.list + - apt-get update + - apt-get install -y kubelet=$KUBERNETES_VERSION-1.1 kubeadm=$KUBERNETES_VERSION-1.1 + kubectl=$KUBERNETES_VERSION-1.1 bash-completion && apt-mark hold kubelet kubectl + kubeadm && systemctl enable kubelet + - kubeadm config images pull --kubernetes-version $KUBERNETES_VERSION + - echo 'source <(kubectl completion bash)' >>/root/.bashrc + - echo 'export KUBECONFIG=/etc/kubernetes/admin.conf' >>/root/.bashrc + - apt-get -y autoremove && apt-get -y clean all + postKubeadmCommands: + - set -x + - curl https://baltocdn.com/helm/signing.asc | gpg --dearmor | sudo tee /usr/share/keyrings/helm.gpg > /dev/null + - echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/helm.gpg] https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list + - apt-get -y update + - apt-get -y install git helm + - git clone https://github.com/Obmondo/kubeaid.git + - kubectl create ns cilium + - helm template kubeaid/argocd-helm-charts/cilium --values kubeaid/argocd-helm-charts/cilium/values.yaml -n cilium | kubectl apply -f -n cilium + - helm template kubeaid/argocd-helm-charts/ccm-hetzner --set ccm-hetzner.secret.name=capi-cluster-hetzner --namespace kube-system --set ccm-hetzner.privateNetwork.enabled=false | kubectl apply -f -n kube-system machineTemplate: infrastructureRef: apiVersion: infrastructure.cluster.x-k8s.io/v1beta1