Merge pull request #299 from 3dwardch3ng/app/gitea

App/gitea
This commit is contained in:
2024-06-25 10:04:46 +10:00
committed by GitHub
6 changed files with 166 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: gitea-ingress
namespace: gitea
annotations:
nginx.ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/use-regex: "true"
spec:
ingressClassName: nginx
rules:
- host: "gitea.cluster.local"
http:
paths:
- pathType: Prefix
path: "/"
backend:
service:
name: gitea
port:
number: 5432
- host: "gitea.cluster.edward.sydney"
http:
paths:
- pathType: Prefix
path: "/"
backend:
service:
name: gitea
port:
number: 5432

View File

@@ -0,0 +1,37 @@
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: gitea
namespace: gitea
spec:
targetNamespace: gitea
chart:
spec:
chart: gitea
sourceRef:
kind: HelmRepository
name: bitnami
namespace: flux-system
interval: 1h
install:
remediation:
retries: 3
values:
adminUsername: ${admin_username}
adminPassword: ${admin_password}
adminEmail: ${admin_email}
appName: app_name
persistence:
existingClaim: gitea-pvc
service:
nodePorts:
http: 30888
ssh: 30822
postgresql:
enabled: false
externalDatabase:
host: ${db_host}
port: ${db_port}
user: ${db_user}
database: ${db_name}
password: ${db_password}

View File

@@ -0,0 +1,46 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: gitea-pv
namespace: gitea
labels:
type: local
spec:
storageClassName: local-path
volumeMode: Filesystem
capacity:
storage: 32Gi
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
local:
path: "/mnt/nfs/AppData/gitea"
claimRef:
apiVersion: v1
kind: PersistentVolumeClaim
name: gitea-pvc
namespace: gitea
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- rpi5-cluster-node-3
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: gitea-pvc
namespace: gitea
labels:
name: gitea-pvc
spec:
storageClassName: local-path
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 32Gi

View File

@@ -0,0 +1,47 @@
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: gitea-secrets
namespace: gitea
spec:
interval: 10m
timeout: 1m30s
retryInterval: 30s
targetNamespace: redis
path: ./gitea
prune: true
sourceRef:
kind: GitRepository
namespace: flux-system
name: home-cluster-ops-secrets
dependsOn:
- name: repositories
namespace: flux-system
decryption:
provider: sops
secretRef:
name: gitea-sops-age
---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: gitea
namespace: gitea
spec:
interval: 10m
timeout: 1m30s
retryInterval: 30s
path: ./kubernetes/apps/gitea/app
prune: true
sourceRef:
kind: GitRepository
namespace: flux-system
name: flux-system
dependsOn:
- name: gitea-secrets
namespace: gitea
postBuild:
substituteFrom:
- kind: Secret
name: gitea-secrets

View File

@@ -5,6 +5,7 @@ resources:
- ./capacitor/capacitor.yaml
- ./cert-manager/cert-manager.yaml
- ./code-server/code-server.yaml
- ./gitea/gitea.yaml
- ./homer/homer.yaml
- ./jellyfin/jellyfin.yaml
- ./kavita/kavita.yaml

View File

@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: gitea