Compare commits
12 Commits
chore/bett
...
develop
| Author | SHA1 | Date | |
|---|---|---|---|
| 48e5c9e15f | |||
|
a33a08ac77
|
|||
| 05646d61ed | |||
|
08c599b345
|
|||
| c4e2a3362c | |||
|
0a502489e3
|
|||
| 35c662df7e | |||
|
9042b8d33b
|
|||
|
def0658089
|
|||
| 8244f1d5e0 | |||
| 1a14f324be | |||
| 281499626d |
15
.github/workflows/deploy.yml
vendored
15
.github/workflows/deploy.yml
vendored
@@ -2,6 +2,11 @@ name: ci
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
tag:
|
||||||
|
description: 'Tag to deploy'
|
||||||
|
required: false
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -122,10 +127,14 @@ jobs:
|
|||||||
SHORT_SHA=$(echo "${GITHUB_SHA}" | cut -c1-7)
|
SHORT_SHA=$(echo "${GITHUB_SHA}" | cut -c1-7)
|
||||||
|
|
||||||
IMAGE_BASE="ghcr.io/${OWNER}/${REPO}"
|
IMAGE_BASE="ghcr.io/${OWNER}/${REPO}"
|
||||||
IMAGE_TAG="sha-${SHORT_SHA}"
|
IMAGE_TAG="${{ github.event.inputs.tag || '' }}"
|
||||||
|
if [ -z "$IMAGE_TAG" ]; then
|
||||||
|
IMAGE_TAG="sha-$SHORT_SHA"
|
||||||
|
fi
|
||||||
|
|
||||||
echo "IMAGE_BASE=${IMAGE_BASE}" >> $GITHUB_ENV
|
echo "IMAGE_BASE=${IMAGE_BASE}" >> $GITHUB_ENV
|
||||||
echo "IMAGE_TAG=${IMAGE_TAG}" >> $GITHUB_ENV
|
echo "IMAGE_TAG=${IMAGE_TAG}" >> $GITHUB_ENV
|
||||||
|
echo "" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Import SOPS GPG Key
|
- name: Import SOPS GPG Key
|
||||||
run: |
|
run: |
|
||||||
@@ -139,7 +148,7 @@ jobs:
|
|||||||
- name: Decrypt SOPS Secrets Test
|
- name: Decrypt SOPS Secrets Test
|
||||||
run: |
|
run: |
|
||||||
cd .k8s
|
cd .k8s
|
||||||
sops -d secrets.enc.yml secrets.yml
|
sops -d secrets.enc.yml > secrets.yml
|
||||||
|
|
||||||
- name: Apply Kubernetes Manifests - Configuration
|
- name: Apply Kubernetes Manifests - Configuration
|
||||||
run: cat .k8s/config.template.yml | envsubst | kubectl apply -f -
|
run: cat .k8s/config.template.yml | envsubst | kubectl apply -f -
|
||||||
@@ -156,7 +165,7 @@ jobs:
|
|||||||
- name: Apply Kubernetes Manifests - Deployment
|
- name: Apply Kubernetes Manifests - Deployment
|
||||||
run: |
|
run: |
|
||||||
cat .k8s/deployment.template.yml | envsubst | kubectl apply -f -
|
cat .k8s/deployment.template.yml | envsubst | kubectl apply -f -
|
||||||
cat .k8s/deployment.yaml | envsubst | kubectl rollout status deployment/frontend-deployment -n ${KUBE_NAMESPACE} --timeout=120s
|
cat .k8s/deployment.template.yml | envsubst | kubectl rollout status deployment/frontend-deployment -n ${KUBE_NAMESPACE} --timeout=120s
|
||||||
|
|
||||||
- name: Apply Kubernetes Manifests - Service
|
- name: Apply Kubernetes Manifests - Service
|
||||||
run: cat .k8s/service.template.yml | envsubst | kubectl apply -f -
|
run: cat .k8s/service.template.yml | envsubst | kubectl apply -f -
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ metadata:
|
|||||||
name: backend-ingress
|
name: backend-ingress
|
||||||
namespace: ${KUBE_NAMESPACE}
|
namespace: ${KUBE_NAMESPACE}
|
||||||
annotations:
|
annotations:
|
||||||
|
cert-manager.io/cluster-issuer: cluster-certificate-issuer
|
||||||
kubernetes.io/ingress.class: nginx
|
kubernetes.io/ingress.class: nginx
|
||||||
nginx.ingress.kubernetes.io/use-regex: "true"
|
nginx.ingress.kubernetes.io/use-regex: "true"
|
||||||
nginx.ingress.kubernetes.io/rewrite-target: /
|
nginx.ingress.kubernetes.io/rewrite-target: /
|
||||||
@@ -11,7 +12,7 @@ spec:
|
|||||||
tls:
|
tls:
|
||||||
- hosts:
|
- hosts:
|
||||||
- ${KUBE_API_DOMAIN}
|
- ${KUBE_API_DOMAIN}
|
||||||
secretName: letsencrypt-cluster-certificate-tls
|
secretName: backend-tls
|
||||||
rules:
|
rules:
|
||||||
- host: ${KUBE_API_DOMAIN}
|
- host: ${KUBE_API_DOMAIN}
|
||||||
http:
|
http:
|
||||||
|
|||||||
Reference in New Issue
Block a user