parent
a129816e8a
commit
99d59fd1e6
|
@ -14,12 +14,14 @@ let podSpec
|
|||
→ let rootContainer =
|
||||
[ kubernetes.Container::{
|
||||
, name = "web"
|
||||
, env = config.envVars
|
||||
, env = Some config.envVars
|
||||
, image = Some config.image
|
||||
, imagePullPolicy = Some "Always"
|
||||
, ports =
|
||||
[ kubernetes.ContainerPort::{ containerPort = config.appPort }
|
||||
]
|
||||
, ports = Some
|
||||
[ kubernetes.ContainerPort::{
|
||||
, containerPort = config.appPort
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
|
@ -29,21 +31,21 @@ let podSpec
|
|||
|
||||
in kubernetes.PodSpec::{
|
||||
, containers = combined
|
||||
, imagePullSecrets =
|
||||
[ kubernetes.LocalObjectReference::{ name = Some "regcred" } ]
|
||||
, imagePullSecrets = Some
|
||||
[ kubernetes.LocalObjectReference::{ name = Some "regcred" } ]
|
||||
}
|
||||
|
||||
let spec =
|
||||
λ(config : Config.Type)
|
||||
→ kubernetes.DeploymentSpec::{
|
||||
, selector = kubernetes.LabelSelector::{
|
||||
, matchLabels = selector config.name
|
||||
, matchLabels = Some (selector config.name)
|
||||
}
|
||||
, replicas = Some config.replicas
|
||||
, template = kubernetes.PodTemplateSpec::{
|
||||
, metadata = kubernetes.ObjectMeta::{
|
||||
, name = config.name
|
||||
, labels = selector config.name
|
||||
, labels = Some (selector config.name)
|
||||
}
|
||||
, spec = Some (podSpec config)
|
||||
}
|
||||
|
|
|
@ -20,8 +20,8 @@ let metadata
|
|||
= λ(config : Config.Type)
|
||||
→ kubernetes.ObjectMeta::{
|
||||
, name = config.name
|
||||
, labels = [ kv "app" config.name ]
|
||||
, annotations = annotations config
|
||||
, labels = Some [ kv "app" config.name ]
|
||||
, annotations = Some (annotations config)
|
||||
, namespace = Some "apps"
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@ let tls
|
|||
: Config.Type → kubernetes.IngressTLS.Type
|
||||
= λ(config : Config.Type)
|
||||
→ kubernetes.IngressTLS::{
|
||||
, hosts = [ config.domain ]
|
||||
, hosts = Some [ config.domain ]
|
||||
, secretName = Some "${config.leIssuer}-certs-${config.name}"
|
||||
}
|
||||
|
||||
|
@ -56,8 +56,8 @@ let ingress
|
|||
→ kubernetes.Ingress::{
|
||||
, metadata = metadata config
|
||||
, spec = Some kubernetes.IngressSpec::{
|
||||
, tls = [ tls config ]
|
||||
, rules = [ rule config ]
|
||||
, tls = Some [ tls config ]
|
||||
, rules = Some [ rule config ]
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -20,14 +20,14 @@ let spec
|
|||
: Config.Type → kubernetes.ServiceSpec.Type
|
||||
= λ(config : Config.Type)
|
||||
→ kubernetes.ServiceSpec::{
|
||||
, selector = selector config.name
|
||||
, selector = Some (selector config.name)
|
||||
, type = Some "ClusterIP"
|
||||
, ports =
|
||||
[ kubernetes.ServicePort::{
|
||||
, targetPort = Some (kubernetes.IntOrString.Int config.appPort)
|
||||
, port = config.appPort
|
||||
}
|
||||
]
|
||||
, ports = Some
|
||||
[ kubernetes.ServicePort::{
|
||||
, targetPort = Some (kubernetes.IntOrString.Int config.appPort)
|
||||
, port = config.appPort
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
let service
|
||||
|
@ -37,8 +37,8 @@ let service
|
|||
, metadata = kubernetes.ObjectMeta::{
|
||||
, namespace = Some "apps"
|
||||
, name = config.name
|
||||
, labels = [ kv "app" config.name ]
|
||||
, annotations = annotations config
|
||||
, labels = Some [ kv "app" config.name ]
|
||||
, annotations = Some (annotations config)
|
||||
}
|
||||
, spec = Some (spec config)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue