yes
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
6e00c25505
commit
92931cbb0e
|
@ -10,18 +10,16 @@ let selector = ./selector.dhall
|
|||
|
||||
let podSpec
|
||||
: Config.Type → kubernetes.PodSpec.Type
|
||||
= λ(config : Config.Type)
|
||||
→ let rootContainer =
|
||||
= λ(config : Config.Type) →
|
||||
let rootContainer =
|
||||
[ kubernetes.Container::{
|
||||
, name = "web"
|
||||
, env = Some config.envVars
|
||||
, image = Some config.image
|
||||
, imagePullPolicy = Some "Always"
|
||||
, ports = Some
|
||||
[ kubernetes.ContainerPort::{
|
||||
, containerPort = config.appPort
|
||||
}
|
||||
]
|
||||
[ kubernetes.ContainerPort::{ containerPort = config.appPort }
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
|
@ -32,19 +30,19 @@ let podSpec
|
|||
in kubernetes.PodSpec::{
|
||||
, containers = combined
|
||||
, imagePullSecrets = Some
|
||||
[ kubernetes.LocalObjectReference::{ name = Some "regcred" } ]
|
||||
[ kubernetes.LocalObjectReference::{ name = Some "regcred" } ]
|
||||
}
|
||||
|
||||
let spec =
|
||||
λ(config : Config.Type)
|
||||
→ kubernetes.DeploymentSpec::{
|
||||
λ(config : Config.Type) →
|
||||
kubernetes.DeploymentSpec::{
|
||||
, selector = kubernetes.LabelSelector::{
|
||||
, matchLabels = Some (selector config.name)
|
||||
}
|
||||
, replicas = Some config.replicas
|
||||
, template = kubernetes.PodTemplateSpec::{
|
||||
, metadata = kubernetes.ObjectMeta::{
|
||||
, name = config.name
|
||||
, name = Some config.name
|
||||
, labels = Some (selector config.name)
|
||||
}
|
||||
, spec = Some (podSpec config)
|
||||
|
@ -52,10 +50,10 @@ let spec =
|
|||
}
|
||||
|
||||
let deployment =
|
||||
λ(config : Config.Type)
|
||||
→ kubernetes.Deployment::{
|
||||
λ(config : Config.Type) →
|
||||
kubernetes.Deployment::{
|
||||
, metadata = kubernetes.ObjectMeta::{
|
||||
, name = config.name
|
||||
, name = Some config.name
|
||||
, namespace = Some "apps"
|
||||
}
|
||||
, spec = Some (spec config)
|
||||
|
|
|
@ -8,8 +8,8 @@ let Config = ../app/config.dhall
|
|||
|
||||
let annotations
|
||||
: Config.Type → List { mapKey : Text, mapValue : Text }
|
||||
= λ(config : Config.Type)
|
||||
→ [ kv "kubernetes.io/ingress.class" "nginx"
|
||||
= λ(config : Config.Type) →
|
||||
[ kv "kubernetes.io/ingress.class" "nginx"
|
||||
, kv
|
||||
"certmanager.k8s.io/cluster-issuer"
|
||||
"letsencrypt-${config.leIssuer}"
|
||||
|
@ -17,9 +17,9 @@ let annotations
|
|||
|
||||
let metadata
|
||||
: Config.Type → kubernetes.ObjectMeta.Type
|
||||
= λ(config : Config.Type)
|
||||
→ kubernetes.ObjectMeta::{
|
||||
, name = config.name
|
||||
= λ(config : Config.Type) →
|
||||
kubernetes.ObjectMeta::{
|
||||
, name = Some config.name
|
||||
, labels = Some [ kv "app" config.name ]
|
||||
, annotations = Some (annotations config)
|
||||
, namespace = Some "apps"
|
||||
|
@ -27,16 +27,16 @@ let metadata
|
|||
|
||||
let tls
|
||||
: Config.Type → kubernetes.IngressTLS.Type
|
||||
= λ(config : Config.Type)
|
||||
→ kubernetes.IngressTLS::{
|
||||
= λ(config : Config.Type) →
|
||||
kubernetes.IngressTLS::{
|
||||
, hosts = Some [ config.domain ]
|
||||
, secretName = Some "${config.leIssuer}-certs-${config.name}"
|
||||
}
|
||||
|
||||
let rule
|
||||
: Config.Type → kubernetes.IngressRule.Type
|
||||
= λ(config : Config.Type)
|
||||
→ kubernetes.IngressRule::{
|
||||
= λ(config : Config.Type) →
|
||||
kubernetes.IngressRule::{
|
||||
, host = Some config.domain
|
||||
, http = Some kubernetes.HTTPIngressRuleValue::{
|
||||
, paths =
|
||||
|
@ -52,8 +52,8 @@ let rule
|
|||
|
||||
let ingress
|
||||
: Config.Type → kubernetes.Ingress.Type
|
||||
= λ(config : Config.Type)
|
||||
→ kubernetes.Ingress::{
|
||||
= λ(config : Config.Type) →
|
||||
kubernetes.Ingress::{
|
||||
, metadata = metadata config
|
||||
, spec = Some kubernetes.IngressSpec::{
|
||||
, tls = Some [ tls config ]
|
||||
|
|
|
@ -8,8 +8,8 @@ let kv = Prelude.JSON.keyText
|
|||
|
||||
let annotations
|
||||
: Config.Type → List { mapKey : Text, mapValue : Text }
|
||||
= λ(config : Config.Type)
|
||||
→ [ kv "external-dns.alpha.kubernetes.io/hostname" config.domain
|
||||
= λ(config : Config.Type) →
|
||||
[ kv "external-dns.alpha.kubernetes.io/hostname" config.domain
|
||||
, kv "external-dns.alpha.kubernetes.io/ttl" "120"
|
||||
, kv "external-dns.alpha.kubernetes.io/cloudflare-proxied" "false"
|
||||
]
|
||||
|
@ -18,25 +18,25 @@ let selector = ./selector.dhall
|
|||
|
||||
let spec
|
||||
: Config.Type → kubernetes.ServiceSpec.Type
|
||||
= λ(config : Config.Type)
|
||||
→ kubernetes.ServiceSpec::{
|
||||
= λ(config : Config.Type) →
|
||||
kubernetes.ServiceSpec::{
|
||||
, selector = Some (selector config.name)
|
||||
, type = Some "ClusterIP"
|
||||
, ports = Some
|
||||
[ kubernetes.ServicePort::{
|
||||
, targetPort = Some (kubernetes.IntOrString.Int config.appPort)
|
||||
, port = config.appPort
|
||||
}
|
||||
]
|
||||
[ kubernetes.ServicePort::{
|
||||
, targetPort = Some (kubernetes.IntOrString.Int config.appPort)
|
||||
, port = config.appPort
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
let service
|
||||
: Config.Type → kubernetes.Service.Type
|
||||
= λ(config : Config.Type)
|
||||
→ kubernetes.Service::{
|
||||
= λ(config : Config.Type) →
|
||||
kubernetes.Service::{
|
||||
, metadata = kubernetes.ObjectMeta::{
|
||||
, namespace = Some "apps"
|
||||
, name = config.name
|
||||
, name = Some config.name
|
||||
, labels = Some [ kv "app" config.name ]
|
||||
, annotations = Some (annotations config)
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
https://raw.githubusercontent.com/dhall-lang/dhall-kubernetes/master/package.dhall sha256:7150ac4309a091740321a3a3582e7695ee4b81732ce8f1ed1691c1c52791daa1
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-kubernetes/master/1.15/package.dhall
|
||||
|
|
|
@ -1 +1 @@
|
|||
https://xena.greedo.xeserv.us/pkg/dhall/dhall-kubernetes/1.15/typesUnion.dhall sha256:5d54195a8abaf9bd50ed86176ad6e6278f14f2765ea67116e01f63df8faafc6c
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-kubernetes/master/1.15/typesUnion.dhall
|
||||
|
|
Loading…
Reference in New Issue