mariadb
ballj/mariadb/kubernetes
This terraform module deploys a MariaDB statefulset into a kubernetes cluster.
Terraform Kubernetes MariaDB This terraform module deploys a MariaDB statefulset into a kubernetes cluster. Usage `` module "mariadb" { source = "ballj/mariadb/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 | | name | Yes | N/A | Database to create on startup | | username | No | dbuser | Database user to add | | password_secret | No |
| Name | Type | Description | Default |
|---|---|---|---|
| name | string | Name of the database to create | required |
| object_prefix | string | Unique name to prefix all objects with | required |
| namespace | string | Kubernetes namespace for deployment | required |
| template_annotations | map(string) | Annotations to add to the template | {} |
| password_autocreate_length | number | Length of the automatically generated password | 16 |
| env_secret | list(object({ name = str | Environment variables to pull from secrets | [] |
| readiness_probe_initial_delay | number | Initial delay of the probe in seconds | 10 |
| liveness_probe_enabled | bool | Enable the readyness probe | true |
| image_tag | string | Docker image tag to use | "10.6.4-debian-10-r9" |
| service_traffic_policy | string | Service external traffic policy | "Local" |
| readiness_probe_timeout | number | Timeout of the probe in seconds | 1 |
| liveness_probe_period | number | Period of the probe in seconds | 10 |
| startup_probe_period | number | Period of the probe in seconds | 1 |
| username | string | Username of new user to create | "dbuser" |
| annotations | map(string) | Annotations to add to the deployment | {} |
| liveness_probe_failure | number | Minimum consecutive failures for the probe to be considered failed after having | 3 |
| timeout_update | string | Timeout for creating the statefulset | "4m" |
| password_autocreate_special | bool | Use special characters in the generated password | false |
| revision_history | number | The number of old ReplicaSets to retain | 4 |
| empty_dir_medium | string | Medium of the empty_dir if no PVC is specified | "" |
| service_account_name | string | Service account name to add to the pod | "" |
| liveness_probe_timeout | number | Timeout of the probe in seconds | 1 |
| startup_probe_initial_delay | number | Initial delay of the probe in seconds | 30 |
| … and 10 more inputs | |||
hostname — 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 nameusername — Username that can login to the databsetype — Type of database deployed