diff --git a/distribution.create_cluster.sh b/distribution.create_cluster.sh index 8a2749726081a5abd7987576651715eacd1a7383..7d2e2071094ff4e4be1883d098540e7be26b897c 100644 --- a/distribution.create_cluster.sh +++ b/distribution.create_cluster.sh @@ -32,18 +32,14 @@ install_helm_chart calico \ 5m \ "${calico_dir}/values.yaml" \ "--set installation.calicoNetwork.ipPools[0].cidr=${CLUSTER_CIDR}" -# helm repo add ${calico_repo_name} https://docs.tigera.io/calico/charts -# helm repo update -# helm upgrade calico ${calico_repo_name}/tigera-operator \ -# --install \ -# --version "${CALICO_VERSION:-v3.29.2}" \ -# --namespace tigera-operator \ -# --create-namespace \ -# --values "${calico_dir}/values.yaml" \ -# --wait \ -# --set "installation.calicoNetwork.ipPools[0].cidr=${CLUSTER_CIDR}" -helm repo remove ${calico_repo_name} +remove_helm_repo ${calico_repo_name} rm -rf "${calico_dir}" # install gitlab agent +install_gitlab_agent \ + "${GITLAB_AGENT_CHART_VERSION:-2.7.2}" \ + "https://git.420joos.dev/kubernetes-cluster/gitlab/runners/kubernetes-agent.git" \ + "values.yaml" \ + "${GITLAB_AGENT_IMAGE_VERSION:-17.4.1}" \ + "${GITLAB_AGENT_TOKEN}" diff --git a/helpers/helm_helpers.sh b/helpers/helm_helpers.sh index 45cd830e45686139e9df90af48ab85f5c1bc29a1..270e206beae1d2707edf29180f1c7c34795775a8 100644 --- a/helpers/helm_helpers.sh +++ b/helpers/helm_helpers.sh @@ -42,7 +42,7 @@ install_gitlab_agent() { chart_version=$1 git_repo_url=$2 values_filenames=$3 - image_tag=$4 + image_version=$4 token=$5 git_repo_dir="/tmp/gitlab-agent" @@ -51,7 +51,7 @@ install_gitlab_agent() { values_files="${values_files} ${git_repo_dir}/${filename}" done - upgrade_args="--set image.tag=${image_tag} --set config.token=${token}" + upgrade_args="--set image.tag=v${image_version} --set config.token=${token}" git clone "${git_repo_url}" "${git_repo_dir}"