826959c903
- Introduced Nextcloud module with Kubernetes resources including deployment, service, ingress, and cron job. - Configured Apache settings for Nextcloud with SSL support and compression. - Created secrets for mail and admin credentials. - Added necessary environment variables for Nextcloud configuration. - Removed unused Scaleway access and secret keys from secrets and variables. - Updated CoreDNS module to support custom host overrides. - Implemented backup bucket policies and lifecycle rules for Scaleway object storage. - Enhanced IAM policies and applications for backup and email services. - Added outputs for backup bucket and API keys.
77 lines
1.5 KiB
Terraform
77 lines
1.5 KiB
Terraform
resource "kubernetes_service" "nextcloud_redis" {
|
|
metadata {
|
|
name = "redis"
|
|
namespace = kubernetes_namespace.nextcloud.metadata[0].name
|
|
}
|
|
spec {
|
|
port {
|
|
port = 6379
|
|
name = "redis"
|
|
}
|
|
selector = {
|
|
app = "redis"
|
|
}
|
|
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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|