[POSTGRES] Dependencies

This commit is contained in:
Kat Inskip 2023-05-06 13:36:42 -07:00
parent ecbeb41ec9
commit 0a5dfcbde0
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
3 changed files with 6 additions and 22 deletions

2
.gitmodules vendored
View file

@ -1,3 +1,3 @@
[submodule "lpp"] [submodule "lpp"]
path = cluster/lpp path = cluster/lpp
url = git@github.com:rancher/local-path-provisioner.git url = https://github.com/rancher/local-path-provisioner.git

View file

@ -1,7 +1,7 @@
resource "helm_release" "local_path_provisioner" { resource "helm_release" "local_path_provisioner" {
name = "local-path-storage" name = "local-path-provisioner"
repository = "./lpp" repository = "${path.module}/lpp/deploy/chart"
chart = "local-path-storage" chart = "local-path-provisioner"
create_namespace = true create_namespace = true
namespace = "local-path-storage" namespace = "local-path-storage"

View file

@ -23,22 +23,6 @@ resource "kubernetes_secret" "postgres_auth_secret" {
type = "Opaque" type = "Opaque"
} }
resource "kubernetes_persistent_volume_claim" "postgresql" {
metadata {
name = "prometheus-data"
namespace = "postgresql"
}
spec {
access_modes = [ "ReadWriteOnce" ]
resources {
requests = {
storage = "8Gi"
}
}
storage_class_name = "local-path"
}
}
resource "helm_release" "postgresql" { resource "helm_release" "postgresql" {
depends_on = [ depends_on = [
kubernetes_namespace.postgres_namespace, kubernetes_namespace.postgres_namespace,
@ -55,8 +39,8 @@ resource "helm_release" "postgresql" {
force_update = true force_update = true
set { set {
name = "persistence.existingClaim" name = "global.storageClass"
value = kubernetes_persistent_volume_claim.postgresql.metadata[0].name value = "local-path"
} }
set { set {
name = "global.postgresql.existingSecret" name = "global.postgresql.existingSecret"