2024-05-15 06:21:28 +00:00
|
|
|
locals {
|
|
|
|
filebrowser = {
|
|
|
|
# Name that is basically used everywhere
|
|
|
|
name = "filebrowser"
|
|
|
|
# For the claim itself
|
|
|
|
vol = {
|
|
|
|
size = "15Gi"
|
|
|
|
mode = "ReadWriteOnce"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-24 07:58:59 +00:00
|
|
|
resource kubernetes_pod filebrowser {
|
|
|
|
metadata {
|
|
|
|
name = "filebrowser"
|
|
|
|
namespace = kubernetes_namespace.vault.metadata.0.name
|
|
|
|
labels = {
|
|
|
|
app = "filebrowser"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
spec {
|
|
|
|
container {
|
|
|
|
image = "filebrowser/filebrowser"
|
|
|
|
name = "filebrowser"
|
|
|
|
env {
|
|
|
|
name = "TZ"
|
|
|
|
value = "PST"
|
|
|
|
}
|
|
|
|
port {
|
|
|
|
container_port = 80
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource kubernetes_service filebrowser {
|
|
|
|
metadata {
|
|
|
|
name = "filebrowser"
|
|
|
|
namespace = kubernetes_namespace.vault.metadata.0.name
|
|
|
|
}
|
|
|
|
spec {
|
|
|
|
selector = {
|
|
|
|
app = kubernetes_pod.filebrowser.metadata.0.labels.app
|
|
|
|
}
|
|
|
|
port {
|
|
|
|
port = 8000
|
|
|
|
target_port = 80
|
|
|
|
}
|
|
|
|
type = "LoadBalancer"
|
|
|
|
}
|
|
|
|
}
|
2024-05-15 06:21:28 +00:00
|
|
|
|
|
|
|
resource kubernetes_persistent_volume_claim filebrowser {
|
|
|
|
metadata {
|
|
|
|
name = "${local.filebrowser.name}-pvc"
|
|
|
|
}
|
|
|
|
spec {
|
|
|
|
access_modes = [ local.filebrowser.vol.mode ]
|
|
|
|
resources {
|
|
|
|
requests = {
|
|
|
|
storage = local.filebrowser.vol.size
|
|
|
|
}
|
|
|
|
}
|
|
|
|
volume_name = "${local.filebrowser.name}-vol"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|