Files
homelab/k8s/apps/wedding/deployment.yaml
2026-04-19 16:22:25 +03:00

61 lines
1.4 KiB
YAML

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: wedding
labels:
app: wedding
spec:
replicas: 1
selector:
matchLabels:
app: wedding
template:
metadata:
labels:
app: wedding
spec:
initContainers:
- name: git-clone
image: alpine/git:latest
command:
- sh
- -c
- git clone --depth 1 https://gt.hexor.cy/ab/wedding.git /src
volumeMounts:
- name: source
mountPath: /src
- name: zola-build
image: ghcr.io/getzola/zola:v0.19.2
command:
- sh
- -c
- cd /src && zola build --output-dir /public
volumeMounts:
- name: source
mountPath: /src
- name: public
mountPath: /public
containers:
- name: nginx
image: nginx:alpine
ports:
- containerPort: 80
protocol: TCP
volumeMounts:
- name: public
mountPath: /usr/share/nginx/html
readOnly: true
resources:
requests:
memory: 32Mi
cpu: 10m
limits:
memory: 64Mi
cpu: 100m
volumes:
- name: source
emptyDir: {}
- name: public
emptyDir: {}