133 lines
2.8 KiB
HCL
133 lines
2.8 KiB
HCL
locals {
|
|
// Definition of the Kubernetes service (templater compatible)
|
|
ServiceKubernetes = {
|
|
ConfigFiles = [
|
|
{
|
|
destination = "/etc/cluster.yaml"
|
|
source = "cluster.yaml.pktpl.hcl"
|
|
mode = "600"
|
|
owner = "root"
|
|
group = "root"
|
|
},
|
|
{
|
|
destination = "/etc/rc.conf"
|
|
source = "rc.conf.pktpl.hcl"
|
|
mode = "600"
|
|
owner = "root"
|
|
group = "root"
|
|
}
|
|
]
|
|
Repositories = {}
|
|
Packages = {
|
|
docker = {
|
|
name = "docker"
|
|
action = "install"
|
|
}
|
|
docker-compose = {
|
|
name = "docker-compose"
|
|
action = "install"
|
|
}
|
|
gpg = {
|
|
name = "gpg"
|
|
action = "install"
|
|
}
|
|
kubeadm = {
|
|
name = "kind"
|
|
action = "install"
|
|
}
|
|
vmtools = {
|
|
name = "open-vm-tools"
|
|
action = "install"
|
|
}
|
|
vmtools-rc = {
|
|
name = "open-vm-tools-openrc"
|
|
action = "install"
|
|
}
|
|
}
|
|
Vars = {
|
|
RootlessDocker = "true"
|
|
Cluster = {
|
|
Name = "nuo"
|
|
IngressReady = true
|
|
PodSubNet = "10.110.0.0/16"
|
|
ServieSubNet = "10.115.0.0/16"
|
|
Version = "1.27.2"
|
|
Nodes = [
|
|
{
|
|
Role = "control-plane"
|
|
Ports = [
|
|
{
|
|
containerPort = 31000
|
|
hostPort = 31000
|
|
listenAddress = "0.0.0.0"
|
|
},
|
|
{
|
|
containerPort = 80
|
|
hostPort = 8080
|
|
listenAddress = "0.0.0.0"
|
|
},
|
|
{
|
|
containerPort = 443
|
|
hostPort = 8443
|
|
listenAddress = "0.0.0.0"
|
|
}
|
|
]
|
|
},
|
|
{ Role = "worker" },
|
|
{ Role = "worker" },
|
|
{ Role = "worker" }
|
|
]
|
|
}
|
|
}
|
|
Users = {
|
|
dock = {
|
|
username = "dock"
|
|
group = "dock"
|
|
home = "/srv/dock"
|
|
shell = "/bin/nologin"
|
|
}
|
|
}
|
|
Daemons = {
|
|
vm-tools = {
|
|
name = "open-vm-tools"
|
|
type = "auto"
|
|
enabled = true
|
|
}
|
|
docker = {
|
|
name = "docker"
|
|
type = "auto"
|
|
enabled = true
|
|
}
|
|
cgroups = {
|
|
name = "cgroups"
|
|
type = "auto"
|
|
enabled = true
|
|
}
|
|
local = {
|
|
name = "local"
|
|
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)
|
|
Kind = {
|
|
Name = "kind"
|
|
Globals = local.Globals
|
|
Services = {
|
|
Kubernetes = local.ServiceKubernetes
|
|
}
|
|
}
|
|
}
|