From a9ec93f1f94d1ffd88e2c4c1cfc071fa9ca89124 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Huss?= Date: Tue, 28 Nov 2023 12:46:26 +0100 Subject: [PATCH] fix --- apps/gitea/datas.tf | 7 + apps/gitea/index.yaml | 370 +++++++++++++++++++++--------------------- apps/gitea/ldap.tf | 8 - 3 files changed, 192 insertions(+), 193 deletions(-) diff --git a/apps/gitea/datas.tf b/apps/gitea/datas.tf index 60f8078..a465672 100644 --- a/apps/gitea/datas.tf +++ b/apps/gitea/datas.tf @@ -33,6 +33,13 @@ data "kubernetes_secret_v1" "authentik" { } } +data "kubernetes_ingress_v1" "authentik" { + metadata { + name = "authentik" + namespace = "${var.domain}-auth" + } +} + data "kustomization_overlay" "data" { common_labels = local.common-labels namespace = var.namespace diff --git a/apps/gitea/index.yaml b/apps/gitea/index.yaml index 8cba1b7..5d486e7 100644 --- a/apps/gitea/index.yaml +++ b/apps/gitea/index.yaml @@ -9,36 +9,179 @@ metadata: A painless self-hosted Git service. Gitea is a community managed lightweight code hosting solution written in Go. It is published under the MIT license. options: - ssh-sub-domain: - default: git + domain-name: + default: your_company.com examples: - - git + - your_company.com type: string - ingress-class: - default: traefik + volume: + default: + accessMode: ReadWriteOnce + size: 10Gi examples: - - traefik + - accessMode: ReadWriteOnce + size: 10Gi + properties: + accessMode: + default: ReadWriteOnce + enum: + - ReadWriteOnce + - ReadOnlyMany + - ReadWriteMany + type: string + size: + default: 10Gi + type: string + type: object + postgres: + default: + replicas: 1 + storage: 10Gi + version: '14' + examples: + - replicas: 1 + storage: 10Gi + version: '14' + properties: + replicas: + default: 1 + type: integer + storage: + default: 10Gi + type: string + version: + default: '14' + type: string + type: object + webhook: + default: + allowed-hosts: private + skip-tls-verify: false + examples: + - allowed-hosts: private + skip-tls-verify: false + properties: + allowed-hosts: + default: private + type: string + skip-tls-verify: + default: false + type: boolean + type: object + theme: + default: gitea-modern + examples: + - gitea-modern type: string sub-domain: default: git examples: - git type: string + disable-registration: + default: true + examples: + - true + type: boolean + domain: + default: your-company + examples: + - your-company + type: string + load-balancer: + default: + ip: '' + examples: + - ip: '' + properties: + ip: + default: '' + type: string + type: object replicas: default: 1 examples: - 1 type: integer - default-branch: - default: main + ssh-port: + default: 2222 examples: - - main - type: string - theme: - default: gitea-modern + - 2222 + type: integer + push-create: + default: + org: 'true' + private: 'false' + user: 'true' examples: - - gitea-modern - type: string + - org: 'true' + private: 'false' + user: 'true' + properties: + org: + default: 'true' + type: string + private: + default: 'false' + type: string + user: + default: 'true' + type: string + type: object + admin: + default: + email: git-admin@git.your_company.com + name: gitea_admin + examples: + - email: git-admin@git.your_company.com + name: gitea_admin + properties: + email: + default: git-admin@git.your_company.com + type: string + name: + default: gitea_admin + type: string + type: object + images: + default: + gitea: + pullPolicy: IfNotPresent + registry: docker.io + repository: gitea/gitea + tag: 1.20.5-rootless + examples: + - gitea: + pullPolicy: IfNotPresent + registry: docker.io + repository: gitea/gitea + tag: 1.20.5-rootless + properties: + gitea: + default: + pullPolicy: IfNotPresent + registry: docker.io + repository: gitea/gitea + tag: 1.20.5-rootless + properties: + pullPolicy: + default: IfNotPresent + enum: + - Always + - Never + - IfNotPresent + type: string + registry: + default: docker.io + type: string + repository: + default: gitea/gitea + type: string + tag: + default: 1.20.5-rootless + type: string + type: object + type: object backups: default: enable: false @@ -145,183 +288,15 @@ options: default: false type: boolean type: object - timezone: - default: Europe/Paris - examples: - - Europe/Paris - type: string - push-create: - default: - org: 'true' - private: 'false' - user: 'true' - examples: - - org: 'true' - private: 'false' - user: 'true' - properties: - org: - default: 'true' - type: string - private: - default: 'false' - type: string - user: - default: 'true' - type: string - type: object - volume: - default: - accessMode: ReadWriteOnce - size: 10Gi - examples: - - accessMode: ReadWriteOnce - size: 10Gi - properties: - accessMode: - default: ReadWriteOnce - enum: - - ReadWriteOnce - - ReadOnlyMany - - ReadWriteMany - type: string - size: - default: 10Gi - type: string - type: object - issuer: - default: letsencrypt-prod - examples: - - letsencrypt-prod - type: string - postgres: - default: - replicas: 1 - storage: 10Gi - version: '14' - examples: - - replicas: 1 - storage: 10Gi - version: '14' - properties: - replicas: - default: 1 - type: integer - storage: - default: 10Gi - type: string - version: - default: '14' - type: string - type: object - domain-name: - default: your_company.com - examples: - - your_company.com - type: string - webhook: - default: - allowed-hosts: private - skip-tls-verify: false - examples: - - allowed-hosts: private - skip-tls-verify: false - properties: - allowed-hosts: - default: private - type: string - skip-tls-verify: - default: false - type: boolean - type: object - ssh-port: - default: 2222 - examples: - - 2222 - type: integer - load-balancer: - default: - ip: '' - examples: - - ip: '' - properties: - ip: - default: '' - type: string - type: object - images: - default: - gitea: - pullPolicy: IfNotPresent - registry: docker.io - repository: gitea/gitea - tag: 1.20.5-rootless - examples: - - gitea: - pullPolicy: IfNotPresent - registry: docker.io - repository: gitea/gitea - tag: 1.20.5-rootless - properties: - gitea: - default: - pullPolicy: IfNotPresent - registry: docker.io - repository: gitea/gitea - tag: 1.20.5-rootless - properties: - pullPolicy: - default: IfNotPresent - enum: - - Always - - Never - - IfNotPresent - type: string - registry: - default: docker.io - type: string - repository: - default: gitea/gitea - type: string - tag: - default: 1.20.5-rootless - type: string - type: object - type: object app-group: default: dev examples: - dev type: string - admin: - default: - email: git-admin@git.your_company.com - name: gitea_admin + issuer: + default: letsencrypt-prod examples: - - email: git-admin@git.your_company.com - name: gitea_admin - properties: - email: - default: git-admin@git.your_company.com - type: string - name: - default: gitea_admin - type: string - type: object - disable-registration: - default: true - examples: - - true - type: boolean - domain: - default: your-company - examples: - - your-company - type: string - release: - default: 8.3.0 - examples: - - 8.3.0 + - letsencrypt-prod type: string redis: default: @@ -356,6 +331,31 @@ options: default: 2Gi type: string type: object + timezone: + default: Europe/Paris + examples: + - Europe/Paris + type: string + default-branch: + default: main + examples: + - main + type: string + release: + default: 8.3.0 + examples: + - 8.3.0 + type: string + ssh-sub-domain: + default: git + examples: + - git + type: string + ingress-class: + default: traefik + examples: + - traefik + type: string dependencies: - dist: null category: share diff --git a/apps/gitea/ldap.tf b/apps/gitea/ldap.tf index 088e308..a1675c4 100644 --- a/apps/gitea/ldap.tf +++ b/apps/gitea/ldap.tf @@ -35,14 +35,6 @@ locals { # length: "32" # EOF # } -data "kubernetes_secret_v1" "gitea_ldap_password" { - #depends_on = [kubectl_manifest.gitea_ldap] - metadata { - name = kubectl_manifest.gitea_ldap.name - namespace = var.namespace - } -} - # resource "authentik_user" "gitea_ldapsearch" { # username = "${var.component}-ldapsearch" # name = "${var.component}-ldapsearch"