♻️ Update vcluster Helm chart; improve konk script

It is now possible to have multiple konk clusters in parallel,
thanks to the KONKTAG environment variable.
This commit is contained in:
Jérôme Petazzoni
2025-10-01 16:44:11 +02:00
parent 55f9b2e21d
commit 4a8725fde4
2 changed files with 39 additions and 19 deletions

View File

@@ -5,16 +5,22 @@
# 10% CPU
# (See https://docs.google.com/document/d/1n0lwp6rQKQUIuo_A5LQ1dgCzrmjkDjmDtNj1Jn92UrI)
# PRO2-XS = 4 core, 16 gb
#
# With vspod:
# 800 MB RAM
# 33% CPU
#
set -e
PROVIDER=scaleway
STUDENTS=30
KONKTAG=konk
PROVIDER=linode
STUDENTS=5
case "$PROVIDER" in
linode)
export TF_VAR_node_size=g6-standard-6
export TF_VAR_location=us-east
export TF_VAR_location=fr-par
;;
scaleway)
export TF_VAR_node_size=PRO2-XS
@@ -28,11 +34,13 @@ esac
export KUBECONFIG=~/kubeconfig
if [ "$PROVIDER" = "kind" ]; then
kind create cluster --name konk
kind create cluster --name $KONKTAG
ADDRTYPE=InternalIP
else
./labctl create --mode mk8s --settings settings/konk.env --provider $PROVIDER --tag konk
cp tags/konk/stage2/kubeconfig.101 $KUBECONFIG
if ! [ -f tags/$KONKTAG/stage2/kubeconfig.101 ]; then
./labctl create --mode mk8s --settings settings/konk.env --provider $PROVIDER --tag $KONKTAG
fi
cp tags/$KONKTAG/stage2/kubeconfig.101 $KUBECONFIG
ADDRTYPE=ExternalIP
fi

View File

@@ -4,23 +4,35 @@ resource "helm_release" "_" {
create_namespace = true
repository = "https://charts.loft.sh"
chart = "vcluster"
version = "0.19.7"
version = "0.27.1"
values = [
yamlencode({
service = {
type = "NodePort"
}
storage = {
persistence = false
}
sync = {
nodes = {
enabled = true
syncAllNodes = true
controlPlane = {
proxy = {
extraSANs = [ local.guest_api_server_host ]
}
service = {
spec = {
type = "NodePort"
}
}
statefulSet = {
persistence = {
volumeClaim = {
enabled = true
}
}
}
}
syncer = {
extraArgs = ["--tls-san=${local.guest_api_server_host}"]
sync = {
fromHost = {
nodes = {
enabled = true
selector = {
all = true
}
}
}
}
})
]