add the option for hostpath as well

This commit is contained in:
2024-12-11 21:55:59 +00:00
parent 63abbfebbe
commit d61d080e5e
2 changed files with 18 additions and 8 deletions
+11 -2
View File
@@ -13,8 +13,9 @@ variable "kubernetes" {
image = string
pvc = optional(map(object({
name = string
pvc = optional(bool)
pvc = optional(bool,false)
config_map = optional(bool, false)
host_path = optional(string)
pvc_size = optional(string)
mount_path = string
})))
@@ -395,10 +396,18 @@ resource "kubernetes_deployment_v1" "automatic" {
dynamic "config_map" {
for_each = volume.value.config_map ? [1] : []
content {
name = "${volume.value.name}"
name = volume.value.name
}
}
dynamic "host_path" {
for_each = volume.value.host_path != null ? [1] : []
content {
path = volume.value.host_path
}
}
}
}
+4 -3
View File
@@ -356,12 +356,13 @@ kubernetes = {
media = {
pvc = false
config_map = true
name = "media"
name = "gitea-runner-configfile"
pvc_size = "2Mi"
mount_path = "/usr/src/paperless/media"
mount_path = "/tmp/usr/src/paperless/media"
}
export = {
pvc = true
# pvc = true
host_path = "/tmp"
name = "export"
pvc_size = "2Mi"
mount_path = "/usr/src/paperless/export"