Skip to content
This repository was archived by the owner on Sep 16, 2025. It is now read-only.

Commit 28a90a1

Browse files
Merge pull request #31 from 42core-team/dev
2 parents 18f7caa + 902c9ea commit 28a90a1

13 files changed

Lines changed: 47 additions & 108 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,9 @@ jobs:
9292
exit 1
9393
fi
9494
cd k8s/overlays/$OVERLAY
95-
kustomize build . | kubectl apply --prune -l app=public-wiki --prune-allowlist=core/v1/Namespace --prune-allowlist=apps/v1/Deployment --prune-allowlist=core/v1/Service --prune-allowlist=networking.k8s.io/v1/Ingress -f -
95+
if [ "$OVERLAY" = "main" ]; then
96+
ENV_LABEL="main"
97+
else
98+
ENV_LABEL="dev"
99+
fi
100+
kustomize build . | kubectl apply -f -

k8s/base/deployment.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,8 @@ apiVersion: apps/v1
22
kind: Deployment
33
metadata:
44
name: public-wiki
5-
namespace: wiki
6-
labels:
7-
app: public-wiki
85
spec:
9-
replicas: 3 # default, will be overridden by overlays
6+
replicas: 1 # default, will be overridden by overlays
107
selector:
118
matchLabels:
129
app: public-wiki
@@ -17,6 +14,6 @@ spec:
1714
spec:
1815
containers:
1916
- name: public-wiki
20-
image: IMAGE_TAG # will be replaced by kustomize
17+
image: ghcr.io/42core-team/wiki:dev # will be replaced by overlays
2118
ports:
2219
- containerPort: 3000

k8s/base/ingress.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@ apiVersion: networking.k8s.io/v1
22
kind: Ingress
33
metadata:
44
name: public-wiki-ingress
5-
namespace: wiki
6-
labels:
7-
app: public-wiki
85
annotations:
9-
nginx.ingress.kubernetes.io/rewrite-target: /
6+
nginx.ingress.kubernetes.io/ssl-redirect: "true"
7+
cert-manager.io/cluster-issuer: "letsencrypt-prod"
108
spec:
9+
ingressClassName: nginx
10+
tls:
11+
- hosts:
12+
- PLACEHOLDER_HOST # will be patched in overlays
13+
secretName: PLACEHOLDER_TLS_SECRET # will be patched in overlays
1114
rules:
12-
- host: PLACEHOLDER_HOST
15+
- host: PLACEHOLDER_HOST # will be patched in overlays
1316
http:
1417
paths:
1518
- path: /

k8s/base/kustomization.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,4 @@ resources:
44
- service.yml
55
- ingress.yml
66

7-
images:
8-
- name: public-wiki
9-
newName: IMAGE_TAG
10-
117
namespace: wiki

k8s/base/namespace.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,3 @@ apiVersion: v1
22
kind: Namespace
33
metadata:
44
name: wiki
5-
labels:
6-
app: public-wiki

k8s/base/service.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ apiVersion: v1
22
kind: Service
33
metadata:
44
name: public-wiki
5-
namespace: wiki
6-
labels:
7-
app: public-wiki
85
spec:
96
selector:
107
app: public-wiki

k8s/deployment.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

k8s/ingress.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

k8s/kustomization.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.

k8s/namespace.yml

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)