Update to dhall lang v17
This change updates the dhall code to the latest version. * Support for record pun where `{ x = x }` can now be written as `{ x }` * Indentation and function definitions are more compact This change has been generated after installing dhall v1.33 using this command: find . -name "*.dhall" -exec dhall --ascii format --inplace {} \; Change-Id: I3b6560f26e28622aa51150dc8083d127d89a8a7b
This commit is contained in:
parent
0fbffe66f2
commit
06b4062e4b
@ -1,10 +1,10 @@
|
|||||||
FROM quay.io/operator-framework/ansible-operator:v0.13.0
|
FROM quay.io/operator-framework/ansible-operator:v0.13.0
|
||||||
|
|
||||||
# dhall versions and digests
|
# dhall versions and digests
|
||||||
ARG DHALL_VERSION=1.30.0
|
ARG DHALL_VERSION=1.33.1
|
||||||
ARG DHALL_JSON_VERSION=1.6.2
|
ARG DHALL_JSON_VERSION=1.7.0
|
||||||
ARG DHALL_JSON_DIGEST=ea37627c4e19789af33def099d4cb145b874c03b4d5b98cb33ce06be1debf4f3
|
ARG DHALL_JSON_DIGEST=cc9fc70e492d35a3986183b589a435653e782f67cda51d33a935dff1ddd15aec
|
||||||
ARG DHALL_LANG_REF=v14.0.0
|
ARG DHALL_LANG_REF=v17.0.0
|
||||||
ARG DHALL_KUBE_REF=v4.0.0
|
ARG DHALL_KUBE_REF=v4.0.0
|
||||||
|
|
||||||
# kubectl versions and digests
|
# kubectl versions and digests
|
||||||
|
@ -32,11 +32,11 @@ let CertificateSpec =
|
|||||||
, issuerRef : { name : Text, kind : Text, group : Text }
|
, issuerRef : { name : Text, kind : Text, group : Text }
|
||||||
}
|
}
|
||||||
, default =
|
, default =
|
||||||
{ isCA = None Bool
|
{ isCA = None Bool
|
||||||
, usages = None (List Text)
|
, usages = None (List Text)
|
||||||
, commonName = None Text
|
, commonName = None Text
|
||||||
, dnsNames = None (List Text)
|
, dnsNames = None (List Text)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let Certificate =
|
let Certificate =
|
||||||
@ -47,7 +47,7 @@ let Certificate =
|
|||||||
, spec : CertificateSpec.Type
|
, spec : CertificateSpec.Type
|
||||||
}
|
}
|
||||||
, default =
|
, default =
|
||||||
{ apiVersion = "cert-manager.io/v1alpha3", kind = "Certificate" }
|
{ apiVersion = "cert-manager.io/v1alpha3", kind = "Certificate" }
|
||||||
}
|
}
|
||||||
|
|
||||||
let Union =
|
let Union =
|
||||||
@ -56,9 +56,4 @@ let Union =
|
|||||||
| Certificate : Certificate.Type
|
| Certificate : Certificate.Type
|
||||||
>
|
>
|
||||||
|
|
||||||
in { IssuerSpec = IssuerSpec
|
in { IssuerSpec, Issuer, CertificateSpec, Certificate, Union }
|
||||||
, Issuer = Issuer
|
|
||||||
, CertificateSpec = CertificateSpec
|
|
||||||
, Certificate = Certificate
|
|
||||||
, Union = Union
|
|
||||||
}
|
|
||||||
|
@ -24,5 +24,5 @@
|
|||||||
* https://github.com/dhall-lang/dhall-nethack/blob/master/Prelude.dhall
|
* https://github.com/dhall-lang/dhall-nethack/blob/master/Prelude.dhall
|
||||||
-}
|
-}
|
||||||
env:DHALL_PRELUDE
|
env:DHALL_PRELUDE
|
||||||
? https://prelude.dhall-lang.org/v13.0.0/package.dhall sha256:4aa8581954f7734d09b7b21fddbf5d8df901a44b54b4ef26ea71db92de0b1a12
|
? https://prelude.dhall-lang.org/v17.0.0/package.dhall sha256:10db3c919c25e9046833df897a8ffe2701dc390fa0893d958c3430524be5a43e
|
||||||
? https://prelude.dhall-lang.org/v13.0.0/package.dhall
|
? https://prelude.dhall-lang.org/v17.0.0/package.dhall
|
||||||
|
@ -4,41 +4,41 @@ let F = ../functions.dhall
|
|||||||
|
|
||||||
let db-volumes = [ F.Volume::{ name = "pg-data", dir = "/var/lib/pg/" } ]
|
let db-volumes = [ F.Volume::{ name = "pg-data", dir = "/var/lib/pg/" } ]
|
||||||
|
|
||||||
in \(app-name : Text)
|
in \(app-name : Text) ->
|
||||||
-> \ ( db-internal-password-env
|
\ ( db-internal-password-env
|
||||||
: forall (env-name : Text) -> List Kubernetes.EnvVar.Type
|
: forall (env-name : Text) -> List Kubernetes.EnvVar.Type
|
||||||
)
|
) ->
|
||||||
-> F.KubernetesComponent::{
|
F.KubernetesComponent::{
|
||||||
, Service = Some (F.mkService app-name "db" "pg" 5432)
|
, Service = Some (F.mkService app-name "db" "pg" 5432)
|
||||||
, StatefulSet = Some
|
, StatefulSet = Some
|
||||||
( F.mkStatefulSet
|
( F.mkStatefulSet
|
||||||
app-name
|
app-name
|
||||||
F.Component::{
|
F.Component::{
|
||||||
|
, name = "db"
|
||||||
|
, count = 1
|
||||||
|
, data-dir = db-volumes
|
||||||
|
, claim-size = 1
|
||||||
|
, container = Kubernetes.Container::{
|
||||||
, name = "db"
|
, name = "db"
|
||||||
, count = 1
|
, image = Some "docker.io/library/postgres:12.1"
|
||||||
, data-dir = db-volumes
|
, imagePullPolicy = Some "IfNotPresent"
|
||||||
, claim-size = 1
|
, ports = Some
|
||||||
, container = Kubernetes.Container::{
|
[ Kubernetes.ContainerPort::{
|
||||||
, name = "db"
|
, name = Some "pg"
|
||||||
, image = Some "docker.io/library/postgres:12.1"
|
, containerPort = 5432
|
||||||
, imagePullPolicy = Some "IfNotPresent"
|
}
|
||||||
, ports = Some
|
]
|
||||||
[ Kubernetes.ContainerPort::{
|
, env = Some
|
||||||
, name = Some "pg"
|
( F.mkEnvVarValue
|
||||||
, containerPort = 5432
|
( toMap
|
||||||
}
|
{ POSTGRES_USER = "zuul"
|
||||||
]
|
, PGDATA = "/var/lib/pg/data"
|
||||||
, env = Some
|
}
|
||||||
( F.mkEnvVarValue
|
)
|
||||||
( toMap
|
# db-internal-password-env "POSTGRES_PASSWORD"
|
||||||
{ POSTGRES_USER = "zuul"
|
)
|
||||||
, PGDATA = "/var/lib/pg/data"
|
, volumeMounts = Some (F.mkVolumeMount db-volumes)
|
||||||
}
|
|
||||||
)
|
|
||||||
# db-internal-password-env "POSTGRES_PASSWORD"
|
|
||||||
)
|
|
||||||
, volumeMounts = Some (F.mkVolumeMount db-volumes)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
)
|
}
|
||||||
}
|
)
|
||||||
|
}
|
||||||
|
@ -6,63 +6,63 @@ let InputExecutor = (../input.dhall).Executor.Type
|
|||||||
|
|
||||||
let JobVolume = (../input.dhall).JobVolume.Type
|
let JobVolume = (../input.dhall).JobVolume.Type
|
||||||
|
|
||||||
in \(app-name : Text)
|
in \(app-name : Text) ->
|
||||||
-> \(input-executor : InputExecutor)
|
\(input-executor : InputExecutor) ->
|
||||||
-> \(data-dir : List F.Volume.Type)
|
\(data-dir : List F.Volume.Type) ->
|
||||||
-> \(volumes : List F.Volume.Type)
|
\(volumes : List F.Volume.Type) ->
|
||||||
-> \(env : List Kubernetes.EnvVar.Type)
|
\(env : List Kubernetes.EnvVar.Type) ->
|
||||||
-> \(jobVolumes : Optional (List JobVolume))
|
\(jobVolumes : Optional (List JobVolume)) ->
|
||||||
-> F.KubernetesComponent::{
|
F.KubernetesComponent::{
|
||||||
, Service = Some (F.mkService app-name "executor" "finger" 7900)
|
, Service = Some (F.mkService app-name "executor" "finger" 7900)
|
||||||
, StatefulSet = Some
|
, StatefulSet = Some
|
||||||
( F.mkStatefulSet
|
( F.mkStatefulSet
|
||||||
app-name
|
app-name
|
||||||
F.Component::{
|
F.Component::{
|
||||||
|
, name = "executor"
|
||||||
|
, count = 1
|
||||||
|
, data-dir
|
||||||
|
, volumes
|
||||||
|
, extra-volumes =
|
||||||
|
let job-volumes =
|
||||||
|
F.mkJobVolume
|
||||||
|
Kubernetes.Volume.Type
|
||||||
|
(\(job-volume : JobVolume) -> job-volume.volume)
|
||||||
|
jobVolumes
|
||||||
|
|
||||||
|
in job-volumes
|
||||||
|
, claim-size = 0
|
||||||
|
, container = Kubernetes.Container::{
|
||||||
, name = "executor"
|
, name = "executor"
|
||||||
, count = 1
|
, image = input-executor.image
|
||||||
, data-dir = data-dir
|
, args = Some [ "zuul-executor", "-d" ]
|
||||||
, volumes = volumes
|
, imagePullPolicy = Some "IfNotPresent"
|
||||||
, extra-volumes =
|
, ports = Some
|
||||||
let job-volumes =
|
[ Kubernetes.ContainerPort::{
|
||||||
|
, name = Some "finger"
|
||||||
|
, containerPort = 7900
|
||||||
|
}
|
||||||
|
]
|
||||||
|
, env = Some env
|
||||||
|
, volumeMounts =
|
||||||
|
let job-volumes-mount =
|
||||||
F.mkJobVolume
|
F.mkJobVolume
|
||||||
Kubernetes.Volume.Type
|
F.Volume.Type
|
||||||
(\(job-volume : JobVolume) -> job-volume.volume)
|
( \(job-volume : JobVolume) ->
|
||||||
|
F.Volume::{
|
||||||
|
, name = job-volume.volume.name
|
||||||
|
, dir = job-volume.dir
|
||||||
|
}
|
||||||
|
)
|
||||||
jobVolumes
|
jobVolumes
|
||||||
|
|
||||||
in job-volumes
|
in Some
|
||||||
, claim-size = 0
|
( F.mkVolumeMount
|
||||||
, container = Kubernetes.Container::{
|
(data-dir # volumes # job-volumes-mount)
|
||||||
, name = "executor"
|
)
|
||||||
, image = input-executor.image
|
, securityContext = Some Kubernetes.SecurityContext::{
|
||||||
, args = Some [ "zuul-executor", "-d" ]
|
, privileged = Some True
|
||||||
, imagePullPolicy = Some "IfNotPresent"
|
|
||||||
, ports = Some
|
|
||||||
[ Kubernetes.ContainerPort::{
|
|
||||||
, name = Some "finger"
|
|
||||||
, containerPort = 7900
|
|
||||||
}
|
|
||||||
]
|
|
||||||
, env = Some env
|
|
||||||
, volumeMounts =
|
|
||||||
let job-volumes-mount =
|
|
||||||
F.mkJobVolume
|
|
||||||
F.Volume.Type
|
|
||||||
( \(job-volume : JobVolume)
|
|
||||||
-> F.Volume::{
|
|
||||||
, name = job-volume.volume.name
|
|
||||||
, dir = job-volume.dir
|
|
||||||
}
|
|
||||||
)
|
|
||||||
jobVolumes
|
|
||||||
|
|
||||||
in Some
|
|
||||||
( F.mkVolumeMount
|
|
||||||
(data-dir # volumes # job-volumes-mount)
|
|
||||||
)
|
|
||||||
, securityContext = Some Kubernetes.SecurityContext::{
|
|
||||||
, privileged = Some True
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
}
|
||||||
}
|
)
|
||||||
|
}
|
||||||
|
@ -4,28 +4,28 @@ let F = ../functions.dhall
|
|||||||
|
|
||||||
let InputMerger = (../input.dhall).Merger.Type
|
let InputMerger = (../input.dhall).Merger.Type
|
||||||
|
|
||||||
in \(app-name : Text)
|
in \(app-name : Text) ->
|
||||||
-> \(input-merger : InputMerger)
|
\(input-merger : InputMerger) ->
|
||||||
-> \(data-dir : List F.Volume.Type)
|
\(data-dir : List F.Volume.Type) ->
|
||||||
-> \(volumes : List F.Volume.Type)
|
\(volumes : List F.Volume.Type) ->
|
||||||
-> \(env : List Kubernetes.EnvVar.Type)
|
\(env : List Kubernetes.EnvVar.Type) ->
|
||||||
-> F.KubernetesComponent::{
|
F.KubernetesComponent::{
|
||||||
, Deployment = Some
|
, Deployment = Some
|
||||||
( F.mkDeployment
|
( F.mkDeployment
|
||||||
app-name
|
app-name
|
||||||
F.Component::{
|
F.Component::{
|
||||||
|
, name = "merger"
|
||||||
|
, count = 1
|
||||||
|
, data-dir
|
||||||
|
, volumes
|
||||||
|
, container = Kubernetes.Container::{
|
||||||
, name = "merger"
|
, name = "merger"
|
||||||
, count = 1
|
, image = input-merger.image
|
||||||
, data-dir = data-dir
|
, args = Some [ "zuul-merger", "-d" ]
|
||||||
, volumes = volumes
|
, imagePullPolicy = Some "IfNotPresent"
|
||||||
, container = Kubernetes.Container::{
|
, env = Some env
|
||||||
, name = "merger"
|
, volumeMounts = Some (F.mkVolumeMount (data-dir # volumes))
|
||||||
, image = input-merger.image
|
|
||||||
, args = Some [ "zuul-merger", "-d" ]
|
|
||||||
, imagePullPolicy = Some "IfNotPresent"
|
|
||||||
, env = Some env
|
|
||||||
, volumeMounts = Some (F.mkVolumeMount (data-dir # volumes))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
)
|
}
|
||||||
}
|
)
|
||||||
|
}
|
||||||
|
@ -4,36 +4,36 @@ let F = ../functions.dhall
|
|||||||
|
|
||||||
let InputPreview = (../input.dhall).Preview.Type
|
let InputPreview = (../input.dhall).Preview.Type
|
||||||
|
|
||||||
in \(app-name : Text)
|
in \(app-name : Text) ->
|
||||||
-> \(input-preview : InputPreview)
|
\(input-preview : InputPreview) ->
|
||||||
-> \(data-dir : List F.Volume.Type)
|
\(data-dir : List F.Volume.Type) ->
|
||||||
-> F.KubernetesComponent::{
|
F.KubernetesComponent::{
|
||||||
, Service = Some (F.mkService app-name "preview" "preview" 80)
|
, Service = Some (F.mkService app-name "preview" "preview" 80)
|
||||||
, Deployment = Some
|
, Deployment = Some
|
||||||
( F.mkDeployment
|
( F.mkDeployment
|
||||||
app-name
|
app-name
|
||||||
F.Component::{
|
F.Component::{
|
||||||
|
, name = "preview"
|
||||||
|
, count = F.defaultNat input-preview.count 0
|
||||||
|
, data-dir
|
||||||
|
, container = Kubernetes.Container::{
|
||||||
, name = "preview"
|
, name = "preview"
|
||||||
, count = F.defaultNat input-preview.count 0
|
, image = input-preview.image
|
||||||
, data-dir = data-dir
|
, imagePullPolicy = Some "IfNotPresent"
|
||||||
, container = Kubernetes.Container::{
|
, ports = Some
|
||||||
, name = "preview"
|
[ Kubernetes.ContainerPort::{
|
||||||
, image = input-preview.image
|
, name = Some "preview"
|
||||||
, imagePullPolicy = Some "IfNotPresent"
|
, containerPort = 80
|
||||||
, ports = Some
|
}
|
||||||
[ Kubernetes.ContainerPort::{
|
]
|
||||||
, name = Some "preview"
|
, env = Some
|
||||||
, containerPort = 80
|
[ Kubernetes.EnvVar::{
|
||||||
}
|
, name = "ZUUL_API_URL"
|
||||||
]
|
, value = Some "http://web:9000"
|
||||||
, env = Some
|
}
|
||||||
[ Kubernetes.EnvVar::{
|
]
|
||||||
, name = "ZUUL_API_URL"
|
, volumeMounts = Some (F.mkVolumeMount data-dir)
|
||||||
, value = Some "http://web:9000"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
, volumeMounts = Some (F.mkVolumeMount data-dir)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
)
|
}
|
||||||
}
|
)
|
||||||
|
}
|
||||||
|
@ -7,65 +7,61 @@ let F = ../functions.dhall
|
|||||||
let InputRegistry = (../input.dhall).Registry.Type
|
let InputRegistry = (../input.dhall).Registry.Type
|
||||||
|
|
||||||
let registry-volumes =
|
let registry-volumes =
|
||||||
\(app-name : Text)
|
\(app-name : Text) ->
|
||||||
-> [ F.Volume::{
|
[ F.Volume::{
|
||||||
, name = app-name ++ "-registry-tls"
|
, name = app-name ++ "-registry-tls"
|
||||||
, dir = "/etc/zuul-registry"
|
, dir = "/etc/zuul-registry"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
let registry-env =
|
let registry-env =
|
||||||
\(app-name : Text)
|
\(app-name : Text) ->
|
||||||
-> F.mkEnvVarSecret
|
F.mkEnvVarSecret
|
||||||
( Prelude.List.map
|
( Prelude.List.map
|
||||||
Text
|
Text
|
||||||
F.EnvSecret
|
F.EnvSecret
|
||||||
( \(key : Text)
|
( \(key : Text) ->
|
||||||
-> { name = "ZUUL_REGISTRY_${key}"
|
{ name = "ZUUL_REGISTRY_${key}"
|
||||||
, key = key
|
, key
|
||||||
, secret = "${app-name}-registry-user-rw"
|
, secret = "${app-name}-registry-user-rw"
|
||||||
}
|
|
||||||
)
|
|
||||||
[ "secret", "username", "password" ]
|
|
||||||
)
|
|
||||||
|
|
||||||
in \(app-name : Text)
|
|
||||||
-> \(input-registry : InputRegistry)
|
|
||||||
-> \(data-dir : List F.Volume.Type)
|
|
||||||
-> \(volumes : List F.Volume.Type)
|
|
||||||
-> F.KubernetesComponent::{
|
|
||||||
, Service = Some (F.mkService app-name "registry" "registry" 9000)
|
|
||||||
, StatefulSet = Some
|
|
||||||
( F.mkStatefulSet
|
|
||||||
app-name
|
|
||||||
F.Component::{
|
|
||||||
, name = "registry"
|
|
||||||
, count = F.defaultNat input-registry.count 0
|
|
||||||
, data-dir = data-dir
|
|
||||||
, volumes = volumes # registry-volumes app-name
|
|
||||||
, claim-size = F.defaultNat input-registry.storage-size 20
|
|
||||||
, container = Kubernetes.Container::{
|
|
||||||
, name = "registry"
|
|
||||||
, image = input-registry.image
|
|
||||||
, args = Some
|
|
||||||
[ "zuul-registry"
|
|
||||||
, "-c"
|
|
||||||
, "/etc/zuul/registry.yaml"
|
|
||||||
, "serve"
|
|
||||||
]
|
|
||||||
, imagePullPolicy = Some "IfNotPresent"
|
|
||||||
, ports = Some
|
|
||||||
[ Kubernetes.ContainerPort::{
|
|
||||||
, name = Some "registry"
|
|
||||||
, containerPort = 9000
|
|
||||||
}
|
|
||||||
]
|
|
||||||
, env = Some (registry-env app-name)
|
|
||||||
, volumeMounts = Some
|
|
||||||
( F.mkVolumeMount
|
|
||||||
(data-dir # volumes # registry-volumes app-name)
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
)
|
||||||
|
[ "secret", "username", "password" ]
|
||||||
|
)
|
||||||
|
|
||||||
|
in \(app-name : Text) ->
|
||||||
|
\(input-registry : InputRegistry) ->
|
||||||
|
\(data-dir : List F.Volume.Type) ->
|
||||||
|
\(volumes : List F.Volume.Type) ->
|
||||||
|
F.KubernetesComponent::{
|
||||||
|
, Service = Some (F.mkService app-name "registry" "registry" 9000)
|
||||||
|
, StatefulSet = Some
|
||||||
|
( F.mkStatefulSet
|
||||||
|
app-name
|
||||||
|
F.Component::{
|
||||||
|
, name = "registry"
|
||||||
|
, count = F.defaultNat input-registry.count 0
|
||||||
|
, data-dir
|
||||||
|
, volumes = volumes # registry-volumes app-name
|
||||||
|
, claim-size = F.defaultNat input-registry.storage-size 20
|
||||||
|
, container = Kubernetes.Container::{
|
||||||
|
, name = "registry"
|
||||||
|
, image = input-registry.image
|
||||||
|
, args = Some
|
||||||
|
[ "zuul-registry", "-c", "/etc/zuul/registry.yaml", "serve" ]
|
||||||
|
, imagePullPolicy = Some "IfNotPresent"
|
||||||
|
, ports = Some
|
||||||
|
[ Kubernetes.ContainerPort::{
|
||||||
|
, name = Some "registry"
|
||||||
|
, containerPort = 9000
|
||||||
|
}
|
||||||
|
]
|
||||||
|
, env = Some (registry-env app-name)
|
||||||
|
, volumeMounts = Some
|
||||||
|
( F.mkVolumeMount
|
||||||
|
(data-dir # volumes # registry-volumes app-name)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
)
|
}
|
||||||
}
|
)
|
||||||
|
}
|
||||||
|
@ -4,36 +4,36 @@ let F = ../functions.dhall
|
|||||||
|
|
||||||
let InputScheduler = (../input.dhall).Scheduler.Type
|
let InputScheduler = (../input.dhall).Scheduler.Type
|
||||||
|
|
||||||
in \(app-name : Text)
|
in \(app-name : Text) ->
|
||||||
-> \(input-scheduler : InputScheduler)
|
\(input-scheduler : InputScheduler) ->
|
||||||
-> \(data-dir : List F.Volume.Type)
|
\(data-dir : List F.Volume.Type) ->
|
||||||
-> \(volumes : List F.Volume.Type)
|
\(volumes : List F.Volume.Type) ->
|
||||||
-> \(env : List Kubernetes.EnvVar.Type)
|
\(env : List Kubernetes.EnvVar.Type) ->
|
||||||
-> F.KubernetesComponent::{
|
F.KubernetesComponent::{
|
||||||
, Service = Some (F.mkService app-name "scheduler" "gearman" 4730)
|
, Service = Some (F.mkService app-name "scheduler" "gearman" 4730)
|
||||||
, StatefulSet = Some
|
, StatefulSet = Some
|
||||||
( F.mkStatefulSet
|
( F.mkStatefulSet
|
||||||
app-name
|
app-name
|
||||||
F.Component::{
|
F.Component::{
|
||||||
|
, name = "scheduler"
|
||||||
|
, count = 1
|
||||||
|
, data-dir
|
||||||
|
, volumes
|
||||||
|
, claim-size = 5
|
||||||
|
, container = Kubernetes.Container::{
|
||||||
, name = "scheduler"
|
, name = "scheduler"
|
||||||
, count = 1
|
, image = input-scheduler.image
|
||||||
, data-dir = data-dir
|
, args = Some [ "zuul-scheduler", "-d" ]
|
||||||
, volumes = volumes
|
, imagePullPolicy = Some "IfNotPresent"
|
||||||
, claim-size = 5
|
, ports = Some
|
||||||
, container = Kubernetes.Container::{
|
[ Kubernetes.ContainerPort::{
|
||||||
, name = "scheduler"
|
, name = Some "gearman"
|
||||||
, image = input-scheduler.image
|
, containerPort = 4730
|
||||||
, args = Some [ "zuul-scheduler", "-d" ]
|
}
|
||||||
, imagePullPolicy = Some "IfNotPresent"
|
]
|
||||||
, ports = Some
|
, env = Some env
|
||||||
[ Kubernetes.ContainerPort::{
|
, volumeMounts = Some (F.mkVolumeMount (data-dir # volumes))
|
||||||
, name = Some "gearman"
|
|
||||||
, containerPort = 4730
|
|
||||||
}
|
|
||||||
]
|
|
||||||
, env = Some env
|
|
||||||
, volumeMounts = Some (F.mkVolumeMount (data-dir # volumes))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
)
|
}
|
||||||
}
|
)
|
||||||
|
}
|
||||||
|
@ -4,35 +4,35 @@ let F = ../functions.dhall
|
|||||||
|
|
||||||
let InputWeb = (../input.dhall).Web.Type
|
let InputWeb = (../input.dhall).Web.Type
|
||||||
|
|
||||||
in \(app-name : Text)
|
in \(app-name : Text) ->
|
||||||
-> \(input-web : InputWeb)
|
\(input-web : InputWeb) ->
|
||||||
-> \(data-dir : List F.Volume.Type)
|
\(data-dir : List F.Volume.Type) ->
|
||||||
-> \(volumes : List F.Volume.Type)
|
\(volumes : List F.Volume.Type) ->
|
||||||
-> \(env : List Kubernetes.EnvVar.Type)
|
\(env : List Kubernetes.EnvVar.Type) ->
|
||||||
-> F.KubernetesComponent::{
|
F.KubernetesComponent::{
|
||||||
, Service = Some (F.mkService app-name "web" "api" 9000)
|
, Service = Some (F.mkService app-name "web" "api" 9000)
|
||||||
, Deployment = Some
|
, Deployment = Some
|
||||||
( F.mkDeployment
|
( F.mkDeployment
|
||||||
app-name
|
app-name
|
||||||
F.Component::{
|
F.Component::{
|
||||||
|
, name = "web"
|
||||||
|
, count = 1
|
||||||
|
, data-dir
|
||||||
|
, volumes
|
||||||
|
, container = Kubernetes.Container::{
|
||||||
, name = "web"
|
, name = "web"
|
||||||
, count = 1
|
, image = input-web.image
|
||||||
, data-dir = data-dir
|
, args = Some [ "zuul-web", "-d" ]
|
||||||
, volumes = volumes
|
, imagePullPolicy = Some "IfNotPresent"
|
||||||
, container = Kubernetes.Container::{
|
, ports = Some
|
||||||
, name = "web"
|
[ Kubernetes.ContainerPort::{
|
||||||
, image = input-web.image
|
, name = Some "api"
|
||||||
, args = Some [ "zuul-web", "-d" ]
|
, containerPort = 9000
|
||||||
, imagePullPolicy = Some "IfNotPresent"
|
}
|
||||||
, ports = Some
|
]
|
||||||
[ Kubernetes.ContainerPort::{
|
, env = Some env
|
||||||
, name = Some "api"
|
, volumeMounts = Some (F.mkVolumeMount (data-dir # volumes))
|
||||||
, containerPort = 9000
|
|
||||||
}
|
|
||||||
]
|
|
||||||
, env = Some env
|
|
||||||
, volumeMounts = Some (F.mkVolumeMount (data-dir # volumes))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
)
|
}
|
||||||
}
|
)
|
||||||
|
}
|
||||||
|
@ -10,41 +10,41 @@ let data-volumes =
|
|||||||
, F.Volume::{ name = "zk-dat", dir = "/var/lib/zookeeper/" }
|
, F.Volume::{ name = "zk-dat", dir = "/var/lib/zookeeper/" }
|
||||||
]
|
]
|
||||||
|
|
||||||
in \(app-name : Text)
|
in \(app-name : Text) ->
|
||||||
-> \(client-conf : List F.Volume.Type)
|
\(client-conf : List F.Volume.Type) ->
|
||||||
-> F.KubernetesComponent::{
|
F.KubernetesComponent::{
|
||||||
, Service = Some (F.mkService app-name "zk" "zk" 2281)
|
, Service = Some (F.mkService app-name "zk" "zk" 2281)
|
||||||
, StatefulSet = Some
|
, StatefulSet = Some
|
||||||
( F.mkStatefulSet
|
( F.mkStatefulSet
|
||||||
app-name
|
app-name
|
||||||
F.Component::{
|
F.Component::{
|
||||||
|
, name = "zk"
|
||||||
|
, count = 1
|
||||||
|
, data-dir = data-volumes
|
||||||
|
, volumes = client-conf
|
||||||
|
, claim-size = 1
|
||||||
|
, container = Kubernetes.Container::{
|
||||||
, name = "zk"
|
, name = "zk"
|
||||||
, count = 1
|
, command = Some
|
||||||
, data-dir = data-volumes
|
[ "sh"
|
||||||
, volumes = client-conf
|
, "-c"
|
||||||
, claim-size = 1
|
, "cp /conf-tls/zoo.cfg /conf/ && "
|
||||||
, container = Kubernetes.Container::{
|
++ "cp /etc/zookeeper-tls/zk.pem /conf/zk.pem && "
|
||||||
, name = "zk"
|
++ "cp /etc/zookeeper-tls/ca.crt /conf/ca.pem && "
|
||||||
, command = Some
|
++ "chown zookeeper /conf/zoo.cfg /conf/zk.pem /conf/ca.pem && "
|
||||||
[ "sh"
|
++ "exec /docker-entrypoint.sh zkServer.sh start-foreground"
|
||||||
, "-c"
|
]
|
||||||
, "cp /conf-tls/zoo.cfg /conf/ && "
|
, image = Some "docker.io/library/zookeeper"
|
||||||
++ "cp /etc/zookeeper-tls/zk.pem /conf/zk.pem && "
|
, imagePullPolicy = Some "IfNotPresent"
|
||||||
++ "cp /etc/zookeeper-tls/ca.crt /conf/ca.pem && "
|
, ports = Some
|
||||||
++ "chown zookeeper /conf/zoo.cfg /conf/zk.pem /conf/ca.pem && "
|
[ Kubernetes.ContainerPort::{
|
||||||
++ "exec /docker-entrypoint.sh zkServer.sh start-foreground"
|
, name = Some "zk"
|
||||||
]
|
, containerPort = 2281
|
||||||
, image = Some "docker.io/library/zookeeper"
|
}
|
||||||
, imagePullPolicy = Some "IfNotPresent"
|
]
|
||||||
, ports = Some
|
, volumeMounts = Some
|
||||||
[ Kubernetes.ContainerPort::{
|
(F.mkVolumeMount (data-volumes # client-conf))
|
||||||
, name = Some "zk"
|
|
||||||
, containerPort = 2281
|
|
||||||
}
|
|
||||||
]
|
|
||||||
, volumeMounts = Some
|
|
||||||
(F.mkVolumeMount (data-volumes # client-conf))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
)
|
}
|
||||||
}
|
)
|
||||||
|
}
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
TODO: replace opaque Text by structured zk host list and tls configuration
|
TODO: replace opaque Text by structured zk host list and tls configuration
|
||||||
-}
|
-}
|
||||||
\(zk-host : Text)
|
\(zk-host : Text) ->
|
||||||
-> ''
|
''
|
||||||
${zk-host}
|
${zk-host}
|
||||||
|
|
||||||
webapp:
|
webapp:
|
||||||
port: 5000
|
port: 5000
|
||||||
''
|
''
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
{- This function converts a public-url Text to a registry.yaml file content
|
{- This function converts a public-url Text to a registry.yaml file content
|
||||||
|
|
||||||
-}
|
-}
|
||||||
\(public-url : Text)
|
\(public-url : Text) ->
|
||||||
-> ''
|
''
|
||||||
registry:
|
registry:
|
||||||
address: '0.0.0.0'
|
address: '0.0.0.0'
|
||||||
port: 9000
|
port: 9000
|
||||||
public-url: ${public-url}
|
public-url: ${public-url}
|
||||||
tls-cert: /etc/zuul-registry/tls.crt
|
tls-cert: /etc/zuul-registry/tls.crt
|
||||||
tls-key: /etc/zuul-registry/tls.key
|
tls-key: /etc/zuul-registry/tls.key
|
||||||
secret: "%(ZUUL_REGISTRY_secret)"
|
secret: "%(ZUUL_REGISTRY_secret)"
|
||||||
storage:
|
storage:
|
||||||
driver: filesystem
|
driver: filesystem
|
||||||
root: /var/lib/zuul
|
root: /var/lib/zuul
|
||||||
users:
|
users:
|
||||||
- name: "%(ZUUL_REGISTRY_username)"
|
- name: "%(ZUUL_REGISTRY_username)"
|
||||||
pass: "%(ZUUL_REGISTRY_password)"
|
pass: "%(ZUUL_REGISTRY_password)"
|
||||||
access: write
|
access: write
|
||||||
''
|
''
|
||||||
|
@ -1,23 +1,23 @@
|
|||||||
{- This function converts a client-dir and server-dir Text to a zoo.cfg file content
|
{- This function converts a client-dir and server-dir Text to a zoo.cfg file content
|
||||||
-}
|
-}
|
||||||
\(client-dir : Text)
|
\(client-dir : Text) ->
|
||||||
-> \(server-dir : Text)
|
\(server-dir : Text) ->
|
||||||
-> ''
|
''
|
||||||
dataDir=/data
|
dataDir=/data
|
||||||
dataLogDir=/datalog
|
dataLogDir=/datalog
|
||||||
tickTime=2000
|
tickTime=2000
|
||||||
initLimit=5
|
initLimit=5
|
||||||
syncLimit=2
|
syncLimit=2
|
||||||
autopurge.snapRetainCount=3
|
autopurge.snapRetainCount=3
|
||||||
autopurge.purgeInterval=0
|
autopurge.purgeInterval=0
|
||||||
maxClientCnxns=60
|
maxClientCnxns=60
|
||||||
standaloneEnabled=true
|
standaloneEnabled=true
|
||||||
admin.enableServer=true
|
admin.enableServer=true
|
||||||
server.1=0.0.0.0:2888:3888
|
server.1=0.0.0.0:2888:3888
|
||||||
|
|
||||||
# TLS configuration
|
# TLS configuration
|
||||||
secureClientPort=2281
|
secureClientPort=2281
|
||||||
serverCnxnFactory=org.apache.zookeeper.server.NettyServerCnxnFactory
|
serverCnxnFactory=org.apache.zookeeper.server.NettyServerCnxnFactory
|
||||||
ssl.keyStore.location=${server-dir}/zk.pem
|
ssl.keyStore.location=${server-dir}/zk.pem
|
||||||
ssl.trustStore.location=${client-dir}/ca.pem
|
ssl.trustStore.location=${client-dir}/ca.pem
|
||||||
''
|
''
|
||||||
|
@ -3,192 +3,190 @@
|
|||||||
TODO: replace input schemas by the required attributes.
|
TODO: replace input schemas by the required attributes.
|
||||||
-}
|
-}
|
||||||
|
|
||||||
\(input : (../input.dhall).Input.Type)
|
\(input : (../input.dhall).Input.Type) ->
|
||||||
-> \(zk-hosts : Text)
|
\(zk-hosts : Text) ->
|
||||||
-> let Prelude = ../../Prelude.dhall
|
let Prelude = ../../Prelude.dhall
|
||||||
|
|
||||||
let Schemas = ../input.dhall
|
let Schemas = ../input.dhall
|
||||||
|
|
||||||
let F = ../functions.dhall
|
let F = ../functions.dhall
|
||||||
|
|
||||||
let {- This is a high level method. It takes:
|
let {- This is a high level method. It takes:
|
||||||
* a Connection type such as `Schemas.Gerrit.Type`,
|
* a Connection type such as `Schemas.Gerrit.Type`,
|
||||||
* an Optional List of that type
|
* an Optional List of that type
|
||||||
* a function that goes from that type to a zuul.conf text blob
|
* a function that goes from that type to a zuul.conf text blob
|
||||||
|
|
||||||
Then it returns a text blob for all the connections
|
Then it returns a text blob for all the connections
|
||||||
-} mkConns =
|
-} mkConns =
|
||||||
\(type : Type)
|
\(type : Type) ->
|
||||||
-> \(list : Optional (List type))
|
\(list : Optional (List type)) ->
|
||||||
-> \(f : type -> Text)
|
\(f : type -> Text) ->
|
||||||
-> F.newlineSep
|
F.newlineSep
|
||||||
( merge
|
( merge
|
||||||
{ None = [] : List Text
|
{ None = [] : List Text, Some = Prelude.List.map type Text f }
|
||||||
, Some = Prelude.List.map type Text f
|
list
|
||||||
}
|
|
||||||
list
|
|
||||||
)
|
|
||||||
|
|
||||||
let merger-email =
|
|
||||||
F.defaultText input.merger.git_user_email "${input.name}@localhost"
|
|
||||||
|
|
||||||
let merger-user = F.defaultText input.merger.git_user_name "Zuul"
|
|
||||||
|
|
||||||
let executor-key-name = F.defaultText input.executor.ssh_key.key "id_rsa"
|
|
||||||
|
|
||||||
let sched-config = F.defaultText input.scheduler.config.key "main.yaml"
|
|
||||||
|
|
||||||
let web-url = F.defaultText input.web.status_url "http://web:9000"
|
|
||||||
|
|
||||||
let extra-kube-path = "/etc/nodepool-kubernetes/"
|
|
||||||
|
|
||||||
let db-uri =
|
|
||||||
merge
|
|
||||||
{ None = "postgresql://zuul:%(ZUUL_DB_PASSWORD)s@db/zuul"
|
|
||||||
, Some = \(some : Schemas.UserSecret.Type) -> "%(ZUUL_DB_URI)s"
|
|
||||||
}
|
|
||||||
input.database
|
|
||||||
|
|
||||||
let gerrits-conf =
|
|
||||||
mkConns
|
|
||||||
Schemas.Gerrit.Type
|
|
||||||
input.connections.gerrits
|
|
||||||
( \(gerrit : Schemas.Gerrit.Type)
|
|
||||||
-> let key = F.defaultText gerrit.sshkey.key "id_rsa"
|
|
||||||
|
|
||||||
let server = F.defaultText gerrit.server gerrit.name
|
|
||||||
|
|
||||||
in ''
|
|
||||||
[connection ${gerrit.name}]
|
|
||||||
driver=gerrit
|
|
||||||
server=${server}
|
|
||||||
sshkey=/etc/zuul-gerrit-${gerrit.name}/${key}
|
|
||||||
user=${gerrit.user}
|
|
||||||
baseurl=${gerrit.baseurl}
|
|
||||||
''
|
|
||||||
)
|
)
|
||||||
|
|
||||||
let githubs-conf =
|
let merger-email =
|
||||||
mkConns
|
F.defaultText input.merger.git_user_email "${input.name}@localhost"
|
||||||
Schemas.GitHub.Type
|
|
||||||
input.connections.githubs
|
|
||||||
( \(github : Schemas.GitHub.Type)
|
|
||||||
-> let key = F.defaultText github.app_key.key "github_rsa"
|
|
||||||
|
|
||||||
in ''
|
let merger-user = F.defaultText input.merger.git_user_name "Zuul"
|
||||||
[connection ${github.name}]
|
|
||||||
driver=github
|
|
||||||
server=github.com
|
|
||||||
app_id={github.app_id}
|
|
||||||
app_key=/etc/zuul-github-${github.name}/${key}
|
|
||||||
''
|
|
||||||
)
|
|
||||||
|
|
||||||
let gits-conf =
|
let executor-key-name = F.defaultText input.executor.ssh_key.key "id_rsa"
|
||||||
mkConns
|
|
||||||
Schemas.Git.Type
|
|
||||||
input.connections.gits
|
|
||||||
( \(git : Schemas.Git.Type)
|
|
||||||
-> ''
|
|
||||||
[connection ${git.name}]
|
|
||||||
driver=git
|
|
||||||
baseurl=${git.baseurl}
|
|
||||||
|
|
||||||
|
let sched-config = F.defaultText input.scheduler.config.key "main.yaml"
|
||||||
|
|
||||||
|
let web-url = F.defaultText input.web.status_url "http://web:9000"
|
||||||
|
|
||||||
|
let extra-kube-path = "/etc/nodepool-kubernetes/"
|
||||||
|
|
||||||
|
let db-uri =
|
||||||
|
merge
|
||||||
|
{ None = "postgresql://zuul:%(ZUUL_DB_PASSWORD)s@db/zuul"
|
||||||
|
, Some = \(some : Schemas.UserSecret.Type) -> "%(ZUUL_DB_URI)s"
|
||||||
|
}
|
||||||
|
input.database
|
||||||
|
|
||||||
|
let gerrits-conf =
|
||||||
|
mkConns
|
||||||
|
Schemas.Gerrit.Type
|
||||||
|
input.connections.gerrits
|
||||||
|
( \(gerrit : Schemas.Gerrit.Type) ->
|
||||||
|
let key = F.defaultText gerrit.sshkey.key "id_rsa"
|
||||||
|
|
||||||
|
let server = F.defaultText gerrit.server gerrit.name
|
||||||
|
|
||||||
|
in ''
|
||||||
|
[connection ${gerrit.name}]
|
||||||
|
driver=gerrit
|
||||||
|
server=${server}
|
||||||
|
sshkey=/etc/zuul-gerrit-${gerrit.name}/${key}
|
||||||
|
user=${gerrit.user}
|
||||||
|
baseurl=${gerrit.baseurl}
|
||||||
''
|
''
|
||||||
)
|
)
|
||||||
|
|
||||||
let mqtts-conf =
|
let githubs-conf =
|
||||||
mkConns
|
mkConns
|
||||||
Schemas.Mqtt.Type
|
Schemas.GitHub.Type
|
||||||
input.connections.mqtts
|
input.connections.githubs
|
||||||
( \(mqtt : Schemas.Mqtt.Type)
|
( \(github : Schemas.GitHub.Type) ->
|
||||||
-> let user =
|
let key = F.defaultText github.app_key.key "github_rsa"
|
||||||
merge
|
|
||||||
{ None = "", Some = \(some : Text) -> "user=${some}" }
|
|
||||||
mqtt.user
|
|
||||||
|
|
||||||
let password =
|
in ''
|
||||||
merge
|
[connection ${github.name}]
|
||||||
{ None = ""
|
driver=github
|
||||||
, Some =
|
server=github.com
|
||||||
\(some : Schemas.UserSecret.Type)
|
app_id={github.app_id}
|
||||||
-> "password=%(ZUUL_MQTT_PASSWORD)"
|
app_key=/etc/zuul-github-${github.name}/${key}
|
||||||
}
|
''
|
||||||
mqtt.password
|
)
|
||||||
|
|
||||||
in ''
|
let gits-conf =
|
||||||
[connection ${mqtt.name}]
|
mkConns
|
||||||
driver=mqtt
|
Schemas.Git.Type
|
||||||
server=${mqtt.server}
|
input.connections.gits
|
||||||
${user}
|
( \(git : Schemas.Git.Type) ->
|
||||||
${password}
|
''
|
||||||
''
|
[connection ${git.name}]
|
||||||
)
|
driver=git
|
||||||
|
baseurl=${git.baseurl}
|
||||||
|
|
||||||
let job-volumes =
|
''
|
||||||
F.mkJobVolume
|
)
|
||||||
Text
|
|
||||||
( \(job-volume : Schemas.JobVolume.Type)
|
|
||||||
-> let {- TODO: add support for abritary lists of path per (context, access)
|
|
||||||
-} context =
|
|
||||||
merge
|
|
||||||
{ trusted = "trusted", untrusted = "untrusted" }
|
|
||||||
job-volume.context
|
|
||||||
|
|
||||||
let access =
|
let mqtts-conf =
|
||||||
merge
|
mkConns
|
||||||
{ None = "ro"
|
Schemas.Mqtt.Type
|
||||||
, Some =
|
input.connections.mqtts
|
||||||
\(access : < ro | rw >)
|
( \(mqtt : Schemas.Mqtt.Type) ->
|
||||||
-> merge { ro = "ro", rw = "rw" } access
|
let user =
|
||||||
}
|
merge
|
||||||
job-volume.access
|
{ None = "", Some = \(some : Text) -> "user=${some}" }
|
||||||
|
mqtt.user
|
||||||
|
|
||||||
in "${context}_${access}_paths=${job-volume.path}"
|
let password =
|
||||||
)
|
merge
|
||||||
input.jobVolumes
|
{ None = ""
|
||||||
|
, Some =
|
||||||
|
\(some : Schemas.UserSecret.Type) ->
|
||||||
|
"password=%(ZUUL_MQTT_PASSWORD)"
|
||||||
|
}
|
||||||
|
mqtt.password
|
||||||
|
|
||||||
in ''
|
in ''
|
||||||
[gearman]
|
[connection ${mqtt.name}]
|
||||||
server=scheduler
|
driver=mqtt
|
||||||
ssl_ca=/etc/zuul-gearman/ca.crt
|
server=${mqtt.server}
|
||||||
ssl_cert=/etc/zuul-gearman/tls.crt
|
${user}
|
||||||
ssl_key=/etc/zuul-gearman/tls.key
|
${password}
|
||||||
|
''
|
||||||
|
)
|
||||||
|
|
||||||
[gearman_server]
|
let job-volumes =
|
||||||
start=true
|
F.mkJobVolume
|
||||||
ssl_ca=/etc/zuul-gearman/ca.crt
|
Text
|
||||||
ssl_cert=/etc/zuul-gearman/tls.crt
|
( \(job-volume : Schemas.JobVolume.Type) ->
|
||||||
ssl_key=/etc/zuul-gearman/tls.key
|
let {- TODO: add support for abritary lists of path per (context, access)
|
||||||
|
-} context =
|
||||||
|
merge
|
||||||
|
{ trusted = "trusted", untrusted = "untrusted" }
|
||||||
|
job-volume.context
|
||||||
|
|
||||||
[zookeeper]
|
let access =
|
||||||
${zk-hosts}
|
merge
|
||||||
|
{ None = "ro"
|
||||||
|
, Some =
|
||||||
|
\(access : < ro | rw >) ->
|
||||||
|
merge { ro = "ro", rw = "rw" } access
|
||||||
|
}
|
||||||
|
job-volume.access
|
||||||
|
|
||||||
[merger]
|
in "${context}_${access}_paths=${job-volume.path}"
|
||||||
git_user_email=${merger-email}
|
)
|
||||||
git_user_name=${merger-user}
|
input.jobVolumes
|
||||||
|
|
||||||
[scheduler]
|
in ''
|
||||||
tenant_config=/etc/zuul-scheduler/${sched-config}
|
[gearman]
|
||||||
|
server=scheduler
|
||||||
|
ssl_ca=/etc/zuul-gearman/ca.crt
|
||||||
|
ssl_cert=/etc/zuul-gearman/tls.crt
|
||||||
|
ssl_key=/etc/zuul-gearman/tls.key
|
||||||
|
|
||||||
[web]
|
[gearman_server]
|
||||||
listen_address=0.0.0.0
|
start=true
|
||||||
root=${web-url}
|
ssl_ca=/etc/zuul-gearman/ca.crt
|
||||||
|
ssl_cert=/etc/zuul-gearman/tls.crt
|
||||||
|
ssl_key=/etc/zuul-gearman/tls.key
|
||||||
|
|
||||||
[executor]
|
[zookeeper]
|
||||||
private_key_file=/etc/zuul-executor/${executor-key-name}
|
${zk-hosts}
|
||||||
manage_ansible=false
|
|
||||||
|
|
||||||
''
|
[merger]
|
||||||
++ Prelude.Text.concatSep "\n" job-volumes
|
git_user_email=${merger-email}
|
||||||
++ ''
|
git_user_name=${merger-user}
|
||||||
|
|
||||||
[connection "sql"]
|
[scheduler]
|
||||||
driver=sql
|
tenant_config=/etc/zuul-scheduler/${sched-config}
|
||||||
dburi=${db-uri}
|
|
||||||
|
|
||||||
''
|
[web]
|
||||||
++ gits-conf
|
listen_address=0.0.0.0
|
||||||
++ gerrits-conf
|
root=${web-url}
|
||||||
++ githubs-conf
|
|
||||||
++ mqtts-conf
|
[executor]
|
||||||
|
private_key_file=/etc/zuul-executor/${executor-key-name}
|
||||||
|
manage_ansible=false
|
||||||
|
|
||||||
|
''
|
||||||
|
++ Prelude.Text.concatSep "\n" job-volumes
|
||||||
|
++ ''
|
||||||
|
|
||||||
|
[connection "sql"]
|
||||||
|
driver=sql
|
||||||
|
dburi=${db-uri}
|
||||||
|
|
||||||
|
''
|
||||||
|
++ gits-conf
|
||||||
|
++ gerrits-conf
|
||||||
|
++ githubs-conf
|
||||||
|
++ mqtts-conf
|
||||||
|
@ -16,86 +16,85 @@ let {- This methods process the optional input.job-volumes list. It takes:
|
|||||||
|
|
||||||
Then it returns a list of the output type
|
Then it returns a list of the output type
|
||||||
-} mkJobVolume =
|
-} mkJobVolume =
|
||||||
\(OutputType : Type)
|
\(OutputType : Type) ->
|
||||||
-> \(f : JobVolume -> OutputType)
|
\(f : JobVolume -> OutputType) ->
|
||||||
-> \(job-volumes : Optional (List JobVolume))
|
\(job-volumes : Optional (List JobVolume)) ->
|
||||||
-> merge
|
merge
|
||||||
{ None = [] : List OutputType
|
{ None = [] : List OutputType
|
||||||
, Some = Prelude.List.map JobVolume OutputType f
|
, Some = Prelude.List.map JobVolume OutputType f
|
||||||
}
|
}
|
||||||
job-volumes
|
job-volumes
|
||||||
|
|
||||||
let defaultNat =
|
let defaultNat =
|
||||||
\(value : Optional Natural)
|
\(value : Optional Natural) ->
|
||||||
-> \(default : Natural)
|
\(default : Natural) ->
|
||||||
-> merge { None = default, Some = \(some : Natural) -> some } value
|
merge { None = default, Some = \(some : Natural) -> some } value
|
||||||
|
|
||||||
let defaultText =
|
let defaultText =
|
||||||
\(value : Optional Text)
|
\(value : Optional Text) ->
|
||||||
-> \(default : Text)
|
\(default : Text) ->
|
||||||
-> merge { None = default, Some = \(some : Text) -> some } value
|
merge { None = default, Some = \(some : Text) -> some } value
|
||||||
|
|
||||||
let defaultKey =
|
let defaultKey =
|
||||||
\(secret : Optional UserSecret)
|
\(secret : Optional UserSecret) ->
|
||||||
-> \(default : Text)
|
\(default : Text) ->
|
||||||
-> merge
|
merge
|
||||||
{ None = default
|
{ None = default
|
||||||
, Some = \(some : UserSecret) -> defaultText some.key default
|
, Some = \(some : UserSecret) -> defaultText some.key default
|
||||||
}
|
}
|
||||||
secret
|
secret
|
||||||
|
|
||||||
let mkAppLabels =
|
let mkAppLabels =
|
||||||
\(app-name : Text)
|
\(app-name : Text) ->
|
||||||
-> [ { mapKey = "app.kubernetes.io/name", mapValue = app-name }
|
[ { mapKey = "app.kubernetes.io/name", mapValue = app-name }
|
||||||
, { mapKey = "app.kubernetes.io/instance", mapValue = app-name }
|
, { mapKey = "app.kubernetes.io/instance", mapValue = app-name }
|
||||||
, { mapKey = "app.kubernetes.io/part-of", mapValue = "zuul" }
|
, { mapKey = "app.kubernetes.io/part-of", mapValue = "zuul" }
|
||||||
]
|
]
|
||||||
|
|
||||||
let mkComponentLabel =
|
let mkComponentLabel =
|
||||||
\(app-name : Text)
|
\(app-name : Text) ->
|
||||||
-> \(component-name : Text)
|
\(component-name : Text) ->
|
||||||
-> mkAppLabels app-name
|
mkAppLabels app-name
|
||||||
# [ { mapKey = "app.kubernetes.io/component"
|
# [ { mapKey = "app.kubernetes.io/component"
|
||||||
, mapValue = component-name
|
, mapValue = component-name
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
let Label = { mapKey : Text, mapValue : Text }
|
let Label = { mapKey : Text, mapValue : Text }
|
||||||
|
|
||||||
let Labels = List Label
|
let Labels = List Label
|
||||||
|
|
||||||
let mkObjectMeta =
|
let mkObjectMeta =
|
||||||
\(name : Text)
|
\(name : Text) ->
|
||||||
-> \(labels : Labels)
|
\(labels : Labels) ->
|
||||||
-> Kubernetes.ObjectMeta::{ name = name, labels = Some labels }
|
Kubernetes.ObjectMeta::{ name, labels = Some labels }
|
||||||
|
|
||||||
let mkSelector =
|
let mkSelector =
|
||||||
\(labels : Labels)
|
\(labels : Labels) ->
|
||||||
-> Kubernetes.LabelSelector::{ matchLabels = Some labels }
|
Kubernetes.LabelSelector::{ matchLabels = Some labels }
|
||||||
|
|
||||||
let mkService =
|
let mkService =
|
||||||
\(app-name : Text)
|
\(app-name : Text) ->
|
||||||
-> \(name : Text)
|
\(name : Text) ->
|
||||||
-> \(port-name : Text)
|
\(port-name : Text) ->
|
||||||
-> \(port : Natural)
|
\(port : Natural) ->
|
||||||
-> let labels = mkComponentLabel app-name name
|
let labels = mkComponentLabel app-name name
|
||||||
|
|
||||||
in Kubernetes.Service::{
|
in Kubernetes.Service::{
|
||||||
, metadata = mkObjectMeta name labels
|
, metadata = mkObjectMeta name labels
|
||||||
, spec = Some Kubernetes.ServiceSpec::{
|
, spec = Some Kubernetes.ServiceSpec::{
|
||||||
, type = Some "ClusterIP"
|
, type = Some "ClusterIP"
|
||||||
, selector = Some labels
|
, selector = Some labels
|
||||||
, ports = Some
|
, ports = Some
|
||||||
[ Kubernetes.ServicePort::{
|
[ Kubernetes.ServicePort::{
|
||||||
, name = Some port-name
|
, name = Some port-name
|
||||||
, protocol = Some "TCP"
|
, protocol = Some "TCP"
|
||||||
, targetPort = Some
|
, targetPort = Some (Kubernetes.IntOrString.String port-name)
|
||||||
(Kubernetes.IntOrString.String port-name)
|
, port
|
||||||
, port = port
|
}
|
||||||
}
|
]
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let EnvSecret = { name : Text, secret : Text, key : Text }
|
let EnvSecret = { name : Text, secret : Text, key : Text }
|
||||||
|
|
||||||
@ -118,11 +117,11 @@ let {- A high level description of a component such as the scheduler or the laun
|
|||||||
, claim-size : Natural
|
, claim-size : Natural
|
||||||
}
|
}
|
||||||
, default =
|
, default =
|
||||||
{ data-dir = [] : List Volume.Type
|
{ data-dir = [] : List Volume.Type
|
||||||
, volumes = [] : List Volume.Type
|
, volumes = [] : List Volume.Type
|
||||||
, extra-volumes = [] : List Kubernetes.Volume.Type
|
, extra-volumes = [] : List Kubernetes.Volume.Type
|
||||||
, claim-size = 0
|
, claim-size = 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let {- The Kubernetes resources of a Component
|
let {- The Kubernetes resources of a Component
|
||||||
@ -133,169 +132,163 @@ let {- The Kubernetes resources of a Component
|
|||||||
, StatefulSet : Optional Kubernetes.StatefulSet.Type
|
, StatefulSet : Optional Kubernetes.StatefulSet.Type
|
||||||
}
|
}
|
||||||
, default =
|
, default =
|
||||||
{ Service = None Kubernetes.Service.Type
|
{ Service = None Kubernetes.Service.Type
|
||||||
, Deployment = None Kubernetes.Deployment.Type
|
, Deployment = None Kubernetes.Deployment.Type
|
||||||
, StatefulSet = None Kubernetes.StatefulSet.Type
|
, StatefulSet = None Kubernetes.StatefulSet.Type
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let mkVolumeEmptyDir =
|
let mkVolumeEmptyDir =
|
||||||
Prelude.List.map
|
Prelude.List.map
|
||||||
Volume.Type
|
Volume.Type
|
||||||
Kubernetes.Volume.Type
|
Kubernetes.Volume.Type
|
||||||
( \(volume : Volume.Type)
|
( \(volume : Volume.Type) ->
|
||||||
-> Kubernetes.Volume::{
|
Kubernetes.Volume::{
|
||||||
, name = volume.name
|
, name = volume.name
|
||||||
, emptyDir = Some Kubernetes.EmptyDirVolumeSource::{=}
|
, emptyDir = Some Kubernetes.EmptyDirVolumeSource::{=}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
let mkVolumeSecret =
|
let mkVolumeSecret =
|
||||||
Prelude.List.map
|
Prelude.List.map
|
||||||
Volume.Type
|
Volume.Type
|
||||||
Kubernetes.Volume.Type
|
Kubernetes.Volume.Type
|
||||||
( \(volume : Volume.Type)
|
( \(volume : Volume.Type) ->
|
||||||
-> Kubernetes.Volume::{
|
Kubernetes.Volume::{
|
||||||
, name = volume.name
|
, name = volume.name
|
||||||
, secret = Some Kubernetes.SecretVolumeSource::{
|
, secret = Some Kubernetes.SecretVolumeSource::{
|
||||||
, secretName = Some volume.name
|
, secretName = Some volume.name
|
||||||
, defaultMode = Some 256
|
, defaultMode = Some 256
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
let mkPodTemplateSpec =
|
let mkPodTemplateSpec =
|
||||||
\(component : Component.Type)
|
\(component : Component.Type) ->
|
||||||
-> \(labels : Labels)
|
\(labels : Labels) ->
|
||||||
-> Kubernetes.PodTemplateSpec::{
|
Kubernetes.PodTemplateSpec::{
|
||||||
, metadata = mkObjectMeta component.name labels
|
, metadata = mkObjectMeta component.name labels
|
||||||
, spec = Some Kubernetes.PodSpec::{
|
, spec = Some Kubernetes.PodSpec::{
|
||||||
, volumes = Some
|
, volumes = Some
|
||||||
( mkVolumeSecret component.volumes
|
( mkVolumeSecret component.volumes
|
||||||
# mkVolumeEmptyDir component.data-dir
|
# mkVolumeEmptyDir component.data-dir
|
||||||
# component.extra-volumes
|
# component.extra-volumes
|
||||||
)
|
)
|
||||||
, containers = [ component.container ]
|
, containers = [ component.container ]
|
||||||
, automountServiceAccountToken = Some False
|
, automountServiceAccountToken = Some False
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let mkStatefulSet =
|
let mkStatefulSet =
|
||||||
\(app-name : Text)
|
\(app-name : Text) ->
|
||||||
-> \(component : Component.Type)
|
\(component : Component.Type) ->
|
||||||
-> let labels = mkComponentLabel app-name component.name
|
let labels = mkComponentLabel app-name component.name
|
||||||
|
|
||||||
let component-name = app-name ++ "-" ++ component.name
|
let component-name = app-name ++ "-" ++ component.name
|
||||||
|
|
||||||
let claim =
|
let claim =
|
||||||
if Natural/isZero component.claim-size
|
if Natural/isZero component.claim-size
|
||||||
|
then [] : List Kubernetes.PersistentVolumeClaim.Type
|
||||||
then [] : List Kubernetes.PersistentVolumeClaim.Type
|
else [ Kubernetes.PersistentVolumeClaim::{
|
||||||
|
, apiVersion = ""
|
||||||
else [ Kubernetes.PersistentVolumeClaim::{
|
, kind = ""
|
||||||
, apiVersion = ""
|
, metadata = Kubernetes.ObjectMeta::{
|
||||||
, kind = ""
|
, name = component-name
|
||||||
, metadata = Kubernetes.ObjectMeta::{
|
}
|
||||||
, name = component-name
|
, spec = Some Kubernetes.PersistentVolumeClaimSpec::{
|
||||||
}
|
, accessModes = Some [ "ReadWriteOnce" ]
|
||||||
, spec = Some Kubernetes.PersistentVolumeClaimSpec::{
|
, resources = Some Kubernetes.ResourceRequirements::{
|
||||||
, accessModes = Some [ "ReadWriteOnce" ]
|
, requests = Some
|
||||||
, resources = Some Kubernetes.ResourceRequirements::{
|
( toMap
|
||||||
, requests = Some
|
{ storage =
|
||||||
( toMap
|
Natural/show component.claim-size ++ "Gi"
|
||||||
{ storage =
|
}
|
||||||
Natural/show component.claim-size
|
)
|
||||||
++ "Gi"
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
}
|
||||||
|
]
|
||||||
|
|
||||||
in Kubernetes.StatefulSet::{
|
in Kubernetes.StatefulSet::{
|
||||||
, metadata = mkObjectMeta component-name labels
|
, metadata = mkObjectMeta component-name labels
|
||||||
, spec = Some Kubernetes.StatefulSetSpec::{
|
, spec = Some Kubernetes.StatefulSetSpec::{
|
||||||
, serviceName = component.name
|
, serviceName = component.name
|
||||||
, replicas = Some component.count
|
, replicas = Some component.count
|
||||||
, selector = mkSelector labels
|
, selector = mkSelector labels
|
||||||
, template = mkPodTemplateSpec component labels
|
, template = mkPodTemplateSpec component labels
|
||||||
, volumeClaimTemplates = Some claim
|
, volumeClaimTemplates = Some claim
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let mkDeployment =
|
let mkDeployment =
|
||||||
\(app-name : Text)
|
\(app-name : Text) ->
|
||||||
-> \(component : Component.Type)
|
\(component : Component.Type) ->
|
||||||
-> let labels = mkComponentLabel app-name component.name
|
let labels = mkComponentLabel app-name component.name
|
||||||
|
|
||||||
let component-name = app-name ++ "-" ++ component.name
|
let component-name = app-name ++ "-" ++ component.name
|
||||||
|
|
||||||
in Kubernetes.Deployment::{
|
in Kubernetes.Deployment::{
|
||||||
, metadata = mkObjectMeta component-name labels
|
, metadata = mkObjectMeta component-name labels
|
||||||
, spec = Some Kubernetes.DeploymentSpec::{
|
, spec = Some Kubernetes.DeploymentSpec::{
|
||||||
, replicas = Some component.count
|
, replicas = Some component.count
|
||||||
, selector = mkSelector labels
|
, selector = mkSelector labels
|
||||||
, template = mkPodTemplateSpec component labels
|
, template = mkPodTemplateSpec component labels
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let mkEnvVarValue =
|
let mkEnvVarValue =
|
||||||
Prelude.List.map
|
Prelude.List.map
|
||||||
Label
|
Label
|
||||||
Kubernetes.EnvVar.Type
|
Kubernetes.EnvVar.Type
|
||||||
( \(env : Label)
|
( \(env : Label) ->
|
||||||
-> Kubernetes.EnvVar::{
|
Kubernetes.EnvVar::{ name = env.mapKey, value = Some env.mapValue }
|
||||||
, name = env.mapKey
|
|
||||||
, value = Some env.mapValue
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
let mkEnvVarSecret =
|
let mkEnvVarSecret =
|
||||||
Prelude.List.map
|
Prelude.List.map
|
||||||
EnvSecret
|
EnvSecret
|
||||||
Kubernetes.EnvVar.Type
|
Kubernetes.EnvVar.Type
|
||||||
( \(env : EnvSecret)
|
( \(env : EnvSecret) ->
|
||||||
-> Kubernetes.EnvVar::{
|
Kubernetes.EnvVar::{
|
||||||
, name = env.name
|
, name = env.name
|
||||||
, valueFrom = Some Kubernetes.EnvVarSource::{
|
, valueFrom = Some Kubernetes.EnvVarSource::{
|
||||||
, secretKeyRef = Some Kubernetes.SecretKeySelector::{
|
, secretKeyRef = Some Kubernetes.SecretKeySelector::{
|
||||||
, key = env.key
|
, key = env.key
|
||||||
, name = Some env.secret
|
, name = Some env.secret
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
let mkVolumeMount =
|
let mkVolumeMount =
|
||||||
Prelude.List.map
|
Prelude.List.map
|
||||||
Volume.Type
|
Volume.Type
|
||||||
Kubernetes.VolumeMount.Type
|
Kubernetes.VolumeMount.Type
|
||||||
( \(volume : Volume.Type)
|
( \(volume : Volume.Type) ->
|
||||||
-> Kubernetes.VolumeMount::{
|
Kubernetes.VolumeMount::{
|
||||||
, name = volume.name
|
, name = volume.name
|
||||||
, mountPath = volume.dir
|
, mountPath = volume.dir
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
in { defaultNat = defaultNat
|
in { defaultNat
|
||||||
, defaultText = defaultText
|
, defaultText
|
||||||
, defaultKey = defaultKey
|
, defaultKey
|
||||||
, newlineSep = Prelude.Text.concatSep "\n"
|
, newlineSep = Prelude.Text.concatSep "\n"
|
||||||
, mkJobVolume = mkJobVolume
|
, mkJobVolume
|
||||||
, mkComponentLabel = mkComponentLabel
|
, mkComponentLabel
|
||||||
, mkObjectMeta = mkObjectMeta
|
, mkObjectMeta
|
||||||
, mkSelector = mkSelector
|
, mkSelector
|
||||||
, mkService = mkService
|
, mkService
|
||||||
, mkDeployment = mkDeployment
|
, mkDeployment
|
||||||
, mkStatefulSet = mkStatefulSet
|
, mkStatefulSet
|
||||||
, mkVolumeMount = mkVolumeMount
|
, mkVolumeMount
|
||||||
, mkEnvVarValue = mkEnvVarValue
|
, mkEnvVarValue
|
||||||
, mkEnvVarSecret = mkEnvVarSecret
|
, mkEnvVarSecret
|
||||||
, EnvSecret = EnvSecret
|
, EnvSecret
|
||||||
, Label = Label
|
, Label
|
||||||
, Labels = Labels
|
, Labels
|
||||||
, Volume = Volume
|
, Volume
|
||||||
, Component = Component
|
, Component
|
||||||
, KubernetesComponent = KubernetesComponent
|
, KubernetesComponent
|
||||||
}
|
}
|
||||||
|
@ -42,95 +42,92 @@ let Git = { name : Text, baseurl : Text }
|
|||||||
|
|
||||||
let Schemas =
|
let Schemas =
|
||||||
{ Merger =
|
{ Merger =
|
||||||
{ Type =
|
{ Type =
|
||||||
{ image : Optional Text
|
{ image : Optional Text
|
||||||
, count : Optional Natural
|
, count : Optional Natural
|
||||||
, git_user_email : Optional Text
|
, git_user_email : Optional Text
|
||||||
, git_user_name : Optional Text
|
, git_user_name : Optional Text
|
||||||
}
|
}
|
||||||
, default =
|
, default =
|
||||||
{ image = None Text
|
{ image = None Text
|
||||||
, count = None Natural
|
, count = None Natural
|
||||||
, git_user_email = None Text
|
, git_user_email = None Text
|
||||||
, git_user_name = None Text
|
, git_user_name = None Text
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
, Executor =
|
, Executor =
|
||||||
{ Type =
|
{ Type =
|
||||||
{ image : Optional Text
|
{ image : Optional Text
|
||||||
, count : Optional Natural
|
, count : Optional Natural
|
||||||
, ssh_key : UserSecret
|
, ssh_key : UserSecret
|
||||||
}
|
}
|
||||||
, default = { image = None Text, count = None Natural }
|
, default = { image = None Text, count = None Natural }
|
||||||
}
|
}
|
||||||
, Web =
|
, Web =
|
||||||
{ Type =
|
{ Type =
|
||||||
{ image : Optional Text
|
{ image : Optional Text
|
||||||
, count : Optional Natural
|
, count : Optional Natural
|
||||||
, status_url : Optional Text
|
, status_url : Optional Text
|
||||||
}
|
}
|
||||||
, default =
|
, default =
|
||||||
{ image = None Text
|
{ image = None Text, count = None Natural, status_url = None Text }
|
||||||
, count = None Natural
|
}
|
||||||
, status_url = None Text
|
|
||||||
}
|
|
||||||
}
|
|
||||||
, Scheduler =
|
, Scheduler =
|
||||||
{ Type =
|
{ Type =
|
||||||
{ image : Optional Text
|
{ image : Optional Text
|
||||||
, count : Optional Natural
|
, count : Optional Natural
|
||||||
, config : UserSecret
|
, config : UserSecret
|
||||||
}
|
}
|
||||||
, default = { image = None Text, count = None Natural }
|
, default = { image = None Text, count = None Natural }
|
||||||
}
|
}
|
||||||
, Registry =
|
, Registry =
|
||||||
{ Type =
|
{ Type =
|
||||||
{ image : Optional Text
|
{ image : Optional Text
|
||||||
, count : Optional Natural
|
, count : Optional Natural
|
||||||
, storage-size : Optional Natural
|
, storage-size : Optional Natural
|
||||||
, public-url : Optional Text
|
, public-url : Optional Text
|
||||||
}
|
}
|
||||||
, default =
|
, default =
|
||||||
{ image = None Text
|
{ image = None Text
|
||||||
, count = None Natural
|
, count = None Natural
|
||||||
, storage-size = None Natural
|
, storage-size = None Natural
|
||||||
, public-url = None Text
|
, public-url = None Text
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
, Preview =
|
, Preview =
|
||||||
{ Type = { image : Optional Text, count : Optional Natural }
|
{ Type = { image : Optional Text, count : Optional Natural }
|
||||||
, default = { image = None Text, count = None Natural }
|
, default = { image = None Text, count = None Natural }
|
||||||
}
|
}
|
||||||
, Launcher =
|
, Launcher =
|
||||||
{ Type = { image : Optional Text, config : UserSecret }
|
{ Type = { image : Optional Text, config : UserSecret }
|
||||||
, default.image = None Text
|
, default.image = None Text
|
||||||
}
|
}
|
||||||
, Connections =
|
, Connections =
|
||||||
{ Type =
|
{ Type =
|
||||||
{ gerrits : Optional (List Gerrit)
|
{ gerrits : Optional (List Gerrit)
|
||||||
, githubs : Optional (List GitHub)
|
, githubs : Optional (List GitHub)
|
||||||
, mqtts : Optional (List Mqtt)
|
, mqtts : Optional (List Mqtt)
|
||||||
, gits : Optional (List Git)
|
, gits : Optional (List Git)
|
||||||
}
|
}
|
||||||
, default =
|
, default =
|
||||||
{ gerrits = None (List Gerrit)
|
{ gerrits = None (List Gerrit)
|
||||||
, githubs = None (List GitHub)
|
, githubs = None (List GitHub)
|
||||||
, mqtts = None (List Mqtt)
|
, mqtts = None (List Mqtt)
|
||||||
, gits = None (List Git)
|
, gits = None (List Git)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
, ExternalConfigs =
|
, ExternalConfigs =
|
||||||
{ Type =
|
{ Type =
|
||||||
{ openstack : Optional UserSecret
|
{ openstack : Optional UserSecret
|
||||||
, kubernetes : Optional UserSecret
|
, kubernetes : Optional UserSecret
|
||||||
, amazon : Optional UserSecret
|
, amazon : Optional UserSecret
|
||||||
}
|
}
|
||||||
, default =
|
, default =
|
||||||
{ openstack = None UserSecret
|
{ openstack = None UserSecret
|
||||||
, kubernetes = None UserSecret
|
, kubernetes = None UserSecret
|
||||||
, amazon = None UserSecret
|
, amazon = None UserSecret
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
, JobVolume = { Type = JobVolume, default.access = Some < ro | rw >.ro }
|
, JobVolume = { Type = JobVolume, default.access = Some < ro | rw >.ro }
|
||||||
, UserSecret = { Type = UserSecret, default.key = None Text }
|
, UserSecret = { Type = UserSecret, default.key = None Text }
|
||||||
, Gerrit.Type = Gerrit
|
, Gerrit.Type = Gerrit
|
||||||
@ -158,21 +155,21 @@ let Input =
|
|||||||
, withCertManager : Bool
|
, withCertManager : Bool
|
||||||
}
|
}
|
||||||
, default =
|
, default =
|
||||||
{ imagePrefix = None Text
|
{ imagePrefix = None Text
|
||||||
, database = None UserSecret
|
, database = None UserSecret
|
||||||
, zookeeper = None UserSecret
|
, zookeeper = None UserSecret
|
||||||
, externalConfig = Schemas.ExternalConfigs.default
|
, externalConfig = Schemas.ExternalConfigs.default
|
||||||
, merger = Schemas.Merger.default
|
, merger = Schemas.Merger.default
|
||||||
, web = Schemas.Web.default
|
, web = Schemas.Web.default
|
||||||
, scheduler = Schemas.Scheduler.default
|
, scheduler = Schemas.Scheduler.default
|
||||||
, registry = Schemas.Registry.default
|
, registry = Schemas.Registry.default
|
||||||
, preview = Schemas.Preview.default
|
, preview = Schemas.Preview.default
|
||||||
, executor = Schemas.Executor.default
|
, executor = Schemas.Executor.default
|
||||||
, launcher = Schemas.Launcher.default
|
, launcher = Schemas.Launcher.default
|
||||||
, connections = Schemas.Connections.default
|
, connections = Schemas.Connections.default
|
||||||
, jobVolumes = None (List JobVolume)
|
, jobVolumes = None (List JobVolume)
|
||||||
, withCertManager = True
|
, withCertManager = True
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
in Schemas // { Input = Input }
|
in Schemas // { Input }
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user