diff --git a/distribution.create_cluster.sh b/distribution.create_cluster.sh index f16946b267f987b84ca0e7eb5fd8ed81ff465aad..e7e7ea60784c2edb3ac15ef0f4bfd7bc2163f5f0 100644 --- a/distribution.create_cluster.sh +++ b/distribution.create_cluster.sh @@ -15,4 +15,21 @@ k3d cluster create distribution \ --kubeconfig-update-default=true \ --kubeconfig-switch-context=true +calico_dir="/tmp/calico" +git clone https://git.420joos.dev/kubernetes-cluster/networking/calico.git "${calico_dir}" + +calico_repo_name="projectcalico" +helm repo add ${calico_repo_name} https://docs.tigera.io/calico/charts +helm upgrade calico ${calico_repo_name}/tigera-operator \ + --install \ + --version "${CALICO_VERSION:-v3.29.2}" \ + --namespace ${NAMESPACE} \ + --create-namespace \ + --values "${calico_dir}/values.yaml" \ + --wait \ + --set "installation.calicoNetwork.ipPools[0].cidr=${CLUSTER_CIDR}" + +helm repo remove ${calico_repo_name} +rm -rf "${calico_dir}" + # TODO: setup cluster for usage (agent & maybe calico)