mirror of
https://github.com/dhall-lang/dhall-kubernetes.git
synced 2024-09-10 23:15:30 +03:00
Give the proposed "defaulted"-syntax a try
Proposal: https://github.com/dhall-lang/dhall-lang/issues/382#issuecomment-536212474
This commit is contained in:
parent
dea2c92017
commit
da21f4920f
@ -1,35 +1,30 @@
|
||||
let types =
|
||||
../types.dhall sha256:e48e21b807dad217a6c3e631fcaf3e950062310bfb4a8bbcecc330eb7b2f60ed
|
||||
|
||||
let defaults =
|
||||
../defaults.dhall sha256:4450e23dc81975d111650e06c0238862944bf699537af6cbacac9c7e471dfabe
|
||||
let package = ../package.dhall
|
||||
|
||||
let deployment
|
||||
: types.Deployment
|
||||
= defaults.Deployment
|
||||
// { metadata =
|
||||
defaults.ObjectMeta // { name = "nginx" }
|
||||
= package.Deployment
|
||||
:: { metadata =
|
||||
package.ObjectMeta::{ name = "nginx" }
|
||||
, spec =
|
||||
Some
|
||||
( defaults.DeploymentSpec
|
||||
// { replicas =
|
||||
( package.DeploymentSpec
|
||||
:: { replicas =
|
||||
Some 2
|
||||
, template =
|
||||
defaults.PodTemplateSpec
|
||||
// { metadata =
|
||||
defaults.ObjectMeta // { name = "nginx" }
|
||||
package.PodTemplateSpec
|
||||
:: { metadata =
|
||||
package.ObjectMeta::{ name = "nginx" }
|
||||
, spec =
|
||||
Some
|
||||
( defaults.PodSpec
|
||||
// { containers =
|
||||
[ defaults.Container
|
||||
// { name =
|
||||
( package.PodSpec
|
||||
:: { containers =
|
||||
[ package.Container
|
||||
:: { name =
|
||||
"nginx"
|
||||
, image =
|
||||
Some "nginx:1.15.3"
|
||||
, ports =
|
||||
[ defaults.ContainerPort
|
||||
// { containerPort = 80 }
|
||||
[ package.ContainerPort
|
||||
:: { containerPort = 80 }
|
||||
]
|
||||
}
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user