1
0
Fork 0
home-stack-kustomize/kustomize/bases/gitea/gitea-deployment.yaml

129 lines
2.6 KiB
YAML
Raw Normal View History

2020-05-01 22:08:35 +00:00
apiVersion: apps/v1
kind: Deployment
metadata:
2020-05-18 20:18:39 +00:00
name: gitea
2020-05-01 22:08:35 +00:00
labels:
app: gitea
spec:
selector:
matchLabels:
app: gitea
template:
metadata:
labels:
app: gitea
spec:
containers:
- name: gitea
image: gitea/gitea:1.11.4
env:
- name: INSTALL_LOCK
value: "yes"
- name: DISABLE_REGISTRATION
value: "yes"
- name: APP_NAME
value: Badjware's code stash
- name: RUN_MODE
value: prod
- name: ROOT_URL
2020-08-02 03:40:27 +00:00
value: https://${GITEA_EXTERNAL_HOST}
2020-05-01 22:08:35 +00:00
- name: SSH_DOMAIN
2020-08-02 03:40:27 +00:00
value: ${GITEA_EXTERNAL_HOST}
2020-05-01 22:08:35 +00:00
- name: DB_TYPE
2021-08-26 16:42:10 +00:00
value: postgres
2020-05-01 22:08:35 +00:00
- name: DB_HOST
2020-08-11 04:37:20 +00:00
valueFrom:
secretKeyRef:
2021-08-26 16:42:10 +00:00
name: postgres-credentials-secret
2020-08-11 04:37:20 +00:00
key: host
2020-05-01 22:08:35 +00:00
- name: DB_NAME
valueFrom:
secretKeyRef:
2021-08-26 16:42:10 +00:00
name: postgres-credentials-secret
2020-05-01 22:08:35 +00:00
key: database
- name: DB_USER
valueFrom:
secretKeyRef:
2021-08-26 16:42:10 +00:00
name: postgres-credentials-secret
2020-05-01 22:08:35 +00:00
key: username
- name: DB_PASSWD
valueFrom:
secretKeyRef:
2021-08-26 16:42:10 +00:00
name: postgres-credentials-secret
2020-05-01 22:08:35 +00:00
key: password
ports:
- name: http
containerPort: 3000
- name: ssh
containerPort: 22
volumeMounts:
2020-08-29 04:54:40 +00:00
- name: gitea-data
2020-05-01 22:08:35 +00:00
mountPath: /data
volumes:
2020-08-29 04:54:40 +00:00
- name: gitea-data
2020-05-01 22:08:35 +00:00
persistentVolumeClaim:
2020-08-29 04:54:40 +00:00
claimName: gitea-data
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: gitea-data-nfs
labels:
app: gitea
spec:
accessModes:
- ReadWriteMany
capacity:
storage: 100Mi
nfs:
server: nfs-localhost
path: /gitea
mountOptions: ["vers=4"]
2020-05-01 22:08:35 +00:00
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
2020-08-29 04:54:40 +00:00
name: gitea-data
2020-05-01 22:08:35 +00:00
labels:
app: gitea
spec:
2020-08-29 04:54:40 +00:00
storageClassName: ""
2020-05-01 22:08:35 +00:00
accessModes:
2020-08-29 04:54:40 +00:00
- ReadWriteMany
2020-05-01 22:08:35 +00:00
resources:
requests:
2020-08-29 04:54:40 +00:00
storage: 100Mi
selector:
matchLabels:
app: gitea
2020-05-01 22:08:35 +00:00
---
apiVersion: v1
kind: Service
metadata:
name: gitea-http
labels:
app: gitea
spec:
selector:
app: gitea
ports:
- name: http
protocol: TCP
port: 80
targetPort: http
---
apiVersion: v1
kind: Service
metadata:
name: gitea-ssh
labels:
app: gitea
spec:
selector:
app: gitea
ports:
- name: ssh
protocol: TCP
port: 22
targetPort: ssh