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

134 lines
2.9 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
value: https://$(GITEA_EXTERNAL_HOST)
- name: SSH_DOMAIN
value: $(GITEA_EXTERNAL_HOST)
- name: DB_TYPE
value: mysql
- name: DB_HOST
value: mariadb.gitea.svc:3306
- name: DB_NAME
valueFrom:
secretKeyRef:
name: mariadb-credentials-secret
key: database
- name: DB_USER
valueFrom:
secretKeyRef:
name: mariadb-credentials-secret
key: username
- name: DB_PASSWD
valueFrom:
secretKeyRef:
name: mariadb-credentials-secret
key: password
ports:
- name: http
containerPort: 3000
- name: ssh
containerPort: 22
volumeMounts:
- name: gitea-pvc
mountPath: /data
# - name: gitea-app-ini
# mountPath: /data/gitea/conf/
# readOnly: true
volumes:
- name: gitea-pvc
persistentVolumeClaim:
claimName: gitea-pvc
# - name: gitea-app-ini
# secret:
# secretName: gitea-app-ini-secret
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: gitea-pvc
labels:
app: gitea
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
---
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
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
2020-05-18 20:18:39 +00:00
name: gitea
2020-05-01 22:08:35 +00:00
labels:
app: gitea
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
2020-05-17 02:17:14 +00:00
cert-manager.io/cluster-issuer: letsencrypt
2020-05-01 22:08:35 +00:00
spec:
2020-05-17 02:17:14 +00:00
tls:
- hosts:
- gitea.127.0.0.1.nip.io
secretName: letsencrypt-cert
2020-05-01 22:08:35 +00:00
rules:
- host: gitea.127.0.0.1.nip.io
http:
paths:
- path: /
backend:
serviceName: gitea-http
servicePort: http