init: copy from lawndale-infra
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2022-05-27 22:07:43 +02:00
commit 3ca47a84ce
12 changed files with 420 additions and 0 deletions

36
volume.tf Normal file
View File

@@ -0,0 +1,36 @@
locals {
volume_storage_capacity = "1Gi"
}
resource "kubernetes_persistent_volume" "this" {
metadata {
name = "pv-p9hostpath-grafana"
}
spec {
capacity = {
storage = local.volume_storage_capacity
}
access_modes = ["ReadWriteMany"]
persistent_volume_source {
host_path {
path = "/mnt/datastore/grafana"
}
}
}
}
resource "kubernetes_persistent_volume_claim" "this" {
metadata {
name = "grafana"
namespace = kubernetes_namespace.this.metadata.0.name
}
spec {
access_modes = ["ReadWriteMany"]
resources {
requests = {
storage = local.volume_storage_capacity
}
}
volume_name = kubernetes_persistent_volume.this.metadata.0.name
}
}