chore: Add Gitea Mirror Helm chart with deployment, service, ingress, PVC, and values files

This commit is contained in:
sha
2026-04-10 21:26:21 +03:00
parent 9bd65ac969
commit 6fd0c2f749
6 changed files with 174 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
apiVersion: v2
name: gitea-mirror
description: Gitea Mirror Helm chart
type: application
version: 0.1.0
appVersion: "3.12.5"
annotations:
version-source: github-release:RayLabsHQ/gitea-mirror
version-pattern: "s|^v||"
+71
View File
@@ -0,0 +1,71 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}
labels:
app.kubernetes.io/name: {{ .Chart.Name }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
app.kubernetes.io/component: mirror
annotations:
version-source: {{ index .Chart.Annotations "version-source" }}
version-pattern: {{ index .Chart.Annotations "version-pattern" | quote }}
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ .Release.Name }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:v{{ .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- containerPort: {{ .Values.port }}
name: http
protocol: TCP
env:
- name: PORT
value: {{ .Values.port | quote }}
{{- range $key, $value := .Values.env }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
{{- range .Values.secretEnvKeys }}
- name: {{ .envName }}
valueFrom:
secretKeyRef:
name: {{ $.Values.existingSecret }}
key: {{ .secretKey }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
- name: data
mountPath: /app/data
livenessProbe:
httpGet:
path: /api/health
port: http
initialDelaySeconds: 30
periodSeconds: 30
timeoutSeconds: 5
failureThreshold: 3
readinessProbe:
httpGet:
path: /api/health
port: http
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 3
volumes:
- name: data
persistentVolumeClaim:
claimName: {{ .Release.Name }}-data
+27
View File
@@ -0,0 +1,27 @@
{{- range $name, $config := .Values.ingresses }}
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ $.Release.Name }}-{{ $name }}
{{- with $config.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
rules:
- host: {{ $config.host }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ $.Release.Name }}
port:
number: {{ $.Values.port }}
{{- with $config.tls }}
tls:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
+13
View File
@@ -0,0 +1,13 @@
{{- if .Values.persistence.enabled }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ .Release.Name }}-data
spec:
accessModes:
- ReadWriteOnce
storageClassName: {{ .Values.persistence.storageClass }}
resources:
requests:
storage: {{ .Values.persistence.size }}
{{- end }}
+16
View File
@@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Release.Name }}
labels:
app.kubernetes.io/name: {{ .Chart.Name }}
app.kubernetes.io/instance: {{ .Release.Name }}
spec:
type: ClusterIP
selector:
app: {{ .Release.Name }}
ports:
- name: http
port: {{ .Values.port }}
targetPort: http
protocol: TCP
+38
View File
@@ -0,0 +1,38 @@
# Default values for Gitea Mirror Helm Chart
image:
repository: ghcr.io/raylabshq/gitea-mirror
pullPolicy: IfNotPresent
port: 4321
env:
NODE_ENV: "production"
HOST: "0.0.0.0"
DATABASE_URL: "file:data/gitea-mirror.db"
ALLOW_REGISTRATION: "true"
existingSecret: ""
secretEnvKeys: []
# - envName: BETTER_AUTH_SECRET
# secretKey: BETTER_AUTH_SECRET
resources:
requests:
cpu: "100m"
memory: "256Mi"
limits:
cpu: "1"
memory: "1Gi"
persistence:
enabled: true
storageClass: local-path
size: 5Gi
ingresses: {}
# https:
# host: mirror.example.com
# annotations: {}
# tls:
# - hosts:
# - mirror.example.com