Add gitea ha support
This commit is contained in:
@ -34,6 +34,10 @@ dependencies:
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 5.9.0
|
||||
condition: memcached.enabled
|
||||
- name: redis-cluster
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 6.2.3
|
||||
condition: redis-cluster.enabled
|
||||
- name: mysql
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 6.14.10
|
||||
@ -42,6 +46,10 @@ dependencies:
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 10.3.17
|
||||
condition: postgresql.enabled
|
||||
- name: postgresql-ha
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 7.7.3
|
||||
condition: postgresql-ha.enabled
|
||||
- name: mariadb
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 9.3.6
|
||||
|
11
pvc.yaml
Normal file
11
pvc.yaml
Normal file
@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: gitea-data-test
|
||||
namespace: ndo
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
@ -66,6 +66,8 @@ app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- define "db.servicename" -}}
|
||||
{{- if .Values.postgresql.enabled -}}
|
||||
{{- printf "%s-postgresql" .Release.Name -}}
|
||||
{{- else if (index .Values "postgresql-ha").enabled -}}
|
||||
{{- printf "%s-postgresql-ha-pgpool" .Release.Name -}}
|
||||
{{- else if .Values.mysql.enabled -}}
|
||||
{{- printf "%s-mysql" .Release.Name -}}
|
||||
{{- else if .Values.mariadb.enabled -}}
|
||||
@ -79,6 +81,8 @@ app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- define "db.port" -}}
|
||||
{{- if .Values.postgresql.enabled -}}
|
||||
{{ .Values.postgresql.global.postgresql.servicePort }}
|
||||
{{- else if (index .Values "postgresql-ha").enabled -}}
|
||||
{{ (index .Values "postgresql-ha").service.port }}
|
||||
{{- else if .Values.mysql.enabled -}}
|
||||
{{ .Values.mysql.service.port }}
|
||||
{{- else if .Values.mariadb.enabled -}}
|
||||
@ -88,7 +92,11 @@ app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "postgresql.dns" -}}
|
||||
{{- if .Values.postgresql.enabled -}}
|
||||
{{- printf "%s-postgresql.%s.svc.%s:%g" .Release.Name .Release.Namespace .Values.clusterDomain .Values.postgresql.global.postgresql.servicePort -}}
|
||||
{{- else if (index .Values "postgresql-ha").enabled -}}
|
||||
{{- printf "%s-postgresql-ha-pgpool.%s.svc.%s:%g" .Release.Name .Release.Namespace .Values.clusterDomain (index .Values "postgresql-ha").service.port -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "mysql.dns" -}}
|
||||
@ -103,6 +111,10 @@ app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- printf "%s-memcached.%s.svc.%s:%g" .Release.Name .Release.Namespace .Values.clusterDomain .Values.memcached.service.port | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "redis.dns" -}}
|
||||
{{- printf "redis://%s-redis-cluster.%s.svc.%s:%g/0?pool_size=100&idle_timeout=180s" .Release.Name .Release.Namespace .Values.clusterDomain (index .Values "redis-cluster").service.port -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "gitea.default_domain" -}}
|
||||
{{- printf "%s-gitea.%s.svc.%s" (include "gitea.fullname" .) .Release.Namespace .Values.clusterDomain | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
39
values.yaml
39
values.yaml
@ -2,7 +2,7 @@
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
replicaCount: 1
|
||||
replicaCount: 2
|
||||
|
||||
clusterDomain: cluster.local
|
||||
|
||||
@ -114,12 +114,7 @@ statefulset:
|
||||
|
||||
persistence:
|
||||
enabled: true
|
||||
# existingClaim:
|
||||
size: 10Gi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
labels: {}
|
||||
annotations: {}
|
||||
existingClaim: gitea-data-test
|
||||
# storageClass:
|
||||
# subPath:
|
||||
|
||||
@ -195,7 +190,9 @@ gitea:
|
||||
# customProfileUrl:
|
||||
# customEmailUrl:
|
||||
|
||||
config: {}
|
||||
config:
|
||||
indexer:
|
||||
ISSUE_INDEXER_TYPE: db
|
||||
# APP_NAME: "Gitea: Git with a cup of tea"
|
||||
# RUN_MODE: dev
|
||||
#
|
||||
@ -248,6 +245,17 @@ memcached:
|
||||
service:
|
||||
port: 11211
|
||||
|
||||
redis-cluster:
|
||||
enabled: false
|
||||
global:
|
||||
redis:
|
||||
password: gitea
|
||||
cluster:
|
||||
nodes: 6
|
||||
replicas: 1
|
||||
service:
|
||||
port: 6379
|
||||
|
||||
postgresql:
|
||||
enabled: true
|
||||
global:
|
||||
@ -259,6 +267,21 @@ postgresql:
|
||||
persistence:
|
||||
size: 10Gi
|
||||
|
||||
postgresql-ha:
|
||||
enabled: false
|
||||
global:
|
||||
postgresql:
|
||||
database: gitea
|
||||
username: gitea
|
||||
password: gitea
|
||||
repmgrPassword: postgresql
|
||||
repmgrUsername: postgresql
|
||||
repmgrDatabase: repr
|
||||
service:
|
||||
port: 5432
|
||||
persistence:
|
||||
size: 10Gi
|
||||
|
||||
mysql:
|
||||
enabled: false
|
||||
root:
|
||||
|
Reference in New Issue
Block a user