- 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.
17 lines
587 B
Terraform
17 lines
587 B
Terraform
# Backend configuration for HAPI Terraform state
|
|
|
|
terraform {
|
|
backend "s3" {
|
|
# State stored in Object Storage
|
|
bucket = "hapi-terraform-state-${var.environment}"
|
|
key = "hapi/terraform-${var.environment}.tfstate"
|
|
region = var.linode_object_storage_region
|
|
endpoint = "${var.linode_object_storage_region}.linodeobjects.com"
|
|
access_key = var.object_storage_access_key
|
|
secret_key = var.object_storage_secret_key
|
|
skip_region = true
|
|
skip_credentials_validation = true
|
|
skip_metadata_api_check = true
|
|
}
|
|
}
|