From 5fc2707f965ab0f1f9b9c7530c7bbcdbf8502160 Mon Sep 17 00:00:00 2001 From: Ultradesu Date: Wed, 16 Apr 2025 22:07:06 +0300 Subject: [PATCH] Added https redirect traefik middleware --- k8s/core/authentik/https-middleware.yaml | 11 +++++++++++ k8s/core/authentik/kustomization.yaml | 1 + k8s/core/rancher/app.yaml | 18 ------------------ k8s/core/rancher/kustomization.yaml | 15 --------------- k8s/core/rancher/values.yaml | 5 ----- 5 files changed, 12 insertions(+), 38 deletions(-) create mode 100644 k8s/core/authentik/https-middleware.yaml delete mode 100644 k8s/core/rancher/app.yaml delete mode 100644 k8s/core/rancher/kustomization.yaml delete mode 100644 k8s/core/rancher/values.yaml diff --git a/k8s/core/authentik/https-middleware.yaml b/k8s/core/authentik/https-middleware.yaml new file mode 100644 index 0000000..69c689c --- /dev/null +++ b/k8s/core/authentik/https-middleware.yaml @@ -0,0 +1,11 @@ +--- +apiVersion: traefik.containo.us/v1alpha1 +kind: Middleware +metadata: + name: https-redirect + namespace: kube-system +spec: + redirectScheme: + scheme: https + permanent: true + diff --git a/k8s/core/authentik/kustomization.yaml b/k8s/core/authentik/kustomization.yaml index 8ceb034..8d146ff 100644 --- a/k8s/core/authentik/kustomization.yaml +++ b/k8s/core/authentik/kustomization.yaml @@ -4,6 +4,7 @@ kind: Kustomization resources: - app.yaml - external-secrets.yaml + - https-middleware.yaml helmCharts: - name: authentik diff --git a/k8s/core/rancher/app.yaml b/k8s/core/rancher/app.yaml deleted file mode 100644 index 8d32541..0000000 --- a/k8s/core/rancher/app.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: argoproj.io/v1alpha1 -kind: Application -metadata: - name: rancher - namespace: argocd -spec: - project: core - destination: - namespace: rancher - server: https://kubernetes.default.svc - source: - repoURL: ssh://git@gt.hexor.cy:30022/ab/homelab.git - targetRevision: HEAD - path: k8s/core/rancher - syncPolicy: - syncOptions: - - CreateNamespace=true - diff --git a/k8s/core/rancher/kustomization.yaml b/k8s/core/rancher/kustomization.yaml deleted file mode 100644 index acebc7b..0000000 --- a/k8s/core/rancher/kustomization.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -resources: - - app.yaml - -helmCharts: - - name: rancher - repo: https://releases.rancher.com/server-charts/stable - version: 2.10.3 - releaseName: rancher - namespace: rancher - includeCRDs: true - valuesFile: values.yaml - diff --git a/k8s/core/rancher/values.yaml b/k8s/core/rancher/values.yaml deleted file mode 100644 index 5c0e519..0000000 --- a/k8s/core/rancher/values.yaml +++ /dev/null @@ -1,5 +0,0 @@ -ingress: - enabled: false - -hostname: rancher.hexor.cy -replicas: 1