Files
hapi/infra/k8s/variables.tf
T
Bobby 88235fc824 feat: Add PostgreSQL Kubernetes deployment with Kustomize
- Create infrastructure for PostgreSQL StatefulSet in Kubernetes
- Implement environment-specific configurations (staging/production)
- Add Kustomize overlays for deterministic deployments
- Document deployment process in AGENTS.md and infra/k8s/README.md
- Include Makefile and helper scripts for easy management

New directories:
- infra/k8s/base/ - Shared resources (StatefulSet, Service, PVC, Namespace)
- infra/k8s/staging/ - Staging environment overlay
- infra/k8s/production/ - Production environment overlay

Key files:
- infra/k8s/base/kustomization.yaml
- infra/k8s/staging/kustomization.yaml
- infra/k8s/production/kustomization.yaml
- infra/k8s/README.md

Resources are prefixed by environment (staging-, production-) and deployed
to the postgres namespace.
2026-11-18 15:29:00 -05:00

59 lines
1.3 KiB
Terraform

# Variables for PostgreSQL Kubernetes module
variable "environment" {
description = "Deployment environment (staging or production)"
type = string
validation {
condition = contains(["staging", "production"], var.environment)
error_message = "Environment must be 'staging' or 'production'."
}
}
variable "linode_region" {
description = "Linode region for PostgreSQL"
type = string
default = "us-east"
}
variable "postgres_image" {
description = "PostgreSQL Docker image"
type = string
default = "postgres:16.3"
}
variable "postgres_db" {
description = "PostgreSQL database name"
type = string
default = "hapi_staging"
}
variable "storage_size" {
description = "Storage size for PostgreSQL PVC"
type = string
default = "50Gi"
}
variable "cpu_request" {
description = "CPU request for PostgreSQL pod"
type = string
default = "500m"
}
variable "cpu_limit" {
description = "CPU limit for PostgreSQL pod"
type = string
default = "1000m"
}
variable "memory_request" {
description = "Memory request for PostgreSQL pod"
type = string
default = "512Mi"
}
variable "memory_limit" {
description = "Memory limit for PostgreSQL pod"
type = string
default = "1Gi"
}