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 =
|
let package = ../package.dhall
|
||||||
../types.dhall sha256:e48e21b807dad217a6c3e631fcaf3e950062310bfb4a8bbcecc330eb7b2f60ed
|
|
||||||
|
|
||||||
let defaults =
|
|
||||||
../defaults.dhall sha256:4450e23dc81975d111650e06c0238862944bf699537af6cbacac9c7e471dfabe
|
|
||||||
|
|
||||||
let deployment
|
let deployment
|
||||||
: types.Deployment
|
= package.Deployment
|
||||||
= defaults.Deployment
|
:: { metadata =
|
||||||
// { metadata =
|
package.ObjectMeta::{ name = "nginx" }
|
||||||
defaults.ObjectMeta // { name = "nginx" }
|
|
||||||
, spec =
|
, spec =
|
||||||
Some
|
Some
|
||||||
( defaults.DeploymentSpec
|
( package.DeploymentSpec
|
||||||
// { replicas =
|
:: { replicas =
|
||||||
Some 2
|
Some 2
|
||||||
, template =
|
, template =
|
||||||
defaults.PodTemplateSpec
|
package.PodTemplateSpec
|
||||||
// { metadata =
|
:: { metadata =
|
||||||
defaults.ObjectMeta // { name = "nginx" }
|
package.ObjectMeta::{ name = "nginx" }
|
||||||
, spec =
|
, spec =
|
||||||
Some
|
Some
|
||||||
( defaults.PodSpec
|
( package.PodSpec
|
||||||
// { containers =
|
:: { containers =
|
||||||
[ defaults.Container
|
[ package.Container
|
||||||
// { name =
|
:: { name =
|
||||||
"nginx"
|
"nginx"
|
||||||
, image =
|
, image =
|
||||||
Some "nginx:1.15.3"
|
Some "nginx:1.15.3"
|
||||||
, ports =
|
, ports =
|
||||||
[ defaults.ContainerPort
|
[ package.ContainerPort
|
||||||
// { containerPort = 80 }
|
:: { containerPort = 80 }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user