2022-12-06 15:44:25 +01:00
|
|
|
locals {
|
|
|
|
// Definition of the Kubernetes service (templater compatible)
|
|
|
|
ServiceK3S = {
|
|
|
|
ConfigFiles = [
|
|
|
|
{
|
|
|
|
destination = "/etc/conf.d/k3s"
|
|
|
|
source = "k3s.conf.pkr.hcl"
|
|
|
|
mode = "600"
|
|
|
|
owner = "root"
|
|
|
|
group = "root"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
Repositories = {
|
|
|
|
AlpineEdge = {
|
|
|
|
type = "apk"
|
|
|
|
name = "community"
|
2023-02-08 12:02:37 +01:00
|
|
|
url = "http://mirrors.ircam.fr/pub/alpine/edge/community"
|
2022-12-06 15:44:25 +01:00
|
|
|
enabled = true
|
|
|
|
}
|
|
|
|
AlpineEdgeTesting = {
|
|
|
|
type = "apk"
|
|
|
|
name = "testing"
|
2023-02-08 12:02:37 +01:00
|
|
|
url = "http://mirrors.ircam.fr/pub/alpine/edge/testing"
|
2022-12-06 15:44:25 +01:00
|
|
|
enabled = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Packages = {
|
|
|
|
kubelet = {
|
|
|
|
name = "k3s"
|
|
|
|
action = "install"
|
|
|
|
}
|
|
|
|
kubeadm = {
|
|
|
|
name = "kubeadm"
|
|
|
|
action = "install"
|
|
|
|
}
|
|
|
|
kubectl = {
|
|
|
|
name = "kubectl"
|
|
|
|
action = "install"
|
|
|
|
}
|
|
|
|
uuidgen = {
|
|
|
|
name = "uuidgen"
|
|
|
|
action = "install"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Vars = {
|
|
|
|
ServerName = "kube"
|
|
|
|
ServerRole = "master"
|
|
|
|
DeployTraefik = false
|
|
|
|
}
|
|
|
|
Users = {}
|
|
|
|
Daemons = {
|
|
|
|
kubelet = {
|
|
|
|
name = "k3s"
|
|
|
|
type = "auto"
|
|
|
|
enabled = true
|
|
|
|
}
|
|
|
|
ntpd = {
|
|
|
|
name = "ntpd"
|
|
|
|
type = "auto"
|
|
|
|
enabled = true
|
|
|
|
}
|
|
|
|
local = {
|
|
|
|
name = "local"
|
|
|
|
type = "auto"
|
|
|
|
enabled = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Definition of the Kubernetes full configuration (with all the services)
|
|
|
|
K3S = {
|
|
|
|
Name = "k3s"
|
|
|
|
Globals = local.Globals
|
|
|
|
Services = {
|
|
|
|
Docker = local.ServiceDocker
|
|
|
|
K3S = local.ServiceK3S
|
|
|
|
}
|
|
|
|
}
|
2023-02-08 12:02:37 +01:00
|
|
|
}
|