diff --git a/applications/variables.auto.tfvars b/applications/variables.auto.tfvars index bcfe192..c17b45c 100644 --- a/applications/variables.auto.tfvars +++ b/applications/variables.auto.tfvars @@ -589,7 +589,7 @@ kubernetes = { service_port = [80] secret_ref = ["nextcloud-credentials"] secret_import = ["b207c4b6-0489-4ab2-a032-b4a400a708e0"] - extra_manifest = ["../external_manifests/nextcloud/middlewares.yaml"] + extra_manifest = ["../external_manifests/nextcloud/health-check-response.yaml","../external_manifests/nextcloud/nextcloud-caldav-redirect.yaml","../external_manifests/nextcloud/nextcloud-carddav-redirect.yaml"] middlewares = "kube-system-nextcloud-carddav-redirect@kubernetescrd,kube-system-nextcloud-caldav-redirect@kubernetescrd,kube-system-health-check-response@kubernetescrd" database = { diff --git a/external_manifests/nextcloud/health-check-response.yaml b/external_manifests/nextcloud/health-check-response.yaml new file mode 100644 index 0000000..69d660f --- /dev/null +++ b/external_manifests/nextcloud/health-check-response.yaml @@ -0,0 +1,8 @@ +apiVersion: traefik.io/v1alpha1 +kind: Middleware +metadata: + name: health-check-response + namespace: kube-system +spec: + customResponse: + status: 200 diff --git a/external_manifests/nextcloud/middlewares.yaml b/external_manifests/nextcloud/middlewares.yaml deleted file mode 100644 index 860d87f..0000000 --- a/external_manifests/nextcloud/middlewares.yaml +++ /dev/null @@ -1,30 +0,0 @@ -apiVersion: traefik.io/v1alpha1 -kind: Middleware -metadata: - name: nextcloud-carddav-redirect - namespace: kube-system # Recommended to put global middlewares in kube-system or a shared ingress namespace -spec: - redirectRegex: - regex: "^https://(.*)/\\.well-known/carddav" - replacement: "https://$1/remote.php/dav" - permanent: true ---- -apiVersion: traefik.io/v1alpha1 -kind: Middleware -metadata: - name: nextcloud-caldav-redirect - namespace: kube-system -spec: - redirectRegex: - regex: "^https://(.*)/\\.well-known/caldav" - replacement: "https://$1/remote.php/dav" - permanent: true ---- -apiVersion: traefik.io/v1alpha1 -kind: Middleware -metadata: - name: health-check-response - namespace: kube-system -spec: - customResponse: - status: 200 diff --git a/external_manifests/nextcloud/nextcloud-caldav-redirect.yaml b/external_manifests/nextcloud/nextcloud-caldav-redirect.yaml new file mode 100644 index 0000000..9f5b903 --- /dev/null +++ b/external_manifests/nextcloud/nextcloud-caldav-redirect.yaml @@ -0,0 +1,10 @@ +apiVersion: traefik.io/v1alpha1 +kind: Middleware +metadata: + name: nextcloud-caldav-redirect + namespace: kube-system +spec: + redirectRegex: + regex: "^https://(.*)/\\.well-known/caldav" + replacement: "https://$1/remote.php/dav" + permanent: true diff --git a/external_manifests/nextcloud/nextcloud-carddav-redirect.yaml b/external_manifests/nextcloud/nextcloud-carddav-redirect.yaml new file mode 100644 index 0000000..01db9ed --- /dev/null +++ b/external_manifests/nextcloud/nextcloud-carddav-redirect.yaml @@ -0,0 +1,10 @@ +apiVersion: traefik.io/v1alpha1 +kind: Middleware +metadata: + name: nextcloud-carddav-redirect + namespace: kube-system # Recommended to put global middlewares in kube-system or a shared ingress namespace +spec: + redirectRegex: + regex: "^https://(.*)/\\.well-known/carddav" + replacement: "https://$1/remote.php/dav" + permanent: true \ No newline at end of file