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
|
let podSpec
|
||||||
: Config.Type → kubernetes.PodSpec.Type
|
: Config.Type → kubernetes.PodSpec.Type
|
||||||
= λ(config : Config.Type)
|
= λ(config : Config.Type) →
|
||||||
→ let rootContainer =
|
let rootContainer =
|
||||||
[ kubernetes.Container::{
|
[ kubernetes.Container::{
|
||||||
, name = "web"
|
, name = "web"
|
||||||
, env = Some config.envVars
|
, env = Some config.envVars
|
||||||
, image = Some config.image
|
, image = Some config.image
|
||||||
, imagePullPolicy = Some "Always"
|
, imagePullPolicy = Some "Always"
|
||||||
, ports = Some
|
, ports = Some
|
||||||
[ kubernetes.ContainerPort::{
|
[ kubernetes.ContainerPort::{ containerPort = config.appPort }
|
||||||
, containerPort = config.appPort
|
]
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -32,19 +30,19 @@ let podSpec
|
||||||
in kubernetes.PodSpec::{
|
in kubernetes.PodSpec::{
|
||||||
, containers = combined
|
, containers = combined
|
||||||
, imagePullSecrets = Some
|
, imagePullSecrets = Some
|
||||||
[ kubernetes.LocalObjectReference::{ name = Some "regcred" } ]
|
[ kubernetes.LocalObjectReference::{ name = Some "regcred" } ]
|
||||||
}
|
}
|
||||||
|
|
||||||
let spec =
|
let spec =
|
||||||
λ(config : Config.Type)
|
λ(config : Config.Type) →
|
||||||
→ kubernetes.DeploymentSpec::{
|
kubernetes.DeploymentSpec::{
|
||||||
, selector = kubernetes.LabelSelector::{
|
, selector = kubernetes.LabelSelector::{
|
||||||
, matchLabels = Some (selector config.name)
|
, matchLabels = Some (selector config.name)
|
||||||
}
|
}
|
||||||
, replicas = Some config.replicas
|
, replicas = Some config.replicas
|
||||||
, template = kubernetes.PodTemplateSpec::{
|
, template = kubernetes.PodTemplateSpec::{
|
||||||
, metadata = kubernetes.ObjectMeta::{
|
, metadata = kubernetes.ObjectMeta::{
|
||||||
, name = config.name
|
, name = Some config.name
|
||||||
, labels = Some (selector config.name)
|
, labels = Some (selector config.name)
|
||||||
}
|
}
|
||||||
, spec = Some (podSpec config)
|
, spec = Some (podSpec config)
|
||||||
|
@ -52,10 +50,10 @@ let spec =
|
||||||
}
|
}
|
||||||
|
|
||||||
let deployment =
|
let deployment =
|
||||||
λ(config : Config.Type)
|
λ(config : Config.Type) →
|
||||||
→ kubernetes.Deployment::{
|
kubernetes.Deployment::{
|
||||||
, metadata = kubernetes.ObjectMeta::{
|
, metadata = kubernetes.ObjectMeta::{
|
||||||
, name = config.name
|
, name = Some config.name
|
||||||
, namespace = Some "apps"
|
, namespace = Some "apps"
|
||||||
}
|
}
|
||||||
, spec = Some (spec config)
|
, spec = Some (spec config)
|
||||||
|
|
|
@ -8,8 +8,8 @@ let Config = ../app/config.dhall
|
||||||
|
|
||||||
let annotations
|
let annotations
|
||||||
: Config.Type → List { mapKey : Text, mapValue : Text }
|
: Config.Type → List { mapKey : Text, mapValue : Text }
|
||||||
= λ(config : Config.Type)
|
= λ(config : Config.Type) →
|
||||||
→ [ kv "kubernetes.io/ingress.class" "nginx"
|
[ kv "kubernetes.io/ingress.class" "nginx"
|
||||||
, kv
|
, kv
|
||||||
"certmanager.k8s.io/cluster-issuer"
|
"certmanager.k8s.io/cluster-issuer"
|
||||||
"letsencrypt-${config.leIssuer}"
|
"letsencrypt-${config.leIssuer}"
|
||||||
|
@ -17,9 +17,9 @@ let annotations
|
||||||
|
|
||||||
let metadata
|
let metadata
|
||||||
: Config.Type → kubernetes.ObjectMeta.Type
|
: Config.Type → kubernetes.ObjectMeta.Type
|
||||||
= λ(config : Config.Type)
|
= λ(config : Config.Type) →
|
||||||
→ kubernetes.ObjectMeta::{
|
kubernetes.ObjectMeta::{
|
||||||
, name = config.name
|
, name = Some config.name
|
||||||
, labels = Some [ kv "app" config.name ]
|
, labels = Some [ kv "app" config.name ]
|
||||||
, annotations = Some (annotations config)
|
, annotations = Some (annotations config)
|
||||||
, namespace = Some "apps"
|
, namespace = Some "apps"
|
||||||
|
@ -27,16 +27,16 @@ let metadata
|
||||||
|
|
||||||
let tls
|
let tls
|
||||||
: Config.Type → kubernetes.IngressTLS.Type
|
: Config.Type → kubernetes.IngressTLS.Type
|
||||||
= λ(config : Config.Type)
|
= λ(config : Config.Type) →
|
||||||
→ kubernetes.IngressTLS::{
|
kubernetes.IngressTLS::{
|
||||||
, hosts = Some [ config.domain ]
|
, hosts = Some [ config.domain ]
|
||||||
, secretName = Some "${config.leIssuer}-certs-${config.name}"
|
, secretName = Some "${config.leIssuer}-certs-${config.name}"
|
||||||
}
|
}
|
||||||
|
|
||||||
let rule
|
let rule
|
||||||
: Config.Type → kubernetes.IngressRule.Type
|
: Config.Type → kubernetes.IngressRule.Type
|
||||||
= λ(config : Config.Type)
|
= λ(config : Config.Type) →
|
||||||
→ kubernetes.IngressRule::{
|
kubernetes.IngressRule::{
|
||||||
, host = Some config.domain
|
, host = Some config.domain
|
||||||
, http = Some kubernetes.HTTPIngressRuleValue::{
|
, http = Some kubernetes.HTTPIngressRuleValue::{
|
||||||
, paths =
|
, paths =
|
||||||
|
@ -52,8 +52,8 @@ let rule
|
||||||
|
|
||||||
let ingress
|
let ingress
|
||||||
: Config.Type → kubernetes.Ingress.Type
|
: Config.Type → kubernetes.Ingress.Type
|
||||||
= λ(config : Config.Type)
|
= λ(config : Config.Type) →
|
||||||
→ kubernetes.Ingress::{
|
kubernetes.Ingress::{
|
||||||
, metadata = metadata config
|
, metadata = metadata config
|
||||||
, spec = Some kubernetes.IngressSpec::{
|
, spec = Some kubernetes.IngressSpec::{
|
||||||
, tls = Some [ tls config ]
|
, tls = Some [ tls config ]
|
||||||
|
|
|
@ -8,8 +8,8 @@ let kv = Prelude.JSON.keyText
|
||||||
|
|
||||||
let annotations
|
let annotations
|
||||||
: Config.Type → List { mapKey : Text, mapValue : Text }
|
: Config.Type → List { mapKey : Text, mapValue : Text }
|
||||||
= λ(config : Config.Type)
|
= λ(config : Config.Type) →
|
||||||
→ [ kv "external-dns.alpha.kubernetes.io/hostname" config.domain
|
[ kv "external-dns.alpha.kubernetes.io/hostname" config.domain
|
||||||
, kv "external-dns.alpha.kubernetes.io/ttl" "120"
|
, kv "external-dns.alpha.kubernetes.io/ttl" "120"
|
||||||
, kv "external-dns.alpha.kubernetes.io/cloudflare-proxied" "false"
|
, kv "external-dns.alpha.kubernetes.io/cloudflare-proxied" "false"
|
||||||
]
|
]
|
||||||
|
@ -18,25 +18,25 @@ let selector = ./selector.dhall
|
||||||
|
|
||||||
let spec
|
let spec
|
||||||
: Config.Type → kubernetes.ServiceSpec.Type
|
: Config.Type → kubernetes.ServiceSpec.Type
|
||||||
= λ(config : Config.Type)
|
= λ(config : Config.Type) →
|
||||||
→ kubernetes.ServiceSpec::{
|
kubernetes.ServiceSpec::{
|
||||||
, selector = Some (selector config.name)
|
, selector = Some (selector config.name)
|
||||||
, type = Some "ClusterIP"
|
, type = Some "ClusterIP"
|
||||||
, ports = Some
|
, ports = Some
|
||||||
[ kubernetes.ServicePort::{
|
[ kubernetes.ServicePort::{
|
||||||
, targetPort = Some (kubernetes.IntOrString.Int config.appPort)
|
, targetPort = Some (kubernetes.IntOrString.Int config.appPort)
|
||||||
, port = config.appPort
|
, port = config.appPort
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
let service
|
let service
|
||||||
: Config.Type → kubernetes.Service.Type
|
: Config.Type → kubernetes.Service.Type
|
||||||
= λ(config : Config.Type)
|
= λ(config : Config.Type) →
|
||||||
→ kubernetes.Service::{
|
kubernetes.Service::{
|
||||||
, metadata = kubernetes.ObjectMeta::{
|
, metadata = kubernetes.ObjectMeta::{
|
||||||
, namespace = Some "apps"
|
, namespace = Some "apps"
|
||||||
, name = config.name
|
, name = Some config.name
|
||||||
, labels = Some [ kv "app" config.name ]
|
, labels = Some [ kv "app" config.name ]
|
||||||
, annotations = Some (annotations config)
|
, 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