-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
dhall-kubernetes
support for "schemas" (#84)
For lack of a better term, I'm calling the `{ Type = …, default = … }` record that the record completion operator expects a "schema". This change adds `dhall-kubernetes` support for auto-generating these schemas for ease of use with the new `::` operator. See the included example for how this would be used
- Loading branch information
1 parent
2fb32a4
commit fee24c0
Showing
608 changed files
with
3,935 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
let kubernetes = ../schemas.dhall | ||
|
||
let release = "wintering-rodent" | ||
|
||
let name = "aws-iam-authenticator" | ||
|
||
let fullName = "${release}-${name}" | ||
|
||
let version = "0.1.1" | ||
|
||
let chart = "${name}-${version}" | ||
|
||
let heritage = "dhall" | ||
|
||
in kubernetes.DaemonSet::{ | ||
, metadata = kubernetes.ObjectMeta::{ | ||
, name = fullName | ||
, labels = toMap | ||
{ app = name | ||
, chart = chart | ||
, release = release | ||
, heritage = heritage | ||
} | ||
} | ||
, spec = Some kubernetes.DaemonSetSpec::{ | ||
, updateStrategy = Some kubernetes.DaemonSetUpdateStrategy::{ | ||
, type = Some "RollingUpdate" | ||
} | ||
, template = kubernetes.PodTemplateSpec::{ | ||
, metadata = kubernetes.ObjectMeta::{ | ||
, name = name | ||
, annotations = toMap | ||
{ `scheduler.alpha.kubernetes.io/critical-pod` = "" | ||
} | ||
, labels = toMap | ||
{ app = name | ||
, release = release | ||
} | ||
} | ||
, spec = Some kubernetes.PodSpec::{ | ||
, hostNetwork = Some True | ||
, nodeSelector = toMap | ||
{ `node-role.kubernetes.io/master` = "" | ||
} | ||
, tolerations = | ||
[ kubernetes.Toleration::{ | ||
, effect = Some "NoSchedule" | ||
, key = Some "node-role.kubernetes.io/master" | ||
} | ||
, kubernetes.Toleration::{ | ||
, effect = Some "CriticalAddonsOnly" | ||
, key = Some "Exists" | ||
} | ||
] | ||
, containers = | ||
[ kubernetes.Container::{ | ||
, name = fullName | ||
, image = Some "gcr.io/heptio-images/authenticator:v0.1.0" | ||
, args = | ||
[ "server" | ||
, "--config=/etc/aws-iam-authenticator/config.yaml" | ||
, "--state-dir=/var/aws-iam-authenticator" | ||
, "--generate-kubeconfig=/etc/kubernetes/aws-iam-authenticator/kubeconfig.yaml" | ||
] | ||
, volumeMounts = | ||
[ kubernetes.VolumeMount::{ | ||
, name = "config" | ||
, mountPath = "/etc/aws-iam-authenticator/" | ||
} | ||
, kubernetes.VolumeMount::{ | ||
, name = "state" | ||
, mountPath = "/var/aws-iam-authenticator/" | ||
} | ||
, kubernetes.VolumeMount::{ | ||
, name = "output" | ||
, mountPath = "/etc/kubernetes/aws-iam-authenticator/" | ||
} | ||
] | ||
} | ||
] | ||
, volumes = | ||
[ kubernetes.Volume::{ | ||
, name = "config" | ||
, configMap = Some kubernetes.ConfigMapVolumeSource::{ | ||
, name = Some fullName | ||
} | ||
} | ||
, kubernetes.Volume::{ | ||
, name = "output" | ||
, hostPath = Some kubernetes.HostPathVolumeSource::{ | ||
, path = "/srv/kubernetes/aws-iam-authenticator/" | ||
} | ||
} | ||
, kubernetes.Volume::{ | ||
, name = "state" | ||
, hostPath = Some kubernetes.HostPathVolumeSource::{ | ||
, path = "/srv/kubernetes/aws-iam-authenticator/" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.