This commit is contained in:
Alexis Bruneteau 2025-05-31 17:15:36 +02:00
parent fe14d9f790
commit 54083e4233
8 changed files with 37 additions and 35 deletions

View File

@ -64,6 +64,4 @@ jobs:
- name: Deploy to k3s
run: |
kubectl apply -f deploy/k8s/
kubectl set image deployment/hosting-frontend hosting-frontend=${{ secrets.REGISTRY_URL }}/hosting-frontend:${{ github.sha }} -n hosting-frontend
kubectl rollout status deployment/hosting-frontend -n hosting
kubectl apply -k deploy/k8s/

View File

@ -0,0 +1,23 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: hosting-frontend
namespace: hosting
spec:
replicas: 2
selector:
matchLabels:
app: hosting-frontend
template:
metadata:
labels:
app: hosting-frontend
spec:
containers:
- name: hosting-frontend
image: gitea.vidoks.fr/sortifal/hosting-frontend:latest
ports:
- containerPort: 80

View File

@ -0,0 +1,5 @@
namespace: hosting
resources:
- deployment.yml
- service.yml
- ingress.yml

View File

@ -0,0 +1,8 @@
---
kind: Kustomization
namespace: hosting
resources:
- namespace.yml
- frontend

View File

@ -1,32 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: hosting-frontend
namespace: hosting
spec:
replicas: 2
selector:
matchLabels:
app: hosting-frontend
template:
metadata:
labels:
app: hosting-frontend
spec:
containers:
- name: hosting-frontend
image: nginx:alpine
ports:
- containerPort: 80
volumeMounts:
- name: app-volume
mountPath: /usr/share/nginx/html
- name: nginx-config
mountPath: /etc/nginx/conf.d
volumes:
- name: app-volume
configMap:
name: hosting-files
- name: nginx-config
configMap:
name: nginx-config