2020-05-01 22:08:35 +00:00
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
2023-02-28 05:06:48 +00:00
|
|
|
name: server
|
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:
|
2023-02-21 02:26:50 +00:00
|
|
|
- name: GITEA__SERVER__SSH_DOMAIN
|
2023-02-28 05:06:48 +00:00
|
|
|
valueFrom:
|
|
|
|
configMapKeyRef:
|
|
|
|
name: kustomize-generated-config
|
|
|
|
key: GITEA_EXTERNAL_HOST
|
2023-02-07 05:02:13 +00:00
|
|
|
- name: GITEA__SERVER__ROOT_URL
|
2023-02-28 05:06:48 +00:00
|
|
|
valueFrom:
|
|
|
|
configMapKeyRef:
|
|
|
|
name: kustomize-generated-config
|
|
|
|
key: GITEA_EXTERNAL_URL
|
|
|
|
# - name: GITEA__WEBHOOK_ALLOWED_HOST_LIST
|
|
|
|
# value: ${DRONE_EXTERNAL_HOST}
|
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__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
|
2023-09-22 05:20:57 +00:00
|
|
|
hostPort: 2222
|
2021-08-26 16:42:28 +00:00
|
|
|
containerPort: 22
|
|
|
|
resources:
|
|
|
|
requests:
|
2021-12-26 06:58:38 +00:00
|
|
|
cpu: 250m
|
2022-11-04 21:28:01 +00:00
|
|
|
memory: 500Mi
|
2021-12-26 06:58:38 +00:00
|
|
|
limits:
|
2022-05-26 03:43:44 +00:00
|
|
|
cpu: 250m
|
2022-11-04 21:28:01 +00:00
|
|
|
memory: 500Mi
|
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:
|
2023-02-28 05:06:48 +00:00
|
|
|
claimName: server-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:
|
2023-02-28 05:06:48 +00:00
|
|
|
name: server-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:
|
2023-02-28 05:06:48 +00:00
|
|
|
name: server
|
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:
|
2023-02-28 05:06:48 +00:00
|
|
|
name: server-ssh
|
2021-08-26 16:42:48 +00:00
|
|
|
labels:
|
|
|
|
app.kubernetes.io/name: gitea
|
|
|
|
spec:
|
|
|
|
type: NodePort
|
|
|
|
selector:
|
|
|
|
app.kubernetes.io/name: gitea
|
|
|
|
ports:
|
|
|
|
- port: 22
|
|
|
|
targetPort: ssh
|
|
|
|
nodePort: 30022
|