From 1f5c1fb2681d30ed8bd1d9941c495f8109701982 Mon Sep 17 00:00:00 2001 From: Angelos Kolaitis Date: Tue, 12 Sep 2023 17:42:00 +0300 Subject: [PATCH] Improve maas cluster template (#79) * update default machine configuration for maas template * optional resource pool configuration for control plane and worker machines --- templates/cluster-template-maas.rc | 12 ++++++++---- templates/cluster-template-maas.yaml | 2 ++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/templates/cluster-template-maas.rc b/templates/cluster-template-maas.rc index 0cd4e14..135bda7 100644 --- a/templates/cluster-template-maas.rc +++ b/templates/cluster-template-maas.rc @@ -8,10 +8,14 @@ export MAAS_DNS_DOMAIN="maas" # Control plane machine configuration export CONTROL_PLANE_MACHINE_MINCPU="1" -export CONTROL_PLANE_MACHINE_MINMEMORY="2" -export CONTROL_PLANE_MACHINE_IMAGE="ubuntu" +export CONTROL_PLANE_MACHINE_MINMEMORY="2048" +export CONTROL_PLANE_MACHINE_IMAGE="u-2204-k-1261-0" # Worker machine configuration export WORKER_MACHINE_MINCPU="1" -export WORKER_MACHINE_MINMEMORY="2" -export WORKER_MACHINE_IMAGE="ubuntu" +export WORKER_MACHINE_MINMEMORY="2048" +export WORKER_MACHINE_IMAGE="u-2204-k-1261-0" + +# (optional) Configure resource pools for control plane and worker machines +# export CONTROL_PLANE_MACHINE_RESOURCEPOOL="kvm-pool" +# export WORKER_MACHINE_RESOURCEPOOL="bare-metal-pool" diff --git a/templates/cluster-template-maas.yaml b/templates/cluster-template-maas.yaml index a5f7fd4..7f38822 100644 --- a/templates/cluster-template-maas.yaml +++ b/templates/cluster-template-maas.yaml @@ -53,6 +53,7 @@ spec: minCPU: ${CONTROL_PLANE_MACHINE_MINCPU} minMemory: ${CONTROL_PLANE_MACHINE_MINMEMORY} image: ${CONTROL_PLANE_MACHINE_IMAGE} + resourcePool: ${CONTROL_PLANE_MACHINE_RESOURCEPOOL:= } --- apiVersion: cluster.x-k8s.io/v1beta1 kind: MachineDeployment @@ -87,6 +88,7 @@ spec: minCPU: ${WORKER_MACHINE_MINCPU} minMemory: ${WORKER_MACHINE_MINMEMORY} image: ${WORKER_MACHINE_IMAGE} + resourcePool: ${WORKER_MACHINE_RESOURCEPOOL:= } --- apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 kind: MicroK8sConfigTemplate