init: copy from lawndale-infra
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
36
volume.tf
Normal file
36
volume.tf
Normal 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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user