mirror of
https://github.com/dhall-lang/dhall-kubernetes.git
synced 2024-08-15 00:40:41 +03:00
Fixes https://github.com/dhall-lang/dhall-kubernetes/issues/191 … by no longer mistakenly preferring `v1` or `v2beta{1,2}` over all other versions
50 lines
1.7 KiB
Plaintext
50 lines
1.7 KiB
Plaintext
let Prelude =
|
|
../Prelude.dhall
|
|
sha256:10db3c919c25e9046833df897a8ffe2701dc390fa0893d958c3430524be5a43e
|
|
|
|
let kubernetes =
|
|
../package.dhall
|
|
sha256:263ee915ef545f2d771fdcd5cfa4fbb7f62772a861b5c197f998e5b71219112c
|
|
|
|
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.NatOrString.Nat 5)
|
|
, maxUnavailable = Some (kubernetes.NatOrString.Nat 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
|