my-homelab-configs/bootstrap/platform/variables.tf

256 lines
6.6 KiB
HCL

variable "kubeconfig_path" {
type = string
default = "/home/jv/.kube/config"
}
variable "pod_network_cidr" {
type = string
default = "10.244.0.0/16"
}
variable "calico_node_address_autodetection_cidrs" {
type = list(string)
default = ["192.168.100.0/24"]
}
variable "calico_operator_node_name" {
type = string
default = "debian"
}
variable "gitops_repo_url" {
type = string
default = "ssh://192.168.100.89:32222/jv/my-homelab-configs.git"
}
variable "gitops_ssh_key_path" {
type = string
default = "/home/jv/.ssh/id_ed25519"
}
variable "calico" {
type = object({
repository = string
version = string
namespace = string
})
default = {
repository = "https://docs.tigera.io/calico/charts"
version = "v3.32.0"
namespace = "tigera-operator"
}
}
variable "openebs" {
type = object({
repository = string
version = string
namespace = string
retain_storage_class = string
base_path = string
})
default = {
repository = "https://openebs.github.io/openebs"
version = "4.3.3"
namespace = "openebs"
retain_storage_class = "openebs-hostpath-retain"
base_path = "/var/openebs/local"
}
}
variable "argocd" {
type = object({
repository = string
version = string
namespace = string
repo_secret_name = string
})
default = {
repository = "https://argoproj.github.io/argo-helm"
version = "8.5.8"
namespace = "argocd"
repo_secret_name = "homelab-configs-repo"
}
}
variable "kyverno" {
type = object({
repository = string
chart_version = string
policies_version = string
namespace = string
})
default = {
repository = "https://kyverno.github.io/kyverno/"
chart_version = "3.8.1"
policies_version = "3.8.0"
namespace = "kyverno"
}
}
variable "nodelocal_dns" {
type = object({
enabled = bool
image = string
local_ip = string
cluster_dns_ip = string
cluster_domain = string
upstream_dns_servers = list(string)
})
default = {
enabled = false
image = "registry.k8s.io/dns/k8s-dns-node-cache:1.26.8"
local_ip = "169.254.20.10"
cluster_dns_ip = "10.96.0.10"
cluster_domain = "cluster.local"
upstream_dns_servers = ["1.1.1.1", "8.8.8.8"]
}
}
variable "metallb" {
type = object({
enabled = bool
repository = string
version = string
namespace = string
address_pool = list(string)
l2_advertisement_enabled = bool
pool_name = string
})
default = {
enabled = true
repository = "https://metallb.github.io/metallb"
version = "0.16.0"
namespace = "metallb-system"
address_pool = ["192.168.100.240-192.168.100.240"]
l2_advertisement_enabled = true
pool_name = "homelab-lan"
}
}
variable "traefik" {
type = object({
enabled = bool
repository = string
chart_version = string
namespace = string
load_balancer_ip = string
ingress_class = string
})
default = {
enabled = true
repository = "https://helm.traefik.io/traefik"
chart_version = "40.2.0"
namespace = "traefik"
load_balancer_ip = "192.168.100.240"
ingress_class = "traefik"
}
}
variable "observability" {
type = object({
namespace = string
prometheus = object({
repository = string
chart = string
version = string
retention = string
storage_size = string
alertmanager_storage_size = string
grafana_storage_size = string
remote_write_mimir_enabled = bool
})
loki = object({
repository = string
chart = string
version = string
storage_size = string
retention_period = string
})
promtail = object({
repository = string
chart = string
version = string
})
mimir = object({
enabled = optional(bool, false)
repository = string
chart = string
version = string
minio_storage_size = string
alertmanager_storage_size = string
ingester_storage_size = string
store_gateway_storage_size = string
compactor_storage_size = string
})
})
default = {
namespace = "monitoring"
prometheus = {
repository = "https://prometheus-community.github.io/helm-charts"
chart = "kube-prometheus-stack"
version = "85.3.3"
retention = "7d"
storage_size = "15Gi"
alertmanager_storage_size = "1Gi"
grafana_storage_size = "2Gi"
remote_write_mimir_enabled = true
}
loki = {
repository = "https://grafana.github.io/helm-charts"
chart = "loki"
version = "7.0.0"
storage_size = "10Gi"
retention_period = "168h"
}
promtail = {
repository = "https://grafana.github.io/helm-charts"
chart = "promtail"
version = "6.17.1"
}
mimir = {
enabled = false
repository = "https://grafana.github.io/helm-charts"
chart = "mimir-distributed"
version = "5.8.0"
minio_storage_size = "10Gi"
alertmanager_storage_size = "1Gi"
ingester_storage_size = "4Gi"
store_gateway_storage_size = "4Gi"
compactor_storage_size = "4Gi"
}
}
}
variable "prometheus_stack_node_selector" {
description = "Node selector applied to kube-prometheus-stack control workloads so they stay off the control plane."
type = map(string)
default = {
"kubernetes.io/os" = "linux"
"homelab.dev/workload-class" = "platform"
}
}
variable "extra_helm_releases" {
type = map(object({
repository = string
chart = string
version = string
namespace = string
create_namespace = bool
timeout = number
values_yaml = string
set_values = map(string)
}))
default = {}
}