Delete 'k8s/main.dhall'
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
0326661b9a
commit
1ac3d397b5
|
@ -1,42 +0,0 @@
|
||||||
let Prelude =
|
|
||||||
https://prelude.dhall-lang.org/package.dhall sha256:4aa8581954f7734d09b7b21fddbf5d8df901a44b54b4ef26ea71db92de0b1a12
|
|
||||||
|
|
||||||
let kubernetes = ./kubernetes.dhall
|
|
||||||
|
|
||||||
let kv = Prelude.JSON.keyText
|
|
||||||
|
|
||||||
let appName = env:APP_NAME as Text ? "nginx"
|
|
||||||
|
|
||||||
let imageName = env:IMAGE_NAME as Text ? "nginx"
|
|
||||||
|
|
||||||
let imageTag = env:IMAGE_TAG as Text ? "latest"
|
|
||||||
|
|
||||||
let deployment =
|
|
||||||
kubernetes.Deployment::{
|
|
||||||
, metadata = kubernetes.ObjectMeta::{ name = appName }
|
|
||||||
, spec = Some kubernetes.DeploymentSpec::{
|
|
||||||
, replicas = Some 2
|
|
||||||
, revisionHistoryLimit = Some 10
|
|
||||||
, selector = kubernetes.LabelSelector::{
|
|
||||||
, matchLabels = [ kv "app" appName ]
|
|
||||||
}
|
|
||||||
, template = kubernetes.PodTemplateSpec::{
|
|
||||||
, metadata = kubernetes.ObjectMeta::{
|
|
||||||
, name = "nginx"
|
|
||||||
, labels = [ kv "app" appName ]
|
|
||||||
}
|
|
||||||
, spec = Some kubernetes.PodSpec::{
|
|
||||||
, containers =
|
|
||||||
[ kubernetes.Container::{
|
|
||||||
, name = "web"
|
|
||||||
, image = Some "${imageName}:${imageTag}"
|
|
||||||
, imagePullPolicy = Some "Always"
|
|
||||||
, ports = [ kubernetes.ContainerPort::{ containerPort = 80 } ]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
in deployment
|
|
Loading…
Reference in New Issue