ci: change variables to use more nodes

This commit is contained in:
Patryk Hegenberg 2025-05-07 21:42:53 +02:00
parent 5e85050e79
commit a0ca8341aa

View file

@ -1,13 +1,13 @@
variable "cluster_name" {
description = "A name prefix for the cluster resources."
type = string
default = "k3s"
type = string
default = "k3s"
}
variable "libvirt_uri" {
description = "Libvirt connection URI."
type = string
default = "qemu:///system"
type = string
default = "qemu:///system"
}
# --- Base Image ---
@ -29,7 +29,7 @@ variable "libvirt_pool" {
default = "default"
}
# --- VM Common Settings ---
# --- SSH & User ---
variable "ssh_public_key_path" {
description = "Path to your public SSH key for accessing the VMs."
type = string
@ -42,24 +42,6 @@ variable "vm_user" {
default = "fedora"
}
variable "vm_memory" {
description = "Memory for each VM in MiB."
type = number
default = 2048
}
variable "vm_vcpu" {
description = "Number of virtual CPUs for each VM."
type = number
default = 2
}
variable "vm_disk_size" {
description = "Disk size for each VM's root volume in bytes."
type = number
default = 21474836480
}
# --- Network ---
variable "libvirt_network_name" {
description = "Name of the libvirt network to connect VMs to."
@ -67,15 +49,61 @@ variable "libvirt_network_name" {
default = "default"
}
# --- Node Specific ---
# --- Server spezifisch ---
variable "server_hostname" {
description = "Hostname for the K3s server node."
description = "Hostname für den K3s Server."
type = string
default = "k3s-server"
}
variable "agent_hostname" {
description = "Hostname for the K3s agent node."
type = string
default = "k3s-agent-01"
variable "server_memory" {
description = "RAM für den Server (in MiB)"
type = number
default = 4096
}
variable "server_vcpu" {
description = "vCPUs für den Server"
type = number
default = 4
}
variable "server_disk_size" {
description = "Diskgröße für den Server (in Bytes)"
type = number
default = 32212254720 # 30 GB
}
variable "server_ip" {
description = "Feste IP für den Server"
type = string
default = "192.168.124.100"
}
# --- Agent spezifisch ---
variable "agent_count" {
description = "Anzahl der Agenten"
type = number
default = 2
}
variable "agent_memory" {
description = "RAM pro Agent (in MiB)"
type = number
default = 3072
}
variable "agent_vcpu" {
description = "vCPUs pro Agent"
type = number
default = 2
}
variable "agent_disk_size" {
description = "Diskgröße pro Agent (in Bytes)"
type = number
default = 32212254720 # 30 GB
}
variable "agent_hostname_prefix" {
description = "Prefix für Agent Hostnamen"
type = string
default = "k3s-agent"
}
variable "agent_ips" {
description = "Feste IPs für die Agenten"
type = list(string)
default = ["192.168.124.101", "192.168.124.102"]
}