From 071b973862bc19c70abb3dd27f57c1cab213fe24 Mon Sep 17 00:00:00 2001 From: Lukas Nagel Date: Sat, 23 Nov 2024 15:49:52 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Prepared=20dev=20ci?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/HugoBuildDev.yaml | 19 +++++++++++++++++++ helm/templates/ingress.yaml | 6 +++--- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/.github/workflows/HugoBuildDev.yaml b/.github/workflows/HugoBuildDev.yaml index f190d4f1..3ea6d808 100644 --- a/.github/workflows/HugoBuildDev.yaml +++ b/.github/workflows/HugoBuildDev.yaml @@ -56,3 +56,22 @@ jobs: - name: Push the image to dockerhub run: docker push lnadev/${{ env.CONTAINER-NAME }}:dev + + DeployContainer: + needs: ReleaseDEV + runs-on: ubuntu-latest + + steps: + # Download Secure-File + - name: base64-to-file + id: write_file + uses: timheuer/base64-to-file@v1.1 + with: + fileName: "custom-config" + encodedString: ${{ secrets.KUBECTL_CONFIG }} + + # Checkout the repository + - uses: actions/checkout@v3 + + # Deploy Kubernetes YAML + - run: helm upgrade --install fi-pv-dev ./helm --kubeconfig ${{ steps.write_file.outputs.filePath }} --set runNumber=dev,domain=dev.fachinformatikerpruefungsvorbereitung.de,namespace=fi-pv-dev,production=false diff --git a/helm/templates/ingress.yaml b/helm/templates/ingress.yaml index 41f1046b..9a330c10 100644 --- a/helm/templates/ingress.yaml +++ b/helm/templates/ingress.yaml @@ -6,7 +6,7 @@ metadata: annotations: cert-manager.io/cluster-issuer: letsencrypt traefik.ingress.kubernetes.io/router.entrypoints: websecure - traefik.ingress.kubernetes.io/router.middlewares: default-redirectscheme@kubernetescrd + traefik.ingress.kubernetes.io/router.middlewares: {{ .Values.namespace }}-redirectscheme@kubernetescrd spec: tls: - hosts: @@ -69,7 +69,7 @@ spec: number: 80 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: redirectscheme @@ -81,7 +81,7 @@ spec: permanent: true --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: redirectschemefipv