/dhall-kubernetes-1.15-v3.0.0/examples/service.dhall

Copy path to clipboard

Source

let Prelude =
../Prelude.dhall sha256:771c7131fc87e13eb18f770a27c59f9418879f7e230ba2a50e46f4461f43ec69

let kubernetes =
../package.dhall sha256:4bd5939adb0a5fc83d76e0d69aa3c5a30bc1a5af8f9df515f44b6fc59a0a4815

let kv = Prelude.JSON.keyText

let spec =
{ selector = [ kv "app" "nginx" ]
, type = Some "NodePort"
, ports =
[ kubernetes.ServicePort::{
, targetPort = Some (kubernetes.IntOrString.Int 80)
, port = 80
}
]
}

let service
: kubernetes.Service.Type
= kubernetes.Service::{
, metadata =
kubernetes.ObjectMeta::{
, name = "nginx"
, labels = [ kv "app" "nginx" ]
}
, spec = Some kubernetes.ServiceSpec::spec
}

in service