mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-10 04:49:19 -08:00
[POSTGRES] Create claim explicitly
This commit is contained in:
parent
1db0de284b
commit
faa1b2f290
1 changed files with 18 additions and 2 deletions
|
|
@ -23,6 +23,22 @@ 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,
|
||||||
|
|
@ -39,8 +55,8 @@ resource "helm_release" "postgresql" {
|
||||||
force_update = true
|
force_update = true
|
||||||
|
|
||||||
set {
|
set {
|
||||||
name = "global.storageClass"
|
name = "persistence.existingClaim"
|
||||||
value = "local-path"
|
value = kubernetes_persistent_volume_claim.postgresql.metadata[0].name
|
||||||
}
|
}
|
||||||
set {
|
set {
|
||||||
name = "global.postgresql.existingSecret"
|
name = "global.postgresql.existingSecret"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue