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.
55 lines
1.4 KiB
Terraform
55 lines
1.4 KiB
Terraform
resource "kubernetes_cron_job_v1" "nextcloud_cron_apache" {
|
|
depends_on = [
|
|
kubernetes_deployment.nextcloud_apache
|
|
]
|
|
metadata {
|
|
namespace = kubernetes_namespace.nextcloud.metadata[0].name
|
|
name = "cronjob-trigger"
|
|
}
|
|
spec {
|
|
schedule = "*/15 * * * *"
|
|
concurrency_policy = "Forbid"
|
|
failed_jobs_history_limit = 2
|
|
successful_jobs_history_limit = 2
|
|
job_template {
|
|
metadata {
|
|
labels = {
|
|
app = "cronjob-trigger"
|
|
}
|
|
}
|
|
spec {
|
|
backoff_limit = 1
|
|
parallelism = 1
|
|
completions = 1
|
|
active_deadline_seconds = 300
|
|
template {
|
|
metadata {
|
|
labels = {
|
|
app = "cronjob-trigger"
|
|
}
|
|
}
|
|
spec {
|
|
container {
|
|
name = "nextcloud"
|
|
image = "nextcloud:${var.tag}"
|
|
|
|
command = ["curl"]
|
|
args = ["--fail", "-L", "http://http/cron.php"]
|
|
security_context {
|
|
allow_privilege_escalation = false
|
|
}
|
|
}
|
|
restart_policy = "Never"
|
|
termination_grace_period_seconds = 30
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
lifecycle {
|
|
replace_triggered_by = [
|
|
kubernetes_deployment.nextcloud_apache
|
|
]
|
|
}
|
|
}
|