Some checks failed
Deploy / Update K8s Apps / Detect changed K8s tfvars (push) Successful in 12s
Deploy / Update Apps / Detect changed tfvars files (push) Successful in 11s
Test / Unit Tests — Docker Stack (push) Has been skipped
Test / Unit Tests — K8s Stack (push) Has been skipped
Test / Static Analysis (push) Failing after 23s
Deploy / Update K8s Apps / Deploy ${{ matrix.tfvars }} (push) Failing after 12s
Deploy / Update K8s Apps / Destroy ${{ matrix.tfvars }} (push) Has been skipped
Deploy / Update Apps / Deploy ${{ matrix.tfvars }} (push) Failing after 12s
Deploy / Update Apps / Destroy ${{ matrix.tfvars }} (push) Has been skipped
Test / Integration Test — K8s (k3d) (push) Has been skipped
144 lines
4.8 KiB
HCL
144 lines
4.8 KiB
HCL
# ─── Kubernetes Connection ────────────────────────────────────────────────────
|
|
|
|
variable "kubeconfig_path" {
|
|
description = "Absolute path to the kubeconfig file on the CI runner (fetched from gopass at pipeline runtime)."
|
|
type = string
|
|
}
|
|
|
|
# ─── App Identity ─────────────────────────────────────────────────────────────
|
|
|
|
variable "app_name" {
|
|
description = "Unique name for this app deployment. Becomes the K8s namespace and resource prefix."
|
|
type = string
|
|
}
|
|
|
|
variable "environment" {
|
|
description = "Deployment environment label (attached to Loki log streams)."
|
|
type = string
|
|
default = "dev"
|
|
}
|
|
|
|
# ─── App Container ────────────────────────────────────────────────────────────
|
|
|
|
variable "app_image" {
|
|
description = "Container image for the main application."
|
|
type = string
|
|
}
|
|
|
|
variable "app_port" {
|
|
description = "Port the app container listens on."
|
|
type = number
|
|
default = 1880
|
|
}
|
|
|
|
# ─── Init Container ───────────────────────────────────────────────────────────
|
|
|
|
variable "init_container_image" {
|
|
description = "Image for the init container (must contain default data files at init_data_src_path)."
|
|
type = string
|
|
}
|
|
|
|
variable "init_data_src_path" {
|
|
description = "Path inside the init container image where default data files live."
|
|
type = string
|
|
default = "/app-data"
|
|
}
|
|
|
|
# ─── Storage ──────────────────────────────────────────────────────────────────
|
|
|
|
variable "storage_class" {
|
|
description = "Kubernetes StorageClass for PVCs. Empty string uses cluster default (k3s: local-path)."
|
|
type = string
|
|
default = ""
|
|
}
|
|
|
|
variable "app_pvc_size" {
|
|
description = "Storage size for the app data PVC."
|
|
type = string
|
|
default = "2Gi"
|
|
}
|
|
|
|
# ─── Ingress ──────────────────────────────────────────────────────────────────
|
|
|
|
variable "app_path_prefix" {
|
|
description = "Traefik URL path prefix for the app (e.g. '/myapp')."
|
|
type = string
|
|
}
|
|
|
|
variable "traefik_api_group" {
|
|
description = "Traefik CRD API group. k3s >= 1.27: 'traefik.io/v1alpha1'. Older: 'traefik.containo.us/v1alpha1'."
|
|
type = string
|
|
default = "traefik.io/v1alpha1"
|
|
}
|
|
|
|
variable "traefik_entrypoint" {
|
|
description = "Traefik entryPoint name (e.g. 'web' or 'websecure')."
|
|
type = string
|
|
default = "web"
|
|
}
|
|
|
|
# ─── Grafana Alloy ────────────────────────────────────────────────────────────
|
|
|
|
variable "alloy_image" {
|
|
description = "Grafana Alloy container image."
|
|
type = string
|
|
default = "grafana/alloy:v1.5.0"
|
|
}
|
|
|
|
variable "loki_endpoint" {
|
|
description = "Loki push API URL."
|
|
type = string
|
|
}
|
|
|
|
variable "loki_auth_token" {
|
|
description = "Bearer token for Loki. Leave empty for unauthenticated Loki."
|
|
type = string
|
|
default = ""
|
|
sensitive = true
|
|
}
|
|
|
|
# ─── RabbitMQ ─────────────────────────────────────────────────────────────────
|
|
|
|
variable "enable_rabbitmq" {
|
|
description = "Deploy RabbitMQ StatefulSet alongside the app."
|
|
type = bool
|
|
default = false
|
|
}
|
|
|
|
variable "rabbitmq_image" {
|
|
description = "RabbitMQ Docker image."
|
|
type = string
|
|
default = "rabbitmq:3.13-management-alpine"
|
|
}
|
|
|
|
variable "rabbitmq_user" {
|
|
description = "RabbitMQ default user."
|
|
type = string
|
|
default = "guest"
|
|
}
|
|
|
|
variable "rabbitmq_password" {
|
|
description = "RabbitMQ default user password."
|
|
type = string
|
|
sensitive = true
|
|
default = ""
|
|
}
|
|
|
|
variable "rabbitmq_vhost" {
|
|
description = "RabbitMQ default virtual host."
|
|
type = string
|
|
default = "/"
|
|
}
|
|
|
|
variable "rabbitmq_pvc_size" {
|
|
description = "Storage size for the RabbitMQ data PVC."
|
|
type = string
|
|
default = "2Gi"
|
|
}
|
|
|
|
variable "rabbitmq_path_prefix" {
|
|
description = "Traefik path prefix for the RabbitMQ management UI."
|
|
type = string
|
|
default = "/rabbitmq"
|
|
}
|