This repository was archived by the owner on Sep 16, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -68,15 +68,12 @@ jobs:
6868 - name : Deploy to Kubernetes
6969 run : |
7070 if [ "${{ github.ref_name }}" = "main" ]; then
71- INGRESS_HOST="wiki.coregame.de"
71+ OVERLAY=main
7272 elif [ "${{ github.ref_name }}" = "dev" ]; then
73- INGRESS_HOST=" dev.wiki.coregame.de"
73+ OVERLAY= dev
7474 else
75- echo "Branch is not main or dev, skipping ingress update ."
75+ echo "Branch is not main or dev, skipping deployment ."
7676 exit 1
7777 fi
78- sed -i "s|IMAGE_TAG|${{ env.IMAGE_NAME }}|g" k8s/deployment.yml
79- sed -i "s|INGRESS_HOST|$INGRESS_HOST|g" k8s/ingress.yml
80- kubectl apply -f k8s/deployment.yml
81- kubectl apply -f k8s/service.yml
82- kubectl apply -f k8s/ingress.yml
78+ cd k8s/overlays/$OVERLAY
79+ kustomize build . | kubectl apply -f -
Original file line number Diff line number Diff line change @@ -2,8 +2,9 @@ apiVersion: apps/v1
22kind : Deployment
33metadata :
44 name : public-wiki
5+ namespace : wiki
56spec :
6- replicas : 1
7+ replicas : 3 # default, will be overridden by overlays
78 selector :
89 matchLabels :
910 app : public-wiki
1415 spec :
1516 containers :
1617 - name : public-wiki
17- image : IMAGE_TAG
18+ image : IMAGE_TAG # will be replaced by kustomize
1819 ports :
1920 - containerPort : 3000
Original file line number Diff line number Diff line change @@ -2,11 +2,12 @@ apiVersion: networking.k8s.io/v1
22kind : Ingress
33metadata :
44 name : public-wiki-ingress
5+ namespace : wiki
56 annotations :
67 nginx.ingress.kubernetes.io/rewrite-target : /
78spec :
89 rules :
9- - host : INGRESS_HOST
10+ - host : PLACEHOLDER_HOST
1011 http :
1112 paths :
1213 - path : /
Original file line number Diff line number Diff line change 1+ resources :
2+ - namespace.yml
3+ - deployment.yml
4+ - service.yml
5+ - ingress.yml
6+
7+ images :
8+ - name : public-wiki
9+ newName : IMAGE_TAG
10+
11+ namespace : wiki
Original file line number Diff line number Diff line change 1+ apiVersion : v1
2+ kind : Namespace
3+ metadata :
4+ name : wiki
Original file line number Diff line number Diff line change 1+ resources :
2+ - ../../deployment.yml
3+ - ../../service.yml
4+ - ../../ingress.yml
5+ - ../../namespace.yml
6+
7+ namespace : wiki
8+
9+ patches :
10+ - target :
11+ kind : Deployment
12+ name : public-wiki
13+ patch : |-
14+ - op: replace
15+ path: /spec/replicas
16+ value: 1
17+ - target :
18+ kind : Ingress
19+ name : public-wiki-ingress
20+ patch : |-
21+ - op: replace
22+ path: /spec/rules/0/host
23+ value: dev.wiki.coregame.de
24+
25+ images :
26+ - name : IMAGE_TAG
27+ newName : ghcr.io/42core-team/wiki
28+ newTag : dev
Original file line number Diff line number Diff line change 1+ resources :
2+ - ../../deployment.yml
3+ - ../../service.yml
4+ - ../../ingress.yml
5+ - ../../namespace.yml
6+
7+ namespace : wiki
8+
9+ patches :
10+ - target :
11+ kind : Deployment
12+ name : public-wiki
13+ patch : |-
14+ - op: replace
15+ path: /spec/replicas
16+ value: 3
17+ - target :
18+ kind : Ingress
19+ name : public-wiki-ingress
20+ patch : |-
21+ - op: replace
22+ path: /spec/rules/0/host
23+ value: wiki.coregame.de
24+
25+ images :
26+ - name : IMAGE_TAG
27+ newName : ghcr.io/42core-team/wiki
28+ newTag : main
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ apiVersion: v1
22kind : Service
33metadata :
44 name : public-wiki
5+ namespace : wiki
56spec :
67 selector :
78 app : public-wiki
You can’t perform that action at this time.
0 commit comments