k8s: fix
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
a129816e8a
commit
99d59fd1e6
|
@ -14,12 +14,14 @@ let podSpec
|
||||||
→ let rootContainer =
|
→ let rootContainer =
|
||||||
[ kubernetes.Container::{
|
[ kubernetes.Container::{
|
||||||
, name = "web"
|
, name = "web"
|
||||||
, env = config.envVars
|
, env = Some config.envVars
|
||||||
, image = Some config.image
|
, image = Some config.image
|
||||||
, imagePullPolicy = Some "Always"
|
, imagePullPolicy = Some "Always"
|
||||||
, ports =
|
, ports = Some
|
||||||
[ kubernetes.ContainerPort::{ containerPort = config.appPort }
|
[ kubernetes.ContainerPort::{
|
||||||
]
|
, containerPort = config.appPort
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -29,21 +31,21 @@ let podSpec
|
||||||
|
|
||||||
in kubernetes.PodSpec::{
|
in kubernetes.PodSpec::{
|
||||||
, containers = combined
|
, containers = combined
|
||||||
, imagePullSecrets =
|
, 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 = 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 = config.name
|
||||||
, labels = selector config.name
|
, labels = Some (selector config.name)
|
||||||
}
|
}
|
||||||
, spec = Some (podSpec config)
|
, spec = Some (podSpec config)
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,8 +20,8 @@ let metadata
|
||||||
= λ(config : Config.Type)
|
= λ(config : Config.Type)
|
||||||
→ kubernetes.ObjectMeta::{
|
→ kubernetes.ObjectMeta::{
|
||||||
, name = config.name
|
, name = config.name
|
||||||
, labels = [ kv "app" config.name ]
|
, labels = Some [ kv "app" config.name ]
|
||||||
, annotations = annotations config
|
, annotations = Some (annotations config)
|
||||||
, namespace = Some "apps"
|
, namespace = Some "apps"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ let tls
|
||||||
: Config.Type → kubernetes.IngressTLS.Type
|
: Config.Type → kubernetes.IngressTLS.Type
|
||||||
= λ(config : Config.Type)
|
= λ(config : Config.Type)
|
||||||
→ kubernetes.IngressTLS::{
|
→ kubernetes.IngressTLS::{
|
||||||
, hosts = [ config.domain ]
|
, hosts = Some [ config.domain ]
|
||||||
, secretName = Some "${config.leIssuer}-certs-${config.name}"
|
, secretName = Some "${config.leIssuer}-certs-${config.name}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,8 +56,8 @@ let ingress
|
||||||
→ kubernetes.Ingress::{
|
→ kubernetes.Ingress::{
|
||||||
, metadata = metadata config
|
, metadata = metadata config
|
||||||
, spec = Some kubernetes.IngressSpec::{
|
, spec = Some kubernetes.IngressSpec::{
|
||||||
, tls = [ tls config ]
|
, tls = Some [ tls config ]
|
||||||
, rules = [ rule config ]
|
, rules = Some [ rule config ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,14 +20,14 @@ let spec
|
||||||
: Config.Type → kubernetes.ServiceSpec.Type
|
: Config.Type → kubernetes.ServiceSpec.Type
|
||||||
= λ(config : Config.Type)
|
= λ(config : Config.Type)
|
||||||
→ kubernetes.ServiceSpec::{
|
→ kubernetes.ServiceSpec::{
|
||||||
, selector = selector config.name
|
, selector = Some (selector config.name)
|
||||||
, type = Some "ClusterIP"
|
, type = Some "ClusterIP"
|
||||||
, ports =
|
, 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
|
||||||
|
@ -37,8 +37,8 @@ let service
|
||||||
, metadata = kubernetes.ObjectMeta::{
|
, metadata = kubernetes.ObjectMeta::{
|
||||||
, namespace = Some "apps"
|
, namespace = Some "apps"
|
||||||
, name = config.name
|
, name = config.name
|
||||||
, labels = [ kv "app" config.name ]
|
, labels = Some [ kv "app" config.name ]
|
||||||
, annotations = annotations config
|
, annotations = Some (annotations config)
|
||||||
}
|
}
|
||||||
, spec = Some (spec config)
|
, spec = Some (spec config)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue