107 lines
2.5 KiB
YAML
107 lines
2.5 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: server
|
|
labels:
|
|
app.kubernetes.io/name: gitea
|
|
spec:
|
|
replicas: 1 # gitea doesn't handle HA well
|
|
strategy:
|
|
type: Recreate
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: gitea
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: gitea
|
|
spec:
|
|
containers:
|
|
- name: gitea
|
|
image: gitea/gitea
|
|
env:
|
|
- name: GITEA__SERVER__SSH_DOMAIN
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: kustomize-generated-config
|
|
key: GITEA_EXTERNAL_HOST
|
|
- name: GITEA__SERVER__ROOT_URL
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: kustomize-generated-config
|
|
key: GITEA_EXTERNAL_URL
|
|
- name: GITEA__DEFAULT__APP_NAME
|
|
value: Badjware's code stash
|
|
- name: GITEA__SERVICE__DISABLE_REGISTRATION
|
|
value: "yes"
|
|
- name: GITEA__SERVER__SSH_PORT
|
|
value: "30022"
|
|
- name: GITEA__METRICS__ENABLED
|
|
value: "true"
|
|
- name: GITEA__REPOSITORY__DISABLED_REPO_UNITS
|
|
value: repo.wiki
|
|
- name: GITEA__REPOSITORY__DEFAULT_REPO_UNITS
|
|
value: repo.code,repo.releases
|
|
ports:
|
|
- name: http
|
|
containerPort: 3000
|
|
- name: ssh
|
|
hostPort: 2222
|
|
containerPort: 22
|
|
resources:
|
|
requests:
|
|
cpu: 500m
|
|
memory: 500Mi
|
|
limits:
|
|
cpu: 1000m
|
|
memory: 500Mi
|
|
volumeMounts:
|
|
- name: gitea-pv
|
|
mountPath: /data
|
|
volumes:
|
|
- name: gitea-pv
|
|
persistentVolumeClaim:
|
|
claimName: server-pvc
|
|
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: server-pvc
|
|
labels:
|
|
app.kubernetes.io/name: gitea
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 20Gi
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: server
|
|
labels:
|
|
app.kubernetes.io/name: gitea
|
|
monitor: prometheus
|
|
spec:
|
|
selector:
|
|
app.kubernetes.io/name: gitea
|
|
ports:
|
|
- name: http
|
|
port: 80
|
|
targetPort: http
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: server-ssh
|
|
labels:
|
|
app.kubernetes.io/name: gitea
|
|
spec:
|
|
type: NodePort
|
|
selector:
|
|
app.kubernetes.io/name: gitea
|
|
ports:
|
|
- port: 22
|
|
targetPort: ssh
|
|
nodePort: 30022 |