fix
This commit is contained in:
@@ -24,7 +24,7 @@ locals {
|
||||
],flatten([
|
||||
for org in local.sorted-organisations:[
|
||||
for stage in reverse(distinct(sort([for s in org.stages: s.name]))): "${var.domain}-${org.name}-${stage}"
|
||||
]
|
||||
] if org.stages != null
|
||||
])
|
||||
)
|
||||
}, { for k, v in var.apps.okd : k => v if k!="enable" })
|
||||
@@ -39,7 +39,7 @@ locals {
|
||||
"name" = "${ds.name}-dataset-pg-${db.name}"
|
||||
"key" = "POSGRESQL_PASSWORD"
|
||||
}
|
||||
}] if ds.engine=="pg" && length(ds.databases)>0]),
|
||||
}] if ds.engine=="pg" && ds.databases != null]),
|
||||
flatten([for org in local.sorted-organisations: flatten([for stage in org.stages: flatten([for ds in org.datasets: [for db in ds.databases:{
|
||||
"name" = "${ds.name}-dataset-pg"
|
||||
"namespace" = "${var.domain}-${org.name}-${stage.name}"
|
||||
@@ -49,7 +49,7 @@ locals {
|
||||
"name" = "${ds.name}-dataset-pg-${db.name}"
|
||||
"key" = "POSGRESQL_PASSWORD"
|
||||
}
|
||||
}] if ds.engine=="pg" && length(ds.databases)>0])])]),
|
||||
}] if ds.engine=="pg" && ds.databases != null])]) if org.stages != null ]),
|
||||
var.external-pgs
|
||||
)
|
||||
"maria" = concat(
|
||||
@@ -72,7 +72,7 @@ locals {
|
||||
"name" = "${ds.name}-dataset-maria"
|
||||
"key" = "password"
|
||||
}
|
||||
} if ds.engine=="maria"]])]),
|
||||
} if ds.engine=="maria"]]) if org.stages != null]),
|
||||
var.external-marias
|
||||
)
|
||||
"mongo" = concat(
|
||||
@@ -95,7 +95,7 @@ locals {
|
||||
"name" = "${ds.name}-dataset-mongo"
|
||||
"key" = "password"
|
||||
}
|
||||
} if ds.engine=="mongo"]])]),
|
||||
} if ds.engine=="mongo"]]) if org.stages != null]),
|
||||
var.external-mongos
|
||||
)
|
||||
"redis" = concat(
|
||||
@@ -106,7 +106,7 @@ locals {
|
||||
flatten([for org in local.sorted-organisations: flatten([for stage in org.stages: [for ds in org.datasets: {
|
||||
"name" = "${ds.name}-dataset-redis"
|
||||
"namespace" = "${var.domain}-${org.name}-${stage.name}"
|
||||
} if ds.engine=="redis"]])]),
|
||||
} if ds.engine=="redis"]]) if org.stages != null]),
|
||||
var.external-redis
|
||||
)
|
||||
}, { for k, v in var.apps.dbgate : k => v if k!="enable" })
|
||||
|
||||
@@ -6,16 +6,46 @@ metadata:
|
||||
name: domain-devspaces
|
||||
description: null
|
||||
options:
|
||||
ingress-class:
|
||||
default: traefik
|
||||
storage-classes:
|
||||
default:
|
||||
BlockReadWriteMany: ''
|
||||
BlockReadWriteOnce: ''
|
||||
FilesystemReadWriteMany: ''
|
||||
FilesystemReadWriteOnce: ''
|
||||
examples:
|
||||
- traefik
|
||||
- BlockReadWriteMany: ''
|
||||
BlockReadWriteOnce: ''
|
||||
FilesystemReadWriteMany: ''
|
||||
FilesystemReadWriteOnce: ''
|
||||
properties:
|
||||
BlockReadWriteMany:
|
||||
default: ''
|
||||
type: string
|
||||
BlockReadWriteOnce:
|
||||
default: ''
|
||||
type: string
|
||||
FilesystemReadWriteMany:
|
||||
default: ''
|
||||
type: string
|
||||
FilesystemReadWriteOnce:
|
||||
default: ''
|
||||
type: string
|
||||
type: object
|
||||
app-group:
|
||||
default: dev
|
||||
examples:
|
||||
- dev
|
||||
type: string
|
||||
domain-name:
|
||||
default: your_company.com
|
||||
examples:
|
||||
- your_company.com
|
||||
type: string
|
||||
domain:
|
||||
default: your-company
|
||||
examples:
|
||||
- your-company
|
||||
type: string
|
||||
backups:
|
||||
default:
|
||||
enable: false
|
||||
@@ -46,11 +76,96 @@ options:
|
||||
default: backup-settings
|
||||
type: string
|
||||
type: object
|
||||
issuer:
|
||||
default: letsencrypt-prod
|
||||
examples:
|
||||
- letsencrypt-prod
|
||||
type: string
|
||||
distributions:
|
||||
default:
|
||||
core: core
|
||||
domain: domain
|
||||
examples:
|
||||
- core: core
|
||||
domain: domain
|
||||
properties:
|
||||
core:
|
||||
default: core
|
||||
type: string
|
||||
domain:
|
||||
default: domain
|
||||
type: string
|
||||
type: object
|
||||
images:
|
||||
default:
|
||||
codeserver:
|
||||
pullPolicy: IfNotPresent
|
||||
registry: docker.io
|
||||
repository: sebt3/code-server
|
||||
tag: 4.15
|
||||
examples:
|
||||
- codeserver:
|
||||
pullPolicy: IfNotPresent
|
||||
registry: docker.io
|
||||
repository: sebt3/code-server
|
||||
tag: 4.15
|
||||
properties:
|
||||
codeserver:
|
||||
default:
|
||||
pullPolicy: IfNotPresent
|
||||
registry: docker.io
|
||||
repository: sebt3/code-server
|
||||
tag: 4.15
|
||||
properties:
|
||||
pullPolicy:
|
||||
default: IfNotPresent
|
||||
enum:
|
||||
- Always
|
||||
- Never
|
||||
- IfNotPresent
|
||||
type: string
|
||||
registry:
|
||||
default: docker.io
|
||||
type: string
|
||||
repository:
|
||||
default: sebt3/code-server
|
||||
type: string
|
||||
tag:
|
||||
default: 4.15
|
||||
type: number
|
||||
type: object
|
||||
type: object
|
||||
stations-sub-domain:
|
||||
default: code
|
||||
examples:
|
||||
- code
|
||||
type: string
|
||||
external-marias:
|
||||
default: []
|
||||
examples:
|
||||
- []
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
default: ''
|
||||
type: string
|
||||
namespace:
|
||||
default: ''
|
||||
type: string
|
||||
secret:
|
||||
properties:
|
||||
key:
|
||||
default: ''
|
||||
type: string
|
||||
name:
|
||||
default: ''
|
||||
type: string
|
||||
type: object
|
||||
username:
|
||||
default: ''
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
apps:
|
||||
default:
|
||||
dbgate:
|
||||
@@ -104,119 +219,41 @@ options:
|
||||
type: boolean
|
||||
type: object
|
||||
type: object
|
||||
external-mongos:
|
||||
external-redis:
|
||||
default: []
|
||||
examples:
|
||||
- []
|
||||
items:
|
||||
properties:
|
||||
dbname:
|
||||
default: ''
|
||||
type: string
|
||||
name:
|
||||
default: ''
|
||||
type: string
|
||||
namespace:
|
||||
default: ''
|
||||
type: string
|
||||
secret:
|
||||
properties:
|
||||
key:
|
||||
default: ''
|
||||
type: object
|
||||
type: array
|
||||
ingress-class:
|
||||
default: traefik
|
||||
examples:
|
||||
- traefik
|
||||
type: string
|
||||
stations:
|
||||
default: []
|
||||
examples:
|
||||
- []
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
default: ''
|
||||
type: string
|
||||
type: object
|
||||
username:
|
||||
default: ''
|
||||
organisations:
|
||||
default: []
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
type: array
|
||||
distributions:
|
||||
default:
|
||||
core: core
|
||||
domain: domain
|
||||
examples:
|
||||
- core: core
|
||||
domain: domain
|
||||
properties:
|
||||
core:
|
||||
default: core
|
||||
type: string
|
||||
domain:
|
||||
default: domain
|
||||
type: string
|
||||
type: object
|
||||
domain-name:
|
||||
default: your_company.com
|
||||
examples:
|
||||
- your_company.com
|
||||
type: string
|
||||
storage-classes:
|
||||
default:
|
||||
BlockReadWriteMany: ''
|
||||
BlockReadWriteOnce: ''
|
||||
FilesystemReadWriteMany: ''
|
||||
FilesystemReadWriteOnce: ''
|
||||
examples:
|
||||
- BlockReadWriteMany: ''
|
||||
BlockReadWriteOnce: ''
|
||||
FilesystemReadWriteMany: ''
|
||||
FilesystemReadWriteOnce: ''
|
||||
properties:
|
||||
BlockReadWriteMany:
|
||||
default: ''
|
||||
type: string
|
||||
BlockReadWriteOnce:
|
||||
default: ''
|
||||
type: string
|
||||
FilesystemReadWriteMany:
|
||||
default: ''
|
||||
type: string
|
||||
FilesystemReadWriteOnce:
|
||||
default: ''
|
||||
type: string
|
||||
type: object
|
||||
images:
|
||||
default:
|
||||
codeserver:
|
||||
pullPolicy: IfNotPresent
|
||||
registry: docker.io
|
||||
repository: sebt3/code-server
|
||||
tag: 4.15
|
||||
examples:
|
||||
- codeserver:
|
||||
pullPolicy: IfNotPresent
|
||||
registry: docker.io
|
||||
repository: sebt3/code-server
|
||||
tag: 4.15
|
||||
properties:
|
||||
codeserver:
|
||||
default:
|
||||
pullPolicy: IfNotPresent
|
||||
registry: docker.io
|
||||
repository: sebt3/code-server
|
||||
tag: 4.15
|
||||
properties:
|
||||
pullPolicy:
|
||||
default: IfNotPresent
|
||||
enum:
|
||||
- Always
|
||||
- Never
|
||||
- IfNotPresent
|
||||
type: string
|
||||
registry:
|
||||
default: docker.io
|
||||
type: string
|
||||
repository:
|
||||
default: sebt3/code-server
|
||||
type: string
|
||||
tag:
|
||||
default: 4.15
|
||||
type: number
|
||||
type: object
|
||||
type: object
|
||||
external-pgs:
|
||||
default: []
|
||||
examples:
|
||||
@@ -246,72 +283,6 @@ options:
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
stations:
|
||||
default: []
|
||||
examples:
|
||||
- []
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
default: ''
|
||||
type: string
|
||||
organisations:
|
||||
default: []
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
type: array
|
||||
external-marias:
|
||||
default: []
|
||||
examples:
|
||||
- []
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
default: ''
|
||||
type: string
|
||||
namespace:
|
||||
default: ''
|
||||
type: string
|
||||
secret:
|
||||
properties:
|
||||
key:
|
||||
default: ''
|
||||
type: string
|
||||
name:
|
||||
default: ''
|
||||
type: string
|
||||
type: object
|
||||
username:
|
||||
default: ''
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
domain:
|
||||
default: your-company
|
||||
examples:
|
||||
- your-company
|
||||
type: string
|
||||
external-redis:
|
||||
default: []
|
||||
examples:
|
||||
- []
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
default: ''
|
||||
type: string
|
||||
namespace:
|
||||
default: ''
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
issuer:
|
||||
default: letsencrypt-prod
|
||||
examples:
|
||||
- letsencrypt-prod
|
||||
type: string
|
||||
organisations:
|
||||
default: []
|
||||
examples:
|
||||
@@ -353,6 +324,35 @@ options:
|
||||
type: array
|
||||
type: object
|
||||
type: array
|
||||
external-mongos:
|
||||
default: []
|
||||
examples:
|
||||
- []
|
||||
items:
|
||||
properties:
|
||||
dbname:
|
||||
default: ''
|
||||
type: string
|
||||
name:
|
||||
default: ''
|
||||
type: string
|
||||
namespace:
|
||||
default: ''
|
||||
type: string
|
||||
secret:
|
||||
properties:
|
||||
key:
|
||||
default: ''
|
||||
type: string
|
||||
name:
|
||||
default: ''
|
||||
type: string
|
||||
type: object
|
||||
username:
|
||||
default: ''
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
dependencies: []
|
||||
providers:
|
||||
kubernetes: true
|
||||
|
||||
@@ -22,6 +22,7 @@ resource "kubectl_manifest" "organisations" {
|
||||
component: "organisation"
|
||||
options: ${jsonencode(merge(
|
||||
local.global,
|
||||
{ "stages" = []},
|
||||
{ for k, v in local.sorted-organisations[count.index] : k => v if !contains(["name","organisations"], k) }
|
||||
))}
|
||||
EOF
|
||||
|
||||
Reference in New Issue
Block a user