diff --git a/infra/gitea/Makefile b/infra/gitea/Makefile new file mode 100644 index 0000000..6724eae --- /dev/null +++ b/infra/gitea/Makefile @@ -0,0 +1,4 @@ +install: + helm repo add gitea-charts https://dl.gitea.com/charts/ + helm repo update gitea-charts + helm upgrade --install -n gitea --create-namespace gitea gitea-charts/gitea --version 10.6.0 -f values.yml diff --git a/infra/gitea/values.yml b/infra/gitea/values.yml new file mode 100644 index 0000000..8132929 --- /dev/null +++ b/infra/gitea/values.yml @@ -0,0 +1,63 @@ +postgresql-ha: + enabled: false + +postgresql: + enabled: true + primary: + persistence: + enabled: true + storageClass: mayastor-single-hdd + +redis-cluster: + enabled: false + +redis: + enabled: true + master: + persistence: + enabled: true + storageClass: mayastor-single-hdd + +persistence: + enabled: true + storageClass: mayastor-single-hdd + +gitea: + config: + database: + DB_TYPE: postgres + indexer: + ISSUE_INDEXER_TYPE: bleve + REPO_INDEXER_ENABLED: true + admin: + username: GiteaAdmin + email: gi@tea.com + passwordMode: initialOnlyRequireReset + +service: + ssh: + annotations: + lbipam.cilium.io/sharing-key: gitea + lbipam.cilium.io/sharing-cross-namespace: nginx-ingress-controller + lbipam.cilium.io/ips: 10.44.0.0,2001:470:61a3:400::1 + type: LoadBalancer + port: 22 + # Requirement for sharing ip with other service + externalTrafficPolicy: Cluster + ipFamilyPolicy: RequireDualStack + +ingress: + enabled: true + className: nginx + annotations: + cert-manager.io/cluster-issuer: letsencrypt + acme.cert-manager.io/http01-edit-in-place: "true" + hosts: + - host: gitea.lumpiasty.xyz + paths: + - path: / + pathType: Prefix + tls: + - hosts: + - gitea.lumpiasty.xyz + secretName: gitea-ingress diff --git a/infra/nginx/values.yaml b/infra/nginx/values.yaml index b0c3b5a..b3e5530 100644 --- a/infra/nginx/values.yaml +++ b/infra/nginx/values.yaml @@ -14,5 +14,11 @@ controller: service: create: true type: LoadBalancer - externalTrafficPolicy: Local + # Requirement for sharing ip with other service + externalTrafficPolicy: Cluster ipFamilyPolicy: RequireDualStack + annotations: + # Share IP with gitea ssh so we can have the same domain for both port + lbipam.cilium.io/sharing-key: gitea + lbipam.cilium.io/sharing-cross-namespace: gitea + lbipam.cilium.io/ips: 10.44.0.0,2001:470:61a3:400::1