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

125 lines
3.0 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:
2021-08-26 16:42:32 +00:00
app.kubernetes.io/name: gitea
2020-05-01 22:08:35 +00:00
spec:
2021-08-26 16:42:21 +00:00
replicas: 1 # replica count must be set to 1 in database is sqlite
2020-05-01 22:08:35 +00:00
selector:
matchLabels:
2021-08-26 16:42:32 +00:00
app.kubernetes.io/name: gitea
2020-05-01 22:08:35 +00:00
template:
metadata:
labels:
2021-08-26 16:42:32 +00:00
app.kubernetes.io/name: gitea
2020-05-01 22:08:35 +00:00
spec:
containers:
- name: gitea
2021-08-26 16:42:21 +00:00
image: gitea/gitea
2020-05-01 22:08:35 +00:00
env:
2021-08-26 16:42:21 +00:00
# - name: INSTALL_LOCK
# value: "yes"
2020-05-01 22:08:35 +00:00
- 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}
2021-08-26 16:42:32 +00:00
- name: GITEA__METRICS__ENABLED
value: "true"
2021-08-26 16:42:21 +00:00
# - name: DB_TYPE
# value: postgres
# - name: DB_HOST
# valueFrom:
# secretKeyRef:
# name: postgres-credentials-secret
# key: host
# - name: DB_NAME
# valueFrom:
# secretKeyRef:
# name: postgres-credentials-secret
# key: database
# - name: DB_USER
# valueFrom:
# secretKeyRef:
# name: postgres-credentials-secret
# key: username
# - name: DB_PASSWD
# valueFrom:
# secretKeyRef:
# name: postgres-credentials-secret
# key: password
2020-05-01 22:08:35 +00:00
ports:
- name: http
containerPort: 3000
- name: ssh
2021-08-26 16:42:28 +00:00
containerPort: 22
resources:
requests:
cpu: 500m
memory: 1Gi
2020-05-01 22:08:35 +00:00
volumeMounts:
2021-08-26 16:42:28 +00:00
- name: gitea-pv
2020-05-01 22:08:35 +00:00
mountPath: /data
volumes:
2021-08-26 16:42:28 +00:00
- name: gitea-pv
2020-05-01 22:08:35 +00:00
persistentVolumeClaim:
2021-08-26 16:42:28 +00:00
claimName: gitea-pvc
2021-08-26 16:42:21 +00:00
# ---
# apiVersion: v1
# kind: PersistentVolume
# metadata:
# name: gitea-data-nfs
# labels:
2021-08-26 16:42:32 +00:00
# app.kubernetes.io/name: gitea
2021-08-26 16:42:21 +00:00
# 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:
2021-08-26 16:42:28 +00:00
name: gitea-pvc
2020-05-01 22:08:35 +00:00
labels:
2021-08-26 16:42:32 +00:00
app.kubernetes.io/name: gitea
2020-05-01 22:08:35 +00:00
spec:
2021-08-26 16:42:21 +00:00
# storageClassName: ""
2020-05-01 22:08:35 +00:00
accessModes:
2021-08-26 16:42:21 +00:00
- ReadWriteOnce
2020-05-01 22:08:35 +00:00
resources:
requests:
2021-08-26 16:42:28 +00:00
storage: 10Gi
2021-08-26 16:42:21 +00:00
# selector:
# matchLabels:
2021-08-26 16:42:32 +00:00
# app.kubernetes.io/name: gitea
2020-05-01 22:08:35 +00:00
---
apiVersion: v1
kind: Service
metadata:
2021-08-26 16:42:21 +00:00
name: gitea
2020-05-01 22:08:35 +00:00
labels:
2021-08-26 16:42:32 +00:00
app.kubernetes.io/name: gitea
monitor: prometheus
2020-05-01 22:08:35 +00:00
spec:
selector:
2021-08-26 16:42:32 +00:00
app.kubernetes.io/name: gitea
2020-05-01 22:08:35 +00:00
ports:
- name: http
protocol: TCP
port: 80
targetPort: http
- name: ssh
protocol: TCP
port: 22
2021-08-26 16:42:21 +00:00
targetPort: ssh