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