diff --git a/apps/gitea.yaml b/apps/gitea.yaml new file mode 100644 index 0000000..a9688c8 --- /dev/null +++ b/apps/gitea.yaml @@ -0,0 +1,110 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: gitea +--- +apiVersion: source.toolkit.fluxcd.io/v1 +kind: HelmRepository +metadata: + name: gitea-charts + namespace: gitea +spec: + interval: 24h + url: https://dl.gitea.com/charts/ +--- +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: gitea + namespace: gitea +spec: + interval: 30m + chart: + spec: + chart: gitea + version: 10.6.0 + sourceRef: + kind: HelmRepository + name: gitea-charts + namespace: gitea + interval: 12h + values: + postgresql-ha: + enabled: false + + postgresql: + enabled: true + primary: + persistence: + enabled: true + storageClass: mayastor-single-hdd + resources: + requests: + cpu: 0 + + redis-cluster: + enabled: false + + redis: + enabled: true + master: + persistence: + enabled: true + storageClass: mayastor-single-hdd + resources: + requests: + cpu: 0 + + 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 + + resources: + requests: + cpu: 0 + + initContainers: + resources: + requests: + cpu: 0 diff --git a/apps/kustomization.yaml b/apps/kustomization.yaml new file mode 100644 index 0000000..4ab5c74 --- /dev/null +++ b/apps/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - gitea.yaml diff --git a/cluster/apps.yaml b/cluster/apps.yaml new file mode 100644 index 0000000..cbd4991 --- /dev/null +++ b/cluster/apps.yaml @@ -0,0 +1,13 @@ +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: apps + namespace: flux-system +spec: + interval: 10m0s + sourceRef: + kind: GitRepository + name: flux-system + path: ./apps + prune: true + wait: true