Skip to content

Commit

Permalink
pass in registry for exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
morga471 committed Apr 21, 2025
1 parent 71ccef6 commit f9fbb8e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
8 changes: 7 additions & 1 deletion keycloak-db-values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# See https://github.com/bitnami/charts/tree/master/bitnami/postgresql
global:
imageRegistry: ${registry}
security:
allowInsecureImages: true
postgresql:
Expand All @@ -14,7 +15,8 @@ global:
image:
registry:
repository:
tag:
tag: ${tag}

primary:
resources:
requests:
Expand All @@ -34,6 +36,10 @@ readReplicas:
# To enable metrics we need to pull in the posgresql-exporter image
metrics:
enabled: true
image:
repository: ${repository}
tag: ${exporter_tag}

persistence:
enabled: true

Expand Down
4 changes: 2 additions & 2 deletions keycloak-server-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ resources:
cpu: 500m
memory: 1024Mi
limits:
cpu: 1
memory: 4096Mi
cpu: 500m
memory: 1024Mi

database:
vendor: postgres
Expand Down
13 changes: 13 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,19 @@ resource "helm_release" "keycloak-db" {
name = "image.tag"
value = var.postgresql_tag
}

set {
name = "metrics.image.registry"
value = module.images.images[local.postgres_exporter_key].dest_registry
}
set {
name = "metrics.image.repository"
value = module.images.images[local.postgres_exporter_key].dest_registry
}
set {
name = "metrics.image.tag"
value = var.postgres_exporter_tag
}
}

data "kubernetes_secret" "db-secrets" {
Expand Down

0 comments on commit f9fbb8e

Please sign in to comment.