kube-cascade/gitea/sts.yaml

78 lines
1.6 KiB
YAML
Raw Normal View History

apiVersion: apps/v1
kind: StatefulSet
metadata:
labels:
gitea: server
app: gitea
name: gitea
namespace: gitea
2023-12-20 22:40:16 +00:00
annotations:
"reloader.stakater.com/auto": "true"
spec:
podManagementPolicy: OrderedReady
replicas: 1
selector:
matchLabels:
gitea: server
app: gitea
serviceName: gitea
updateStrategy:
type: RollingUpdate
template:
metadata:
labels:
gitea: server
app: gitea
spec:
containers:
- name: gitea
2023-12-20 22:40:16 +00:00
image: gitea/gitea:1.21.2
envFrom:
- configMapRef:
name: gitea-config
- secretRef:
name: gitea-secrets
- secretRef:
name: email-secret
livenessProbe:
httpGet:
path: /api/healthz
port: 3000
readinessProbe:
httpGet:
path: /api/healthz
port: 3000
ports:
- containerPort: 22
protocol: TCP
name: ssh
- containerPort: 3000
protocol: TCP
name: http
volumeMounts:
- mountPath: /backup
name: gitea-backup
- mountPath: /data
name: gitea-data
dnsPolicy: ClusterFirst
restartPolicy: Always
volumeClaimTemplates:
- metadata:
name: gitea-backup
spec:
accessModes: [ "ReadWriteMany" ]
storageClassName: nfs
resources:
requests:
storage: 10Gi
- metadata:
name: gitea-data
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: local-path
resources:
requests:
storage: 10Gi