add stirling-pdf because why not [ci skip]

This commit is contained in:
Viktor Barzin 2025-12-01 20:40:46 +00:00
parent bcc4990096
commit 3e7b150779
3 changed files with 97 additions and 2 deletions

View file

@ -714,3 +714,9 @@ module "tuya-bridge" {
tiny_tuya_service_secret = var.tiny_tuya_service_secret
slack_url = var.tiny_tuya_slack_url
}
module "stirling-pdf" {
source = "./stirling-pdf"
tls_secret_name = var.tls_secret_name
}

View file

@ -56,9 +56,9 @@ resource "kubernetes_deployment" "paperless-ngx" {
image = "ghcr.io/paperless-ngx/paperless-ngx:latest"
name = "paperless-ngx"
env {
name = "PAPERLESS_REDIS"
name = "PAPERLESS_REDIS"
// If redis gets stuck, try deleting the locks files in log dir
value = "redis://redis.redis"
# value = "redis://redis.redis.svc.cluster.local:6379/0"
}
env {
name = "PAPERLESS_REDIS_PREFIX"

View file

@ -0,0 +1,89 @@
variable "tls_secret_name" {}
resource "kubernetes_namespace" "stirling-pdf" {
metadata {
name = "stirling-pdf"
labels = {
"istio-injection" : "disabled"
}
}
}
module "tls_secret" {
source = "../setup_tls_secret"
namespace = "stirling-pdf"
tls_secret_name = var.tls_secret_name
}
resource "kubernetes_deployment" "stirling-pdf" {
metadata {
name = "stirling-pdf"
namespace = "stirling-pdf"
labels = {
app = "stirling-pdf"
}
}
spec {
replicas = 1
selector {
match_labels = {
app = "stirling-pdf"
}
}
template {
metadata {
labels = {
app = "stirling-pdf"
}
}
spec {
container {
image = "stirlingtools/stirling-pdf:latest"
name = "stirling-pdf"
port {
container_port = 8080
}
volume_mount {
name = "configs"
mount_path = "/configs"
}
}
volume {
name = "configs"
nfs {
server = "10.0.10.15"
path = "/mnt/main/stirling-pdf"
}
}
}
}
}
}
resource "kubernetes_service" "stirling-pdf" {
metadata {
name = "stirling-pdf"
namespace = "stirling-pdf"
labels = {
"app" = "stirling-pdf"
}
}
spec {
selector = {
app = "stirling-pdf"
}
port {
name = "http"
port = 80
target_port = 8080
}
}
}
module "ingress" {
source = "../ingress_factory"
namespace = "stirling-pdf"
name = "stirling-pdf"
tls_secret_name = var.tls_secret_name
}