diff --git a/meta/domain-devspaces/index.yaml b/meta/domain-devspaces/index.yaml index 4a383b6..d9afec2 100644 --- a/meta/domain-devspaces/index.yaml +++ b/meta/domain-devspaces/index.yaml @@ -6,6 +6,154 @@ metadata: name: domain-devspaces description: null options: + distributions: + default: + domain: domain + core: core + examples: + - domain: domain + core: core + type: object + properties: + core: + type: string + default: core + domain: + type: string + default: domain + images: + default: + codeserver: + registry: docker.io + repository: sebt3/code-server + tag: 4.15 + pullPolicy: IfNotPresent + properties: + codeserver: + properties: + pullPolicy: + enum: + - Always + - Never + - IfNotPresent + type: string + default: IfNotPresent + registry: + type: string + default: docker.io + repository: + type: string + default: sebt3/code-server + tag: + type: number + default: 4.15 + type: object + default: + registry: docker.io + repository: sebt3/code-server + tag: 4.15 + pullPolicy: IfNotPresent + examples: + - codeserver: + registry: docker.io + repository: sebt3/code-server + tag: 4.15 + pullPolicy: IfNotPresent + type: object + domain-name: + default: your_company.com + examples: + - your_company.com + type: string + issuer: + default: letsencrypt-prod + examples: + - letsencrypt-prod + type: string + domain: + default: your-company + examples: + - your-company + type: string + app-group: + default: dev + examples: + - dev + type: string + stations-sub-domain: + default: code + examples: + - code + type: string + ingress-class: + default: traefik + examples: + - traefik + type: string + storage-classes: + default: + FilesystemReadWriteMany: '' + FilesystemReadWriteOnce: '' + BlockReadWriteMany: '' + BlockReadWriteOnce: '' + examples: + - FilesystemReadWriteMany: '' + FilesystemReadWriteOnce: '' + BlockReadWriteMany: '' + BlockReadWriteOnce: '' + type: object + properties: + BlockReadWriteMany: + type: string + default: '' + BlockReadWriteOnce: + type: string + default: '' + FilesystemReadWriteMany: + type: string + default: '' + FilesystemReadWriteOnce: + type: string + default: '' + organisations: + default: [] + items: + type: object + properties: + name: + type: string + default: '' + datasets: + default: [] + type: array + items: + type: object + properties: + name: + default: '' + type: string + engine: + default: pg + type: string + examples: + - [] + type: array + stations: + default: [] + items: + type: object + properties: + name: + type: string + default: '' + organisations: + default: [] + type: array + items: + type: string + examples: + - [] + type: array apps: default: dbgate: @@ -47,16 +195,6 @@ options: default: false default: enable: false - domain-name: - default: your_company.com - examples: - - your_company.com - type: string - domain: - default: your-company - examples: - - your-company - type: string external-databases: default: [] items: @@ -130,144 +268,6 @@ options: secret-name: type: string default: backup-settings - distributions: - default: - domain: domain - core: core - examples: - - domain: domain - core: core - type: object - properties: - core: - type: string - default: core - domain: - type: string - default: domain - issuer: - default: letsencrypt-prod - examples: - - letsencrypt-prod - type: string - app-group: - default: dev - examples: - - dev - type: string - stations-sub-domain: - default: code - examples: - - code - type: string - storage-classes: - default: - FilesystemReadWriteMany: '' - FilesystemReadWriteOnce: '' - BlockReadWriteMany: '' - BlockReadWriteOnce: '' - examples: - - FilesystemReadWriteMany: '' - FilesystemReadWriteOnce: '' - BlockReadWriteMany: '' - BlockReadWriteOnce: '' - type: object - properties: - BlockReadWriteMany: - type: string - default: '' - BlockReadWriteOnce: - type: string - default: '' - FilesystemReadWriteMany: - type: string - default: '' - FilesystemReadWriteOnce: - type: string - default: '' - organisations: - default: [] - items: - type: object - properties: - name: - type: string - default: '' - datasets: - default: [] - type: array - items: - type: object - properties: - name: - default: '' - type: string - engine: - default: pg - type: string - examples: - - [] - type: array - images: - default: - codeserver: - registry: docker.io - repository: sebt3/code-server - tag: 4.15 - pullPolicy: IfNotPresent - properties: - codeserver: - properties: - pullPolicy: - enum: - - Always - - Never - - IfNotPresent - type: string - default: IfNotPresent - registry: - type: string - default: docker.io - repository: - type: string - default: sebt3/code-server - tag: - type: number - default: 4.15 - type: object - default: - registry: docker.io - repository: sebt3/code-server - tag: 4.15 - pullPolicy: IfNotPresent - examples: - - codeserver: - registry: docker.io - repository: sebt3/code-server - tag: 4.15 - pullPolicy: IfNotPresent - type: object - stations: - default: [] - items: - type: object - properties: - name: - type: string - default: '' - organisations: - default: [] - type: array - items: - type: string - examples: - - [] - type: array - ingress-class: - default: traefik - examples: - - traefik - type: string dependencies: [] providers: kubernetes: true diff --git a/meta/domain-devspaces/stations.tf b/meta/domain-devspaces/stations.tf index 4d4ef62..1bc4bff 100644 --- a/meta/domain-devspaces/stations.tf +++ b/meta/domain-devspaces/stations.tf @@ -11,9 +11,9 @@ locals { // le tableau de toutes les BDs requises dans toutes les devstations (aka de toutes les orga dont la devstation depend) triƩes par station/orga/ds sorted-datasets = flatten([ for station in local.sorted-stations: flatten([ - for name in distinct(sort(station.organisations)):flatten([ + for name in distinct(sort(station.organisations)):[ for org in local.sorted-organisations: flatten([ - for dsname in reverse(distinct(sort([for d in org.datasets: d.name]))): flatten([ + for dsname in reverse(distinct(sort([for d in org.datasets: d.name]))): [ for ds in org.datasets: merge(ds, { "name" = "${org.name}-${ds.name}" @@ -22,9 +22,9 @@ locals { "usage" = "station" "station" = station }) if ds.name = dsname - ]) + ] ]) if org.name == name - ]) + ] ]) ]) }