mirror of
https://github.com/dhall-lang/dhall-kubernetes.git
synced 2024-11-03 21:05:47 +03:00
6172560fb9
By pulling in the change from https://github.com/dhall-lang/dhall-haskell/pull/2343
48 lines
1.6 KiB
Plaintext
48 lines
1.6 KiB
Plaintext
let Prelude =
|
|
../Prelude.dhall sha256:10db3c919c25e9046833df897a8ffe2701dc390fa0893d958c3430524be5a43e
|
|
|
|
let kubernetes =
|
|
../package.dhall sha256:6bd75ef5494072c018014642c0cf3d7cbc6fbe6ec9ea3be8ef5a4e34430ca109
|
|
|
|
let deployment =
|
|
kubernetes.Deployment::{
|
|
, metadata = kubernetes.ObjectMeta::{ name = Some "nginx" }
|
|
, spec = Some kubernetes.DeploymentSpec::{
|
|
, replicas = Some +2
|
|
, revisionHistoryLimit = Some +10
|
|
, selector = kubernetes.LabelSelector::{
|
|
, matchLabels = Some (toMap { app = "nginx" })
|
|
}
|
|
, strategy = Some kubernetes.DeploymentStrategy::{
|
|
, type = Some "RollingUpdate"
|
|
, rollingUpdate = Some
|
|
{ maxSurge = Some (kubernetes.IntOrString.Int +5)
|
|
, maxUnavailable = Some (kubernetes.IntOrString.Int +0)
|
|
}
|
|
}
|
|
, template = kubernetes.PodTemplateSpec::{
|
|
, metadata = Some kubernetes.ObjectMeta::{
|
|
, name = Some "nginx"
|
|
, labels = Some (toMap { app = "nginx" })
|
|
}
|
|
, spec = Some kubernetes.PodSpec::{
|
|
, containers =
|
|
[ kubernetes.Container::{
|
|
, name = "nginx"
|
|
, image = Some "nginx:1.15.3"
|
|
, imagePullPolicy = Some "Always"
|
|
, ports = Some
|
|
[ kubernetes.ContainerPort::{ containerPort = +80 } ]
|
|
, resources = Some
|
|
{ limits = Some (toMap { cpu = "500m" })
|
|
, requests = Some (toMap { cpu = "10m" })
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
in deployment
|