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:48 +00:00
|
|
|
replicas: 1 # gitea doesn't handle HA well
|
|
|
|
strategy:
|
|
|
|
type: Recreate
|
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:48 +00:00
|
|
|
- name: GITEA__DEFAULT__APP_NAME
|
2020-05-01 22:08:35 +00:00
|
|
|
value: Badjware's code stash
|
2021-08-26 16:42:48 +00:00
|
|
|
- name: GITEA__SERVICE__DISABLE_REGISTRATION
|
|
|
|
value: "yes"
|
|
|
|
- name: GITEA__SERVER__ROOT_URL
|
2020-08-02 03:40:27 +00:00
|
|
|
value: https://${GITEA_EXTERNAL_HOST}
|
2021-08-26 16:42:48 +00:00
|
|
|
- name: GITEA__SERVER__SSH_DOMAIN
|
2020-08-02 03:40:27 +00:00
|
|
|
value: ${GITEA_EXTERNAL_HOST}
|
2021-08-26 16:42:48 +00:00
|
|
|
- name: GITEA__SERVER__SSH_PORT
|
|
|
|
value: "30022"
|
2021-08-26 16:42:32 +00:00
|
|
|
- name: GITEA__METRICS__ENABLED
|
|
|
|
value: "true"
|
2021-08-26 16:42:48 +00:00
|
|
|
- name: GITEA__REPOSITORY__DISABLED_REPO_UNITS
|
|
|
|
value: repo.wiki
|
|
|
|
- name: GITEA__REPOSITORY__DEFAULT_REPO_UNITS
|
|
|
|
value: repo.code,repo.releases
|
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
|
2021-08-26 16:42:44 +00:00
|
|
|
memory: 750Mi
|
|
|
|
limits:
|
|
|
|
cpu: 1000m
|
2021-08-26 16:42:28 +00:00
|
|
|
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
|
|
|
|
port: 80
|
|
|
|
targetPort: http
|
2021-08-26 16:42:48 +00:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: gitea-ssh
|
|
|
|
labels:
|
|
|
|
app.kubernetes.io/name: gitea
|
|
|
|
spec:
|
|
|
|
type: NodePort
|
|
|
|
selector:
|
|
|
|
app.kubernetes.io/name: gitea
|
|
|
|
ports:
|
|
|
|
- port: 22
|
|
|
|
targetPort: ssh
|
|
|
|
nodePort: 30022
|