2025-06-09 23:49:43 +02:00
|
|
|
resource "kubernetes_service" "nextcloud_redis" {
|
|
|
|
|
metadata {
|
|
|
|
|
name = "redis"
|
|
|
|
|
namespace = kubernetes_namespace.nextcloud.metadata[0].name
|
|
|
|
|
}
|
|
|
|
|
spec {
|
|
|
|
|
port {
|
|
|
|
|
port = 6379
|
|
|
|
|
name = "redis"
|
|
|
|
|
}
|
|
|
|
|
selector = {
|
|
|
|
|
app = "redis"
|
|
|
|
|
}
|
2025-09-20 21:34:33 +02:00
|
|
|
|
|
|
|
|
type = "ClusterIP"
|
2025-06-09 23:49:43 +02:00
|
|
|
cluster_ip = "None"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
resource "kubernetes_deployment" "nextcloud_redis" {
|
|
|
|
|
metadata {
|
|
|
|
|
name = "redis"
|
|
|
|
|
namespace = kubernetes_namespace.nextcloud.metadata[0].name
|
|
|
|
|
}
|
|
|
|
|
spec {
|
|
|
|
|
selector {
|
|
|
|
|
match_labels = {
|
|
|
|
|
app = "redis"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
strategy {
|
|
|
|
|
type = "RollingUpdate"
|
|
|
|
|
}
|
|
|
|
|
template {
|
|
|
|
|
metadata {
|
|
|
|
|
labels = {
|
|
|
|
|
app = "redis"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
spec {
|
|
|
|
|
container {
|
|
|
|
|
name = "redis"
|
|
|
|
|
image = "redis:latest"
|
|
|
|
|
|
|
|
|
|
security_context {
|
|
|
|
|
allow_privilege_escalation = false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
readiness_probe {
|
|
|
|
|
tcp_socket {
|
|
|
|
|
port = "redis"
|
|
|
|
|
}
|
|
|
|
|
initial_delay_seconds = 10
|
|
|
|
|
period_seconds = 15
|
|
|
|
|
success_threshold = 1
|
|
|
|
|
failure_threshold = 3
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
liveness_probe {
|
|
|
|
|
tcp_socket {
|
|
|
|
|
port = "redis"
|
|
|
|
|
}
|
|
|
|
|
initial_delay_seconds = 10
|
|
|
|
|
period_seconds = 15
|
|
|
|
|
success_threshold = 1
|
|
|
|
|
failure_threshold = 3
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
port {
|
|
|
|
|
container_port = 6379
|
|
|
|
|
name = "redis"
|
|
|
|
|
protocol = "TCP"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|