postgresql
ballj/postgresql/kubernetes
Terraform module to create a PostgreSQL server
Terraform Kubernetes PostgreSQL This terraform module deploys a PostgreSQL statefulset into a kubernetes cluster. Useage `` module "postgresql" { source = "ballj/postgresql/kubernetes" version = "~> 1.2" namespace = "production" object_prefix = "myapp-db" database_name = "myapp_db" labels = { "app.kubernetes.io/part-of" = "myapp" } } ` Variables StatefulSets Variables | Variable | Required | Default | Description | | --------------------------------- | -------- | --------------------------- | -------------------------------------------------- | | namespace | Yes | N/A | Kubernetes namespace to deploy into | | object_prefix | Yes | N/A | Unique name to prefix all objects with | | database_name | Yes | N/A | Database to create on startup | | username | No | dbuser | Database user to add | |
| Name | Type | Description | Default |
|---|---|---|---|
| namespace | string | Kubernetes namespace for deployment | required |
| name | string | Name of the database to create | required |
| object_prefix | string | Unique name to prefix all objects with | required |
| pod_management_policy | string | Controls how pods are created during scale up or down | "OrderedReady" |
| empty_dir_size | string | Size of the empty_dir created if no pvc is specified | 0 |
| readiness_probe_failure | number | Minimum consecutive failures for the probe to be considered failed after having | 3 |
| password_secret | string | Secret containing database password information | "" |
| resources_requests_memory | string | The minimum amount of compute resources required | null |
| resources_limits_cpu | string | The maximum amount of compute resources allowed | null |
| liveness_probe_period | number | Period of the probe in seconds | 10 |
| service_traffic_policy | string | Service external traffic policy | "Local" |
| readiness_probe_initial_delay | number | Initial delay of the probe in seconds | 30 |
| liveness_probe_enabled | bool | Enable the readyness probe | true |
| image_name | string | Docker image to use | "bitnami/postgresql" |
| password_autocreate_length | number | Length of the automatically generated password | 16 |
| wait_for_rollout | bool | Wait for the pod rollout to complete | true |
| revision_history | number | The number of old ReplicaSets to retain | 4 |
| readiness_probe_enabled | bool | Enable the readyness probe | true |
| service_account_name | string | Service account name to add to the pod | "" |
| security_context_enabled | bool | Enable the security context | true |
| service_annotations | map(string) | Annotations to add to the service | {} |
| liveness_probe_initial_delay | number | Initial delay of the probe in seconds | 30 |
| liveness_probe_success | number | Minimum consecutive successes for the probe to be considered successful after ha | 1 |
| … and 10 more inputs | |||
username — Username that can login to the databsehostname — Name of the kubernetes serviceport — Port for the kubernetes servicepassword_secret — Secret that is created with the database passwordpassword_key — Key for the database password in the secretname — Database name