mirror of
https://github.com/dhall-lang/dhall-kubernetes.git
synced 2024-11-03 21:05:47 +03:00
eb001e6683
Related to https://github.com/dhall-lang/dhall-kubernetes/issues/75 This generalizes the machinery for fetching the Kubernetes OpenAPI spec to support fetching multiple versions. In particular, the Kubernetes version is no longer tied to the version of Nixpkgs that we use.
34 lines
1.1 KiB
Plaintext
34 lines
1.1 KiB
Plaintext
let kubernetes =
|
|
../package.dhall sha256:ab1c971ddeb178c1cfc5e749b211b4fe6fdb6fa1b68b10de62aeb543efcd60b3
|
|
|
|
let deployment =
|
|
kubernetes.Deployment::{
|
|
, metadata = kubernetes.ObjectMeta::{ name = "nginx" }
|
|
, spec =
|
|
Some
|
|
kubernetes.DeploymentSpec::{
|
|
, replicas = Some 2
|
|
, template =
|
|
kubernetes.PodTemplateSpec::{
|
|
, metadata = kubernetes.ObjectMeta::{ name = "nginx" }
|
|
, spec =
|
|
Some
|
|
kubernetes.PodSpec::{
|
|
, containers =
|
|
[ kubernetes.Container::{
|
|
, name = "nginx"
|
|
, image = Some "nginx:1.15.3"
|
|
, ports =
|
|
[ kubernetes.ContainerPort::{
|
|
, containerPort = 80
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
in deployment
|