86 lines
1.8 KiB
YAML
86 lines
1.8 KiB
YAML
|
apiVersion: v1
|
||
|
kind: Namespace
|
||
|
metadata:
|
||
|
name: gitea
|
||
|
---
|
||
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: gitea
|
||
|
namespace: default
|
||
|
labels:
|
||
|
app: gitea
|
||
|
spec:
|
||
|
replicas: 1
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
app: gitea
|
||
|
template:
|
||
|
metadata:
|
||
|
name: gitea
|
||
|
labels:
|
||
|
app: gitea
|
||
|
spec:
|
||
|
containers:
|
||
|
- name: gitea
|
||
|
image: gitea/gitea:1.16.8
|
||
|
imagePullPolicy: Always
|
||
|
# config settings
|
||
|
env:
|
||
|
- name: GITEA__service__DISABLE_REGISTRATION
|
||
|
value: "true"
|
||
|
- name: GITEA__repository__DEFAULT_PRIVATE
|
||
|
value: private
|
||
|
- name: GITEA__service__ENABLE_CAPTCHA
|
||
|
value: "true"
|
||
|
volumeMounts:
|
||
|
- name: app-ini-config-volume
|
||
|
mountPath: "/tmp/app.ini"
|
||
|
subPath: "app.ini"
|
||
|
- name: gitea-root-volume
|
||
|
mountPath: "/var/lib/gitea"
|
||
|
- name: gitea-data-volume
|
||
|
mountPath: "/data"
|
||
|
ports:
|
||
|
- containerPort: 22
|
||
|
name: git-ssh
|
||
|
- containerPort: 3000
|
||
|
name: gitea
|
||
|
volumes:
|
||
|
- name: app-ini-config-volume
|
||
|
configMap:
|
||
|
name: gitea-app-ini-config
|
||
|
- name: gitea-root-volume
|
||
|
persistentVolumeClaim:
|
||
|
claimName: gitea-root-pvc
|
||
|
- name: gitea-data-volume
|
||
|
persistentVolumeClaim:
|
||
|
claimName: gitea-data-pvc
|
||
|
|
||
|
---
|
||
|
kind: Service
|
||
|
apiVersion: v1
|
||
|
metadata:
|
||
|
name: gitea-service
|
||
|
namespace: default
|
||
|
spec:
|
||
|
selector:
|
||
|
app: gitea
|
||
|
ports:
|
||
|
- name: gitea-http
|
||
|
port: 3000
|
||
|
|
||
|
---
|
||
|
kind: Service
|
||
|
apiVersion: v1
|
||
|
metadata:
|
||
|
name: gitea-ssh-service
|
||
|
namespace: default
|
||
|
spec:
|
||
|
type: NodePort
|
||
|
selector:
|
||
|
app: gitea
|
||
|
ports:
|
||
|
- port: 2225
|
||
|
targetPort: 22
|
||
|
nodePort: 30005
|