initial checkin

This commit is contained in:
Radar231 2024-03-21 08:41:46 -04:00
commit 4033c2cb74
6 changed files with 134 additions and 0 deletions

6
README.md Normal file
View File

@ -0,0 +1,6 @@
# uptime-kuma k8s manifest
## Introduction
This deploys an uptime-kuma server.

50
gitea_deployment.yml Normal file
View File

@ -0,0 +1,50 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: gitea
spec:
selector:
matchLabels:
app: gitea
replicas: 1
strategy:
type: RollingUpdate
template:
metadata:
labels:
app: gitea
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/arch
operator: In
values:
- arm64
containers:
- name: gitea
image: gitea/gitea:1.21.7
env:
- name: PUID
value: "1000"
- name: PGID
value: "1000"
- name: TZ
value: "EST5EDT"
ports:
- containerPort: 3000
name: "gitea-3000"
- containerPort: 22
name: "gitea-22"
volumeMounts:
- name: gitea-data
mountPath: "/data"
volumes:
- name: gitea-data
persistentVolumeClaim:
claimName: gitea-data-pvc
# EOF

22
gitea_lb.yml Normal file
View File

@ -0,0 +1,22 @@
---
apiVersion: v1
kind: Service
metadata:
name: gitea
annotations:
metallb.universe.tf/address-pool: default
metallb.universe.tf/allow-shared-ip: "dot82"
spec:
loadBalancerIP: 192.168.20.82
ports:
- port: 80
targetPort: 3000
name: port3000
- port: 22
targetPort: 22
name: port22
selector:
app: gitea
type: LoadBalancer
# EOF

21
gitea_pv.yml Normal file
View File

@ -0,0 +1,21 @@
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: gitea-data-pv
labels:
name: gitea-data-pv
spec:
storageClassName: manual
capacity:
storage: 1Gi
accessModes:
- ReadWriteOnce
mountOptions:
- hard
- nfsvers=4.0
nfs:
server: 192.168.20.11
path: "/volume1/k8s-storage/gitea/data"
# EOF

19
gitea_pvc.yml Normal file
View File

@ -0,0 +1,19 @@
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: gitea-data-pvc
labels:
app: gitea-data
spec:
accessModes:
- ReadWriteOnce
storageClassName: "manual"
resources:
requests:
storage: 1Gi
selector:
matchLabels:
name: gitea-data-pv
# EOF

16
gitea_service.yml Normal file
View File

@ -0,0 +1,16 @@
---
apiVersion: v1
kind: Service
metadata:
name: gitea
spec:
ports:
- name: http3000
port: 3000
- name: ssh22
port: 22
selector:
# apply service to any pod with label app: gitea
app: gitea
# EOF