63 lines
1.8 KiB
YAML
63 lines
1.8 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: gitea
|
|
namespace: default
|
|
labels:
|
|
app: gitea
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: gitea
|
|
template:
|
|
metadata:
|
|
name: gitea
|
|
labels:
|
|
app: gitea
|
|
spec:
|
|
containers:
|
|
- name: gitea
|
|
image: gitea/gitea:1.16.8
|
|
imagePullPolicy: Always
|
|
# config settings
|
|
env:
|
|
- name: GITEA__service__DISABLE_REGISTRATION
|
|
value: "true"
|
|
- name: GITEA__repository__DEFAULT_PRIVATE
|
|
value: private
|
|
- name: GITEA__service__ENABLE_CAPTCHA
|
|
value: "true"
|
|
- name: GITEA__database__DB_TYPE
|
|
value: "postgres"
|
|
- name: GITEA__database__HOST
|
|
value: "postgresql-service.postgres.svc.cluster.local:5432" # Service.Namespace.svc.cluster.local
|
|
- name: GITEA__database__NAME
|
|
value: postgres
|
|
- name: GITEA__database__USER
|
|
value: gitea
|
|
- name: GITEA__database__PASSWD
|
|
value: gitea
|
|
volumeMounts:
|
|
- name: app-ini-config-volume
|
|
mountPath: "/tmp/app.ini"
|
|
subPath: "app.ini"
|
|
- name: gitea-root-volume
|
|
mountPath: "/var/lib/gitea"
|
|
- name: gitea-data-volume
|
|
mountPath: "/data"
|
|
ports:
|
|
- containerPort: 22
|
|
name: git-ssh
|
|
- containerPort: 3000
|
|
name: gitea
|
|
volumes:
|
|
- name: app-ini-config-volume
|
|
configMap:
|
|
name: gitea-app-ini-config
|
|
- name: gitea-root-volume
|
|
persistentVolumeClaim:
|
|
claimName: gitea-root-pvc
|
|
- name: gitea-data-volume
|
|
persistentVolumeClaim:
|
|
claimName: gitea-data-pvc
|