diff --git a/apps/code-server/deploy.tf b/apps/code-server/deploy.tf index c95f6f9..6eb4a4e 100644 --- a/apps/code-server/deploy.tf +++ b/apps/code-server/deploy.tf @@ -46,7 +46,7 @@ resource "kubectl_manifest" "deploy" { - name: DOCKER_USER value: coder - name: IS_CONSOLE - value: "${var.no-editor?"shellinabox":"code-server"}" + value: "${var.no_editor?"shellinabox":"code-server"}" - name: TZ value: "${var.timezone}" - name: ENTRYPOINTD diff --git a/apps/code-server/index.yaml b/apps/code-server/index.yaml index 09d8e5a..d2a6286 100644 --- a/apps/code-server/index.yaml +++ b/apps/code-server/index.yaml @@ -6,48 +6,11 @@ metadata: name: code-server description: null options: - storage: - default: - volume: - accessMode: ReadWriteOnce - size: 20Gi - type: Filesystem - description: Configure this app storage + app_group: + default: dev examples: - - volume: - accessMode: ReadWriteOnce - size: 20Gi - type: Filesystem - properties: - volume: - default: - accessMode: ReadWriteOnce - size: 20Gi - type: Filesystem - properties: - accessMode: - default: ReadWriteOnce - enum: - - ReadWriteOnce - - ReadOnlyMany - - ReadWriteMany - type: string - size: - default: 20Gi - type: string - type: - default: Filesystem - enum: - - Filesystem - - Block - type: string - type: object - type: object - no_editor: - default: false - examples: - - false - type: boolean + - dev + type: string images: default: codeserver: @@ -87,6 +50,73 @@ options: type: number type: object type: object + domain: + default: your-company + examples: + - your-company + type: string + domain_name: + default: your-company.com + examples: + - your-company.com + type: string + ingress_class: + default: traefik + examples: + - traefik + type: string + storage: + default: + volume: + accessMode: ReadWriteOnce + size: 20Gi + type: Filesystem + description: Configure this app storage + examples: + - volume: + accessMode: ReadWriteOnce + size: 20Gi + type: Filesystem + properties: + volume: + default: + accessMode: ReadWriteOnce + size: 20Gi + type: Filesystem + properties: + accessMode: + default: ReadWriteOnce + enum: + - ReadWriteOnce + - ReadOnlyMany + - ReadWriteMany + type: string + size: + default: 20Gi + type: string + type: + default: Filesystem + enum: + - Filesystem + - Block + type: string + type: object + type: object + issuer: + default: letsencrypt-prod + examples: + - letsencrypt-prod + type: string + sub_domain: + default: code + examples: + - code + type: string + timezone: + default: Europe/Paris + examples: + - Europe/Paris + type: string admin: default: cluster: false @@ -102,41 +132,11 @@ options: default: false type: boolean type: object - ingress_class: - default: traefik + no_editor: + default: false examples: - - traefik - type: string - sub_domain: - default: code - examples: - - code - type: string - timezone: - default: Europe/Paris - examples: - - Europe/Paris - type: string - domain: - default: your-company - examples: - - your-company - type: string - app_group: - default: dev - examples: - - dev - type: string - domain_name: - default: your-company.com - examples: - - your-company.com - type: string - issuer: - default: letsencrypt-prod - examples: - - letsencrypt-prod - type: string + - false + type: boolean dependencies: - dist: null category: share diff --git a/apps/gitea/datas.tf b/apps/gitea/datas.tf index 244ece3..e48a084 100644 --- a/apps/gitea/datas.tf +++ b/apps/gitea/datas.tf @@ -154,11 +154,11 @@ data "kustomization_overlay" "data" { k8up.io/backup: "true" spec: accessModes: - - "${var.volume.accessMode}" + - "${var.storage.volume.accessMode}" volumeMode: Filesystem resources: requests: - storage: "${var.volume.size}" + storage: "${var.storage.volume.size}" EOF } patches { diff --git a/apps/gitea/index.yaml b/apps/gitea/index.yaml index 4d69c93..1cee935 100644 --- a/apps/gitea/index.yaml +++ b/apps/gitea/index.yaml @@ -9,31 +9,31 @@ 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: - ingress_class: - default: traefik - examples: - - traefik - type: string - timezone: - default: Europe/Paris - examples: - - Europe/Paris - type: string - app_group: - default: dev - examples: - - dev - type: string - domain: - default: your-company - examples: - - your-company - type: string disable-registration: default: true examples: - true type: boolean + theme: + default: gitea-modern + examples: + - gitea-modern + type: string + replicas: + default: 1 + examples: + - 1 + type: integer + timezone: + default: Europe/Paris + examples: + - Europe/Paris + type: string + ssh-port: + default: 2222 + examples: + - 2222 + type: integer storage: default: postgres: @@ -95,6 +95,31 @@ options: type: string type: object type: object + domain: + default: your-company + examples: + - your-company + type: string + domain_name: + default: your_company.com + examples: + - your_company.com + type: string + ingress_class: + default: traefik + examples: + - traefik + type: string + load-balancer: + default: + ip: '' + examples: + - ip: '' + properties: + ip: + default: '' + type: string + type: object backups: default: enable: false @@ -201,26 +226,31 @@ options: default: false type: boolean type: object - postgres: - default: - replicas: 1 + sub_domain: + default: git examples: - - replicas: 1 - properties: - replicas: - default: 1 - type: integer - type: object - release: - default: 8.3.0 - examples: - - 8.3.0 + - git type: string default-branch: default: main examples: - main type: string + app_group: + default: dev + examples: + - dev + type: string + issuer: + default: letsencrypt-prod + examples: + - letsencrypt-prod + type: string + release: + default: 8.3.0 + examples: + - 8.3.0 + type: string push-create: default: org: 'true' @@ -241,11 +271,31 @@ options: default: 'true' type: string type: object - domain_name: - default: your_company.com + admin: + default: + email: git-admin@git.your_company.com + name: gitea_admin examples: - - your_company.com - type: string + - 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 + postgres: + default: + replicas: 1 + examples: + - replicas: 1 + properties: + replicas: + default: 1 + type: integer + type: object webhook: default: allowed-hosts: private @@ -261,31 +311,6 @@ options: default: false type: boolean type: object - sub_domain: - default: git - examples: - - git - type: string - ssh-sub_domain: - default: git - examples: - - git - type: string - load-balancer: - default: - ip: '' - examples: - - ip: '' - properties: - ip: - default: '' - type: string - type: object - issuer: - default: letsencrypt-prod - examples: - - letsencrypt-prod - type: string redis: default: exporter: @@ -303,31 +328,6 @@ options: type: boolean type: object type: object - theme: - default: gitea-modern - examples: - - gitea-modern - type: string - 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 - replicas: - default: 1 - examples: - - 1 - type: integer images: default: gitea: @@ -459,11 +459,11 @@ options: type: string type: object type: object - ssh-port: - default: 2222 + ssh-sub_domain: + default: git examples: - - 2222 - type: integer + - git + type: string dependencies: - dist: null category: share diff --git a/apps/nextcloud/index.yaml b/apps/nextcloud/index.yaml index 03e0824..2999a8d 100644 --- a/apps/nextcloud/index.yaml +++ b/apps/nextcloud/index.yaml @@ -6,65 +6,31 @@ metadata: name: nextcloud description: null options: - storage: + postgres: default: - postgres: - size: 5Gi - redis: - size: 2Gi - volume: - accessMode: ReadWriteOnce - size: 10Gi - type: Filesystem - description: Configure this app storage + replicas: 1 examples: - - postgres: - size: 5Gi - redis: - size: 2Gi - volume: - accessMode: ReadWriteOnce - size: 10Gi - type: Filesystem + - replicas: 1 properties: - postgres: + replicas: + default: 1 + type: integer + type: object + redis: + default: + exporter: + enabled: true + examples: + - exporter: + enabled: true + properties: + exporter: default: - size: 5Gi + enabled: true properties: - size: - default: 5Gi - type: string - type: object - redis: - default: - size: 2Gi - properties: - size: - default: 2Gi - type: string - type: object - volume: - default: - accessMode: ReadWriteOnce - size: 10Gi - type: Filesystem - properties: - accessMode: - default: ReadWriteOnce - enum: - - ReadWriteOnce - - ReadOnlyMany - - ReadWriteMany - type: string - size: - default: 10Gi - type: string - type: - default: Filesystem - enum: - - Filesystem - - Block - type: string + enabled: + default: true + type: boolean type: object type: object apps: @@ -157,16 +123,117 @@ options: default: true type: boolean type: object - admin: + backups: default: - name: nextcloud_admin + enable: false + endpoint: '' + key-id-key: s3-id + restic-key: bck-password + retention: + db: 30d + keepDaily: 14 + keepMonthly: 12 + keepWeekly: 6 + keepYearly: 12 + schedule: + backup: 30 3 * * * + check: 30 5 * * 1 + db: 30 3 * * * + prune: 30 1 * * 0 + secret-key: s3-secret + secret-name: backup-settings + use-barman: false examples: - - name: nextcloud_admin + - enable: false + endpoint: '' + key-id-key: s3-id + restic-key: bck-password + retention: + db: 30d + keepDaily: 14 + keepMonthly: 12 + keepWeekly: 6 + keepYearly: 12 + schedule: + backup: 30 3 * * * + check: 30 5 * * 1 + db: 30 3 * * * + prune: 30 1 * * 0 + secret-key: s3-secret + secret-name: backup-settings + use-barman: false properties: - name: - default: nextcloud_admin + enable: + default: false + type: boolean + endpoint: + default: '' type: string + key-id-key: + default: s3-id + type: string + restic-key: + default: bck-password + type: string + retention: + default: + db: 30d + keepDaily: 14 + keepMonthly: 12 + keepWeekly: 6 + keepYearly: 12 + properties: + db: + default: 30d + type: string + keepDaily: + default: 14 + type: integer + keepMonthly: + default: 12 + type: integer + keepWeekly: + default: 6 + type: integer + keepYearly: + default: 12 + type: integer + type: object + schedule: + default: + backup: 30 3 * * * + check: 30 5 * * 1 + db: 30 3 * * * + prune: 30 1 * * 0 + properties: + backup: + default: 30 3 * * * + type: string + check: + default: 30 5 * * 1 + type: string + db: + default: 30 3 * * * + type: string + prune: + default: 30 1 * * 0 + type: string + type: object + secret-key: + default: s3-secret + type: string + secret-name: + default: backup-settings + type: string + use-barman: + default: false + type: boolean type: object + openid-name: + default: vynil + examples: + - vynil + type: string hpa: default: avg-cpu: 50 @@ -192,10 +259,30 @@ options: examples: - your_company.com type: string - ingress_class: - default: traefik + admin: + default: + name: nextcloud_admin examples: - - traefik + - name: nextcloud_admin + properties: + name: + default: nextcloud_admin + type: string + type: object + issuer: + default: letsencrypt-prod + examples: + - letsencrypt-prod + type: string + sub_domain: + default: files + examples: + - files + type: string + domain: + default: your-company + examples: + - your-company type: string images: default: @@ -452,132 +539,72 @@ options: type: string type: object type: object - domain: - default: your-company + ingress_class: + default: traefik examples: - - your-company + - traefik type: string - issuer: - default: letsencrypt-prod - examples: - - letsencrypt-prod - type: string - backups: + storage: default: - enable: false - endpoint: '' - key-id-key: s3-id - restic-key: bck-password - retention: - db: 30d - keepDaily: 14 - keepMonthly: 12 - keepWeekly: 6 - keepYearly: 12 - schedule: - backup: 30 3 * * * - check: 30 5 * * 1 - db: 30 3 * * * - prune: 30 1 * * 0 - secret-key: s3-secret - secret-name: backup-settings - use-barman: false + postgres: + size: 5Gi + redis: + size: 2Gi + volume: + accessMode: ReadWriteOnce + size: 10Gi + type: Filesystem + description: Configure this app storage examples: - - enable: false - endpoint: '' - key-id-key: s3-id - restic-key: bck-password - retention: - db: 30d - keepDaily: 14 - keepMonthly: 12 - keepWeekly: 6 - keepYearly: 12 - schedule: - backup: 30 3 * * * - check: 30 5 * * 1 - db: 30 3 * * * - prune: 30 1 * * 0 - secret-key: s3-secret - secret-name: backup-settings - use-barman: false + - postgres: + size: 5Gi + redis: + size: 2Gi + volume: + accessMode: ReadWriteOnce + size: 10Gi + type: Filesystem properties: - enable: - default: false - type: boolean - endpoint: - default: '' - type: string - key-id-key: - default: s3-id - type: string - restic-key: - default: bck-password - type: string - retention: + postgres: default: - db: 30d - keepDaily: 14 - keepMonthly: 12 - keepWeekly: 6 - keepYearly: 12 + size: 5Gi properties: - db: - default: 30d - type: string - keepDaily: - default: 14 - type: integer - keepMonthly: - default: 12 - type: integer - keepWeekly: - default: 6 - type: integer - keepYearly: - default: 12 - type: integer - type: object - schedule: - default: - backup: 30 3 * * * - check: 30 5 * * 1 - db: 30 3 * * * - prune: 30 1 * * 0 - properties: - backup: - default: 30 3 * * * - type: string - check: - default: 30 5 * * 1 - type: string - db: - default: 30 3 * * * - type: string - prune: - default: 30 1 * * 0 + size: + default: 5Gi + type: string + type: object + redis: + default: + size: 2Gi + properties: + size: + default: 2Gi + type: string + type: object + volume: + default: + accessMode: ReadWriteOnce + size: 10Gi + type: Filesystem + properties: + accessMode: + default: ReadWriteOnce + enum: + - ReadWriteOnce + - ReadOnlyMany + - ReadWriteMany + type: string + size: + default: 10Gi + type: string + type: + default: Filesystem + enum: + - Filesystem + - Block type: string type: object - secret-key: - default: s3-secret - type: string - secret-name: - default: backup-settings - type: string - use-barman: - default: false - type: boolean type: object - openid-name: - default: vynil - examples: - - vynil - type: string - sub_domain: - default: files - examples: - - files - type: string app_group: default: '' examples: diff --git a/monitor/grafana/datas.tf b/monitor/grafana/datas.tf index af51d56..97a0d6e 100644 --- a/monitor/grafana/datas.tf +++ b/monitor/grafana/datas.tf @@ -58,11 +58,11 @@ data "kustomization_overlay" "data" { k8up.io/backup: "true" spec: accessModes: - - "${var.volume.accessMode}" + - "${var.storage.volume.accessMode}" volumeMode: Filesystem resources: requests: - storage: "${var.volume.size}" + storage: "${var.storage.volume.size}" EOF } patches { diff --git a/monitor/grafana/index.yaml b/monitor/grafana/index.yaml index d2a24ac..263de99 100644 --- a/monitor/grafana/index.yaml +++ b/monitor/grafana/index.yaml @@ -6,34 +6,20 @@ metadata: name: grafana description: null options: - volume: - default: - accessMode: ReadWriteOnce - size: 10Gi + domain: + default: your-company examples: - - accessMode: ReadWriteOnce - size: 10Gi - properties: - accessMode: - default: ReadWriteOnce - enum: - - ReadWriteOnce - - ReadOnlyMany - - ReadWriteMany - type: string - size: - default: 10Gi - type: string - type: object - sub_domain: - default: grafana - examples: - - grafana + - your-company type: string - issuer: - default: letsencrypt-prod + domain_name: + default: your_company.com examples: - - letsencrypt-prod + - your_company.com + type: string + app_group: + default: monitor + examples: + - monitor type: string images: default: @@ -132,30 +118,44 @@ options: type: string type: object type: object - ingress_class: - default: traefik + sub_domain: + default: grafana examples: - - traefik + - grafana type: string - domain: - default: your-company + volume: + default: + accessMode: ReadWriteOnce + size: 10Gi examples: - - your-company - type: string + - accessMode: ReadWriteOnce + size: 10Gi + properties: + accessMode: + default: ReadWriteOnce + enum: + - ReadWriteOnce + - ReadOnlyMany + - ReadWriteMany + type: string + size: + default: 10Gi + type: string + type: object admin_name: default: grafana_admin examples: - grafana_admin type: string - app_group: - default: monitor + ingress_class: + default: traefik examples: - - monitor + - traefik type: string - domain_name: - default: your_company.com + issuer: + default: letsencrypt-prod examples: - - your_company.com + - letsencrypt-prod type: string dependencies: [] providers: diff --git a/monitor/loki/datas.tf b/monitor/loki/datas.tf index 1f2706b..fe6f132 100644 --- a/monitor/loki/datas.tf +++ b/monitor/loki/datas.tf @@ -60,11 +60,11 @@ data "kustomization_overlay" "data" { k8up.io/backup: "true" spec: accessModes: - - "${var.volume.accessMode}" + - "${var.storage.volume.accessMode}" volumeMode: Filesystem resources: requests: - storage: "${var.volume.size}" + storage: "${var.storage.volume.size}" EOF } } diff --git a/monitor/loki/index.yaml b/monitor/loki/index.yaml index 71f29e5..03ae00e 100644 --- a/monitor/loki/index.yaml +++ b/monitor/loki/index.yaml @@ -6,25 +6,6 @@ metadata: name: loki description: null options: - 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 images: default: loki: @@ -64,6 +45,25 @@ options: type: string type: object 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 alertmanager: default: alertmanager-alertmanager examples: diff --git a/share/dataset-pg/databases.tf b/share/dataset-pg/databases.tf index ae72849..bbbbc9b 100644 --- a/share/dataset-pg/databases.tf +++ b/share/dataset-pg/databases.tf @@ -16,9 +16,9 @@ locals { pg_username = data.kubernetes_secret_v1.postgresql_password.data["username"] pg_password = data.kubernetes_secret_v1.postgresql_password.data["password"] pg_host = "${var.instance}-${var.component}-rw.${var.namespace}.svc" - pg-username = pg_username - pg-password = pg_password - pg-host = pg_host + pg-username = local.pg_username + pg-password = local.pg_password + pg-host = local.pg_host sorted-db-name = reverse(distinct(sort([ for db in var.databases: db.name diff --git a/share/dataset-pg/index.yaml b/share/dataset-pg/index.yaml index 11ea0d0..2b962bb 100644 --- a/share/dataset-pg/index.yaml +++ b/share/dataset-pg/index.yaml @@ -6,108 +6,11 @@ metadata: name: dataset-pg description: null options: - backups: - default: - enable: false - endpoint: '' - key-id-key: s3-id - retention: - db: 30d - schedule: - db: 0 3 * * * - secret-key: s3-secret - secret-name: backup-settings - examples: - - enable: false - endpoint: '' - key-id-key: s3-id - retention: - db: 30d - schedule: - db: 0 3 * * * - secret-key: s3-secret - secret-name: backup-settings - properties: - enable: - default: false - type: boolean - endpoint: - default: '' - type: string - key-id-key: - default: s3-id - type: string - retention: - default: - db: 30d - properties: - db: - default: 30d - type: string - type: object - schedule: - default: - db: 0 3 * * * - properties: - db: - default: 0 3 * * * - type: string - type: object - secret-key: - default: s3-secret - type: string - secret-name: - default: backup-settings - type: string - type: object - postgres: - default: - replicas: 1 - examples: - - replicas: 1 - properties: - replicas: - default: 1 - type: integer - type: object - issuer: - default: letsencrypt-prod - examples: - - letsencrypt-prod - type: string - app_group: - default: api - examples: - - api - type: string - databases: - default: [] - items: - properties: - name: - default: db - type: string - type: object - type: array sub_domain: default: dataset-pg examples: - dataset-pg type: string - roles: - default: [] - items: - properties: - name: - default: alt-account - type: string - type: object - type: array - domain_name: - default: your_company.com - examples: - - your_company.com - type: string storage: default: postgres: @@ -125,6 +28,31 @@ options: type: string type: object type: object + postgres: + default: + replicas: 1 + examples: + - replicas: 1 + properties: + replicas: + default: 1 + type: integer + type: object + domain: + default: your-company + examples: + - your-company + type: string + app_group: + default: api + examples: + - api + type: string + ingress_class: + default: traefik + examples: + - traefik + type: string extentions: default: directus: @@ -306,6 +234,79 @@ options: type: object type: object type: object + databases: + default: [] + items: + properties: + name: + default: db + type: string + type: object + type: array + backups: + default: + enable: false + endpoint: '' + key-id-key: s3-id + retention: + db: 30d + schedule: + db: 0 3 * * * + secret-key: s3-secret + secret-name: backup-settings + examples: + - enable: false + endpoint: '' + key-id-key: s3-id + retention: + db: 30d + schedule: + db: 0 3 * * * + secret-key: s3-secret + secret-name: backup-settings + properties: + enable: + default: false + type: boolean + endpoint: + default: '' + type: string + key-id-key: + default: s3-id + type: string + retention: + default: + db: 30d + properties: + db: + default: 30d + type: string + type: object + schedule: + default: + db: 0 3 * * * + properties: + db: + default: 0 3 * * * + type: string + type: object + secret-key: + default: s3-secret + type: string + secret-name: + default: backup-settings + type: string + type: object + domain_name: + default: your_company.com + examples: + - your_company.com + type: string + issuer: + default: letsencrypt-prod + examples: + - letsencrypt-prod + type: string images: default: postgresql: @@ -335,16 +336,15 @@ options: type: number type: object type: object - ingress_class: - default: traefik - examples: - - traefik - type: string - domain: - default: your-company - examples: - - your-company - type: string + roles: + default: [] + items: + properties: + name: + default: alt-account + type: string + type: object + type: array dependencies: - dist: null category: dbo