initial commit
This commit is contained in:
commit
e2f07ec151
7 changed files with 120 additions and 0 deletions
2
README.md
Normal file
2
README.md
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
# forgejo
|
||||||
|
This is a tiny repository with all the necessary deployment files for a forgejo instance in my k8s vcluster. It is necessary to put this outside my forgejo instance to avoid dependency issues.
|
43
k8s/deployment.yaml
Normal file
43
k8s/deployment.yaml
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: forgejo-pod
|
||||||
|
app.kubernetes.io/instance: forgejo
|
||||||
|
app: forgejo-pod
|
||||||
|
name: forgejo-pod
|
||||||
|
namespace: forgejo
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: forgejo
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: forgejo
|
||||||
|
app: forgejo-pod
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- image: codeberg.org/forgejo/forgejo:7.0.2
|
||||||
|
imagePullPolicy: Always
|
||||||
|
env:
|
||||||
|
- name: USER_UID
|
||||||
|
value: "1000"
|
||||||
|
- name: USER_GID
|
||||||
|
value: "1000"
|
||||||
|
name: forgejo
|
||||||
|
ports:
|
||||||
|
- containerPort: 3000
|
||||||
|
name: web
|
||||||
|
protocol: TCP
|
||||||
|
- containerPort: 22
|
||||||
|
name: ssh
|
||||||
|
protocol: TCP
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: "/data"
|
||||||
|
name: forgejo-pv-storage
|
||||||
|
volumes:
|
||||||
|
- name: forgejo-pv-storage
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: forgejo-pvc
|
21
k8s/ingress.yaml
Normal file
21
k8s/ingress.yaml
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: forgejo-ingress
|
||||||
|
app.kubernetes.io/instance: forgejo
|
||||||
|
app: forgejo-ingress
|
||||||
|
name: forgejo-ingress
|
||||||
|
namespace: forgejo
|
||||||
|
spec:
|
||||||
|
rules:
|
||||||
|
- host: git.svc.neuber.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- backend:
|
||||||
|
service:
|
||||||
|
name: forgejo-service
|
||||||
|
port:
|
||||||
|
number: 80
|
||||||
|
path: /
|
||||||
|
pathType: Prefix
|
6
k8s/namespace.yaml
Normal file
6
k8s/namespace.yaml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: forgejo
|
||||||
|
name: forgejo
|
17
k8s/persistentvolumeclaim.yaml
Normal file
17
k8s/persistentvolumeclaim.yaml
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: forgejo-pvc
|
||||||
|
app.kubernetes.io/instance: forgejo
|
||||||
|
app: forgejo-pvc
|
||||||
|
name: forgejo-pvc
|
||||||
|
namespace: forgejo
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
volumeMode: Filesystem
|
||||||
|
volumeName: pvc-64e344d5-9dbe-4de4-9e6f-a1bad1da300e
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 10Gi
|
20
k8s/service.yaml
Normal file
20
k8s/service.yaml
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: forgejo-service
|
||||||
|
app.kubernetes.io/instance: forgejo
|
||||||
|
app: forgejo-service
|
||||||
|
name: forgejo-service
|
||||||
|
namespace: forgejo
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: web
|
||||||
|
port: 80
|
||||||
|
targetPort: 3000
|
||||||
|
- name: ssh
|
||||||
|
port: 22
|
||||||
|
targetPort: 22
|
||||||
|
selector:
|
||||||
|
app: forgejo-pod
|
||||||
|
type: ClusterIP
|
11
renovate.json
Normal file
11
renovate.json
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
|
"extends": [
|
||||||
|
"config:base"
|
||||||
|
],
|
||||||
|
"dependencyDashboard": true,
|
||||||
|
"kubernetes": {
|
||||||
|
"enabled": true,
|
||||||
|
"fileMatch": ["k8s/.+\\.yaml$"]
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue