add gitea k3s declarations

This commit is contained in:
2026-08-24 15:38:30 -05:00
parent a68ca2df15
commit e4b1c856ac
10 changed files with 184 additions and 44 deletions
@@ -0,0 +1,62 @@
# Define how gitea pod operates
apiVersion: apps/v1
kind: Deployment
metadata:
name: gitea
namespace: gitea
spec:
replicas: 1
selector:
matchLabels:
app: gitea
template:
metadata:
labels:
app: gitea
spec:
containers:
- name: gitea
image: docker.gitea.com/gitea:1.27.2
ports:
- name: http
containerPort: 3000
protocol: TCP
- name: ssh
containerPort: 2222
protocol: TCP
env:
- name: GITEA__database__DB_TYPE
value: postgres
- name: GITEA__database__HOST
value: '{{ (datasource "dbhostname") }}'
- name: GITEA__database__NAME
value: '{{ (datasource "credentials").GITEA_DB_NAME }}'
- name: GITEA__database__USER
value: '{{ (datasource "credentials").GITEA_DB_USER }}'
- name: GITEA__database__PASSWD
value: '{{ (datasource "credentials").GITEA_DB_PASS}}'
- name: GITEA__server__HTTP_PORT
value: "3000"
- name: GITEA__server__SSH_PORT
value: "2222"
volumeMounts:
- name: gitea-data
mountPath: /var/lib/gitea
volumes:
- name: gitea-data
persistentVolumeClaim:
claimName: gitea-persistent-data
@@ -0,0 +1,6 @@
namespace: gitea
resources:
- deployment.yaml
- namespace.yaml
- pvc.yaml
- service.yaml
@@ -0,0 +1,5 @@
# Provide gitea its own namespace (gitea)
apiVersion: v1
kind: Namespace
metadata:
name: gitea
+12
View File
@@ -0,0 +1,12 @@
# All persistent storage not directed to DB will live in this claim
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: gitea-persistent-data
namespace: gitea
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
+24
View File
@@ -0,0 +1,24 @@
# point to the deployment
apiVersion: v1
kind: Service
metadata:
name: gitea
namespace: gitea
spec:
selector:
app: gitea
ports:
- name: http
port: 3000
targetPort: http
nodePort: 30081
protocol: TCP
- name: ssh
port: 2222
targetPort: ssh
nodePort: 30222
protocol: TCP
type: NodePort