Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2178] Fix postgres container image version #136

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion aks/postgres/resources.tf
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ resource "kubernetes_deployment" "main" {
}
container {
name = local.kubernetes_name
image = var.server_docker_image
image = local.server_docker_image
resources {
requests = {
cpu = var.cluster_configuration_map.cpu_min
Expand Down
2 changes: 1 addition & 1 deletion aks/postgres/tfdocs.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ No modules.
| <a name="input_environment"></a> [environment](#input\_environment) | Current application environment | `string` | n/a | yes |
| <a name="input_name"></a> [name](#input\_name) | Name of the instance | `string` | `null` | no |
| <a name="input_namespace"></a> [namespace](#input\_namespace) | Current namespace | `string` | n/a | yes |
| <a name="input_server_docker_image"></a> [server\_docker\_image](#input\_server\_docker\_image) | Database image to use with kubernetes deployment, eg. postgis/postgis:16-3.4 | `string` | `"postgres:16-alpine"` | no |
| <a name="input_server_docker_image"></a> [server\_docker\_image](#input\_server\_docker\_image) | Docker Hub image for the kubernetes deployment, eg. postgis/postgis:16-3.5. Default is postgres:<server\_version>-alpine | `string` | `null` | no |
| <a name="input_server_version"></a> [server\_version](#input\_server\_version) | Version of PostgreSQL server | `string` | `"16"` | no |
| <a name="input_service_name"></a> [service\_name](#input\_service\_name) | Name of the service | `string` | n/a | yes |
| <a name="input_service_short"></a> [service\_short](#input\_service\_short) | Short name of the service | `string` | n/a | yes |
Expand Down
9 changes: 6 additions & 3 deletions aks/postgres/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,8 @@ variable "cluster_configuration_map" {

variable "server_docker_image" {
type = string
nullable = false
default = "postgres:16-alpine"
description = "Database image to use with kubernetes deployment, eg. postgis/postgis:16-3.4"
default = null
description = "Docker Hub image for the kubernetes deployment, eg. postgis/postgis:16-3.5. Default is postgres:<server_version>-alpine"
}

variable "server_version" {
Expand Down Expand Up @@ -157,3 +156,7 @@ variable "create_database" {
nullable = false
description = "Create default database. If the app creates the database instead of this module, set to false. Default: true"
}

locals {
server_docker_image = var.server_docker_image == null ? "postgres:${var.server_version}-alpine" : var.server_docker_image
}
Loading