gitea-k8s/deployment.yaml

65 lines
1.4 KiB
YAML
Raw Permalink Normal View History

2021-11-23 07:44:40 +00:00
apiVersion: apps/v1
kind: Deployment
metadata:
name: gitea
labels:
app: gitea
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: gitea
template:
metadata:
labels:
app: gitea
spec:
containers:
- name: gitea
image: gitea/gitea:1.15.6
imagePullPolicy: IfNotPresent
ports:
- containerPort: 3000
name: https
- containerPort: 2222
name: ssh
volumeMounts:
- name: gitea-data
mountPath: /data
- name: gitea-config
mountPath: /data/gitea/conf
- name: caddy
image: caddy:2.4.6
command: ["caddy", "reverse-proxy", "-to", "localhost:3000"]
imagePullPolicy: IfNotPresent
ports:
- containerPort: 80
name: http
- containerPort: 443
name: https
volumeMounts:
- name: gitea-data
mountPath: /data
volumes:
- name: gitea-data
persistentVolumeClaim:
claimName: gitea-data
- name: gitea-config
secret:
secretName: gitea-config
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: gitea-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi