| 123456789101112131415161718192021222324252627282930313233343536373839 |
- apiVersion: apps/v1
- kind: Deployment
- metadata:
- name: gogs
- namespace: git
- spec:
- replicas: 1
- selector:
- matchLabels:
- app: gogs
- template:
- metadata:
- labels:
- app: gogs
- spec:
- containers:
- - name: gogs
- image: gogs/gogs:latest
- ports:
- - containerPort: 3000
- - containerPort: 22
- env:
- - name: DB_TYPE
- value: postgres
- - name: DB_HOST
- value: postgres.default.svc.cluster.local:5432
- - name: DB_NAME
- value: gogs
- - name: DB_USER
- value: gogs
- - name: DB_PASSWD
- value: strongpassword
- volumeMounts:
- - name: gogs-data
- mountPath: /data
- volumes:
- - name: gogs-data
- persistentVolumeClaim:
- claimName: gogs-data
|