From b3fe86ea906c4f4f9688ed3d699221b5470501d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauri=20V=C3=B5sandi?= Date: Fri, 11 Aug 2023 14:26:55 +0300 Subject: [PATCH] drone: Clean up configs --- drone/application.yml | 47 +++++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/drone/application.yml b/drone/application.yml index eefc8ee..96b010e 100644 --- a/drone/application.yml +++ b/drone/application.yml @@ -1,14 +1,3 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: application-config -data: - DRONE_GITEA_SERVER: "https://git.k-space.ee" - DRONE_GIT_ALWAYS_AUTH: "false" - DRONE_PROMETHEUS_ANONYMOUS_ACCESS: "true" - DRONE_SERVER_HOST: "drone.k-space.ee" - DRONE_SERVER_PROTO: "https" - DRONE_USER_CREATE: "username:lauri,admin:true" --- apiVersion: v1 kind: Service @@ -59,14 +48,27 @@ spec: httpGet: path: / port: http + env: + - name: DRONE_GITEA_SERVER + value: https://git.k-space.ee + - name: DRONE_GIT_ALWAYS_AUTH + value: "false" + - name: DRONE_SERVER_HOST + value: drone.k-space.ee + - name: DRONE_SERVER_PROTO + value: https + - name: DRONE_USER_CREATE + value: username:lauri,admin:true + - name: DRONE_DEBUG + value: "true" + - name: DRONE_TRACE + value: "true" envFrom: - - secretRef: - name: application-secrets - - configMapRef: - name: application-config + - secretRef: + name: application-secrets volumeMounts: - - name: drone-data - mountPath: /data + - name: drone-data + mountPath: /data volumeClaimTemplates: - metadata: name: drone-data @@ -78,6 +80,16 @@ spec: requests: storage: 8Gi --- +apiVersion: traefik.io/v1alpha1 +kind: Middleware +metadata: + name: redirect +spec: + redirectRegex: + regex: ^https://(.*)/register$ + replacement: https://${1}/ + permanent: false +--- apiVersion: networking.k8s.io/v1 kind: Ingress metadata: @@ -87,6 +99,7 @@ metadata: kubernetes.io/ingress.class: traefik traefik.ingress.kubernetes.io/router.entrypoints: websecure traefik.ingress.kubernetes.io/router.tls: "true" + traefik.ingress.kubernetes.io/router.middlewares: drone-redirect@kubernetescrd spec: tls: - hosts: