Fetch from your own git!

Signed-off-by: Martyn Ranyard <m@rtyn.berlin>
This commit is contained in:
Martyn 2023-12-01 15:59:57 +01:00
parent 1772f395d2
commit 7da16e048d
6 changed files with 139 additions and 0 deletions

View File

@ -0,0 +1,45 @@
apiVersion: apps/v1
kind: Deployment
metadata:
creationTimestamp: null
labels:
app: forgejo
name: forgejo
spec:
replicas: 1
selector:
matchLabels:
app: forgejo
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
app: forgejo
spec:
containers:
- image: codeberg.org/forgejo/forgejo:1.21
env:
- name: FORGEJO__database__DB_TYPE
value: postgres
- name: FORGEJO__database__HOST
value: forgejo-postgres
- name: FORGEJO__database__USER
value: forgejo
- name: FORGEJO__database__NAME
value: forgejo
- name: FORGEJO__database__PASSWD
valueFrom:
secretKeyRef:
name: forgejo.forgejo-postgres.credentials.postgresql.acid.zalan.do
key: password
name: forgejo
volumeMounts:
- name: data
mountPath: /data
resources: {}
volumes:
- name: data
persistentVolumeClaim:
claimName: forgejo-data
status: {}

View File

@ -0,0 +1,27 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
cert-manager.io/cluster-issuer: letsencrypt
external-dns.alpha.kubernetes.io/target: armnleg.martyn.berlin
nginx.ingress.kubernetes.io/proxy-body-size: 200m
labels:
app.kubernetes.io/name: forgejo
name: forgejo
spec:
ingressClassName: nginx
rules:
- host: git.martyn.berlin
http:
paths:
- backend:
service:
name: forgejo
port:
number: 80
path: /
pathType: Prefix
tls:
- hosts:
- git.martyn.berlin
secretName: forgejo-tls

View File

@ -0,0 +1,22 @@
apiVersion: "acid.zalan.do/v1"
kind: postgresql
metadata:
name: forgejo-postgres
spec:
teamId: forgejo
volume:
size: 8Gi
storageClass: local-path
numberOfInstances: 1
users:
forgejo:
- superuser
- createdb
databases:
forgejo: forgejo # dbname: owner
postgresql:
version: "15"
resources:
requests:
cpu: 10m
memory: 1Mi

View File

@ -0,0 +1,11 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: forgejo-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storageClassName: rook-ceph-block-ssd

View File

@ -0,0 +1,17 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: forgejo
name: forgejo
spec:
ports:
- port: 80
targetPort: 3000
name: http
- port: 2222
targetPort: 22
name: ssh
selector:
app: forgejo
type: LoadBalancer

View File

@ -0,0 +1,17 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: forgejo
namespace: argocd
spec:
destination:
namespace: git
server: https://kubernetes.default.svc
project: apps
source:
path: apps-kustomized/forgejo
repoURL: https://git.martyn.berlin/martyn/infra4talos
targetRevision: HEAD
syncPolicy:
automated:
selfHeal: true