mirror of
https://github.com/dhall-lang/dhall-kubernetes.git
synced 2024-09-10 23:15:30 +03:00
Update to latest dhall to escape reserved keywords (#127)
This change updates the dhall-kubernetes-generator to use the latest dhall version so that attribute named after reserved keywords are properly escape. See: https://github.com/dhall-lang/dhall-haskell/issues/1896
This commit is contained in:
parent
fd9cdd4647
commit
49fabcc9a1
@ -25,5 +25,5 @@
|
||||
-}
|
||||
|
||||
env:DHALL_PRELUDE
|
||||
? https://raw.githubusercontent.com/dhall-lang/dhall-lang/v10.0.0/Prelude/package.dhall sha256:771c7131fc87e13eb18f770a27c59f9418879f7e230ba2a50e46f4461f43ec69
|
||||
? https://raw.githubusercontent.com/dhall-lang/dhall-lang/v10.0.0/Prelude/package.dhall
|
||||
? https://raw.githubusercontent.com/dhall-lang/dhall-lang/v17.0.0/Prelude/package.dhall sha256:10db3c919c25e9046833df897a8ffe2701dc390fa0893d958c3430524be5a43e
|
||||
? https://raw.githubusercontent.com/dhall-lang/dhall-lang/v17.0.0/Prelude/package.dhall
|
||||
|
@ -71,7 +71,7 @@ let deployment =
|
||||
, name = "nginx"
|
||||
, image = Some "nginx:1.15.3"
|
||||
, ports = Some
|
||||
[ kubernetes.ContainerPort::{ containerPort = 80 } ]
|
||||
[ kubernetes.ContainerPort::{ containerPort = 80 } ]
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -143,7 +143,7 @@ Things to note in the following example:
|
||||
-- examples/ingress.dhall
|
||||
|
||||
let Prelude =
|
||||
../Prelude.dhall sha256:771c7131fc87e13eb18f770a27c59f9418879f7e230ba2a50e46f4461f43ec69
|
||||
../Prelude.dhall sha256:10db3c919c25e9046833df897a8ffe2701dc390fa0893d958c3430524be5a43e
|
||||
|
||||
let map = Prelude.List.map
|
||||
|
||||
@ -156,31 +156,31 @@ let services = [ { name = "foo", host = "foo.example.com", version = "2.3" } ]
|
||||
|
||||
let makeTLS
|
||||
: Service → kubernetes.IngressTLS.Type
|
||||
= λ(service : Service)
|
||||
→ { hosts = Some [ service.host ]
|
||||
= λ(service : Service) →
|
||||
{ hosts = Some [ service.host ]
|
||||
, secretName = Some "${service.name}-certificate"
|
||||
}
|
||||
|
||||
let makeRule
|
||||
: Service → kubernetes.IngressRule.Type
|
||||
= λ(service : Service)
|
||||
→ { host = Some service.host
|
||||
= λ(service : Service) →
|
||||
{ host = Some service.host
|
||||
, http = Some
|
||||
{ paths =
|
||||
[ { backend =
|
||||
{ serviceName = service.name
|
||||
, servicePort = kubernetes.IntOrString.Int 80
|
||||
}
|
||||
, path = None Text
|
||||
{ paths =
|
||||
[ { backend =
|
||||
{ serviceName = service.name
|
||||
, servicePort = kubernetes.IntOrString.Int 80
|
||||
}
|
||||
]
|
||||
}
|
||||
, path = None Text
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
let mkIngress
|
||||
: List Service → kubernetes.Ingress.Type
|
||||
= λ(inputServices : List Service)
|
||||
→ let annotations =
|
||||
= λ(inputServices : List Service) →
|
||||
let annotations =
|
||||
toMap
|
||||
{ `kubernetes.io/ingress.class` = "nginx"
|
||||
, `kubernetes.io/ingress.allow-http` = "false"
|
||||
@ -238,7 +238,7 @@ apiVersion: extensions/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
annotations:
|
||||
kubernetes.io/ingress.allow-http: "false"
|
||||
kubernetes.io/ingress.allow-http: 'false'
|
||||
kubernetes.io/ingress.class: nginx
|
||||
name: nginx
|
||||
spec:
|
||||
|
@ -16,18 +16,11 @@ let heritage = "dhall"
|
||||
in kubernetes.DaemonSet::{
|
||||
, metadata = kubernetes.ObjectMeta::{
|
||||
, name = Some fullName
|
||||
, labels = Some
|
||||
( toMap
|
||||
{ app = name
|
||||
, chart = chart
|
||||
, release = release
|
||||
, heritage = heritage
|
||||
}
|
||||
)
|
||||
, labels = Some (toMap { app = name, chart, release, heritage })
|
||||
}
|
||||
, spec = Some kubernetes.DaemonSetSpec::{
|
||||
, selector = kubernetes.LabelSelector::{
|
||||
, matchLabels = Some (toMap { app = name, release = release })
|
||||
, matchLabels = Some (toMap { app = name, release })
|
||||
}
|
||||
, updateStrategy = Some kubernetes.DaemonSetUpdateStrategy::{
|
||||
, type = Some "RollingUpdate"
|
||||
@ -37,68 +30,68 @@ in kubernetes.DaemonSet::{
|
||||
, name = Some name
|
||||
, annotations = Some
|
||||
(toMap { `scheduler.alpha.kubernetes.io/critical-pod` = "" })
|
||||
, labels = Some (toMap { app = name, release = release })
|
||||
, labels = Some (toMap { app = name, release })
|
||||
}
|
||||
, spec = Some kubernetes.PodSpec::{
|
||||
, hostNetwork = Some True
|
||||
, nodeSelector = Some
|
||||
(toMap { `node-role.kubernetes.io/master` = "" })
|
||||
, tolerations = Some
|
||||
[ kubernetes.Toleration::{
|
||||
, effect = Some "NoSchedule"
|
||||
, key = Some "node-role.kubernetes.io/master"
|
||||
}
|
||||
, kubernetes.Toleration::{
|
||||
, effect = Some "CriticalAddonsOnly"
|
||||
, key = Some "Exists"
|
||||
}
|
||||
]
|
||||
[ 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 = Some
|
||||
[ "server"
|
||||
, "--config=/etc/aws-iam-authenticator/config.yaml"
|
||||
, "--state-dir=/var/aws-iam-authenticator"
|
||||
, "--generate-kubeconfig=/etc/kubernetes/aws-iam-authenticator/kubeconfig.yaml"
|
||||
]
|
||||
[ "server"
|
||||
, "--config=/etc/aws-iam-authenticator/config.yaml"
|
||||
, "--state-dir=/var/aws-iam-authenticator"
|
||||
, "--generate-kubeconfig=/etc/kubernetes/aws-iam-authenticator/kubeconfig.yaml"
|
||||
]
|
||||
, volumeMounts = Some
|
||||
[ 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/"
|
||||
}
|
||||
]
|
||||
[ 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 = Some
|
||||
[ kubernetes.Volume::{
|
||||
, name = "config"
|
||||
, configMap = Some kubernetes.ConfigMapVolumeSource::{
|
||||
, name = Some fullName
|
||||
}
|
||||
[ 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 = "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/"
|
||||
}
|
||||
}
|
||||
, kubernetes.Volume::{
|
||||
, name = "state"
|
||||
, hostPath = Some kubernetes.HostPathVolumeSource::{
|
||||
, path = "/srv/kubernetes/aws-iam-authenticator/"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
let Prelude =
|
||||
../Prelude.dhall sha256:771c7131fc87e13eb18f770a27c59f9418879f7e230ba2a50e46f4461f43ec69
|
||||
../Prelude.dhall sha256:10db3c919c25e9046833df897a8ffe2701dc390fa0893d958c3430524be5a43e
|
||||
|
||||
let kubernetes =
|
||||
../package.dhall sha256:f94bc36de9bc672f01cba5ef8fc2e12a2ad33a3a70e1d74abc88b15e14bc20d2
|
||||
@ -16,9 +16,9 @@ let deployment =
|
||||
, strategy = Some kubernetes.DeploymentStrategy::{
|
||||
, type = Some "RollingUpdate"
|
||||
, rollingUpdate = Some
|
||||
{ maxSurge = Some (kubernetes.IntOrString.Int 5)
|
||||
, maxUnavailable = Some (kubernetes.IntOrString.Int 0)
|
||||
}
|
||||
{ maxSurge = Some (kubernetes.IntOrString.Int 5)
|
||||
, maxUnavailable = Some (kubernetes.IntOrString.Int 0)
|
||||
}
|
||||
}
|
||||
, template = kubernetes.PodTemplateSpec::{
|
||||
, metadata = kubernetes.ObjectMeta::{
|
||||
@ -32,11 +32,11 @@ let deployment =
|
||||
, image = Some "nginx:1.15.3"
|
||||
, imagePullPolicy = Some "Always"
|
||||
, ports = Some
|
||||
[ kubernetes.ContainerPort::{ containerPort = 80 } ]
|
||||
[ kubernetes.ContainerPort::{ containerPort = 80 } ]
|
||||
, resources = Some
|
||||
{ limits = Some (toMap { cpu = "500m" })
|
||||
, requests = Some (toMap { cpu = "10m" })
|
||||
}
|
||||
{ limits = Some (toMap { cpu = "500m" })
|
||||
, requests = Some (toMap { cpu = "10m" })
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ let deployment =
|
||||
, name = "nginx"
|
||||
, image = Some "nginx:1.15.3"
|
||||
, ports = Some
|
||||
[ kubernetes.ContainerPort::{ containerPort = 80 } ]
|
||||
[ kubernetes.ContainerPort::{ containerPort = 80 } ]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
let Prelude =
|
||||
../Prelude.dhall sha256:771c7131fc87e13eb18f770a27c59f9418879f7e230ba2a50e46f4461f43ec69
|
||||
../Prelude.dhall sha256:10db3c919c25e9046833df897a8ffe2701dc390fa0893d958c3430524be5a43e
|
||||
|
||||
let map = Prelude.List.map
|
||||
|
||||
@ -12,31 +12,31 @@ let services = [ { name = "foo", host = "foo.example.com", version = "2.3" } ]
|
||||
|
||||
let makeTLS
|
||||
: Service → kubernetes.IngressTLS.Type
|
||||
= λ(service : Service)
|
||||
→ { hosts = Some [ service.host ]
|
||||
= λ(service : Service) →
|
||||
{ hosts = Some [ service.host ]
|
||||
, secretName = Some "${service.name}-certificate"
|
||||
}
|
||||
|
||||
let makeRule
|
||||
: Service → kubernetes.IngressRule.Type
|
||||
= λ(service : Service)
|
||||
→ { host = Some service.host
|
||||
= λ(service : Service) →
|
||||
{ host = Some service.host
|
||||
, http = Some
|
||||
{ paths =
|
||||
[ { backend =
|
||||
{ serviceName = service.name
|
||||
, servicePort = kubernetes.IntOrString.Int 80
|
||||
}
|
||||
, path = None Text
|
||||
{ paths =
|
||||
[ { backend =
|
||||
{ serviceName = service.name
|
||||
, servicePort = kubernetes.IntOrString.Int 80
|
||||
}
|
||||
]
|
||||
}
|
||||
, path = None Text
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
let mkIngress
|
||||
: List Service → kubernetes.Ingress.Type
|
||||
= λ(inputServices : List Service)
|
||||
→ let annotations =
|
||||
= λ(inputServices : List Service) →
|
||||
let annotations =
|
||||
toMap
|
||||
{ `kubernetes.io/ingress.class` = "nginx"
|
||||
, `kubernetes.io/ingress.allow-http` = "false"
|
||||
|
@ -15,7 +15,7 @@ spec:
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
scheduler.alpha.kubernetes.io/critical-pod: ""
|
||||
scheduler.alpha.kubernetes.io/critical-pod: ''
|
||||
labels:
|
||||
app: aws-iam-authenticator
|
||||
release: wintering-rodent
|
||||
@ -38,7 +38,7 @@ spec:
|
||||
name: output
|
||||
hostNetwork: true
|
||||
nodeSelector:
|
||||
node-role.kubernetes.io/master: ""
|
||||
node-role.kubernetes.io/master: ''
|
||||
tolerations:
|
||||
- effect: NoSchedule
|
||||
key: node-role.kubernetes.io/master
|
||||
|
@ -27,6 +27,6 @@ spec:
|
||||
- containerPort: 80
|
||||
resources:
|
||||
limits:
|
||||
cpu: 500m
|
||||
cpu: "500m"
|
||||
requests:
|
||||
cpu: 10m
|
||||
cpu: "10m"
|
||||
|
@ -2,7 +2,7 @@ apiVersion: extensions/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
annotations:
|
||||
kubernetes.io/ingress.allow-http: "false"
|
||||
kubernetes.io/ingress.allow-http: 'false'
|
||||
kubernetes.io/ingress.class: nginx
|
||||
name: nginx
|
||||
spec:
|
||||
|
@ -1,5 +1,5 @@
|
||||
let Prelude =
|
||||
../Prelude.dhall sha256:771c7131fc87e13eb18f770a27c59f9418879f7e230ba2a50e46f4461f43ec69
|
||||
../Prelude.dhall sha256:10db3c919c25e9046833df897a8ffe2701dc390fa0893d958c3430524be5a43e
|
||||
|
||||
let kubernetes =
|
||||
../package.dhall sha256:f94bc36de9bc672f01cba5ef8fc2e12a2ad33a3a70e1d74abc88b15e14bc20d2
|
||||
@ -8,11 +8,11 @@ let spec =
|
||||
{ selector = Some (toMap { app = "nginx" })
|
||||
, type = Some "NodePort"
|
||||
, ports = Some
|
||||
[ kubernetes.ServicePort::{
|
||||
, targetPort = Some (kubernetes.IntOrString.Int 80)
|
||||
, port = 80
|
||||
}
|
||||
]
|
||||
[ kubernetes.ServicePort::{
|
||||
, targetPort = Some (kubernetes.IntOrString.Int 80)
|
||||
, port = 80
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
let service
|
||||
|
@ -25,5 +25,5 @@
|
||||
-}
|
||||
|
||||
env:DHALL_PRELUDE
|
||||
? https://raw.githubusercontent.com/dhall-lang/dhall-lang/v10.0.0/Prelude/package.dhall sha256:771c7131fc87e13eb18f770a27c59f9418879f7e230ba2a50e46f4461f43ec69
|
||||
? https://raw.githubusercontent.com/dhall-lang/dhall-lang/v10.0.0/Prelude/package.dhall
|
||||
? https://raw.githubusercontent.com/dhall-lang/dhall-lang/v17.0.0/Prelude/package.dhall sha256:10db3c919c25e9046833df897a8ffe2701dc390fa0893d958c3430524be5a43e
|
||||
? https://raw.githubusercontent.com/dhall-lang/dhall-lang/v17.0.0/Prelude/package.dhall
|
||||
|
@ -71,7 +71,7 @@ let deployment =
|
||||
, name = "nginx"
|
||||
, image = Some "nginx:1.15.3"
|
||||
, ports = Some
|
||||
[ kubernetes.ContainerPort::{ containerPort = 80 } ]
|
||||
[ kubernetes.ContainerPort::{ containerPort = 80 } ]
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -143,7 +143,7 @@ Things to note in the following example:
|
||||
-- examples/ingress.dhall
|
||||
|
||||
let Prelude =
|
||||
../Prelude.dhall sha256:771c7131fc87e13eb18f770a27c59f9418879f7e230ba2a50e46f4461f43ec69
|
||||
../Prelude.dhall sha256:10db3c919c25e9046833df897a8ffe2701dc390fa0893d958c3430524be5a43e
|
||||
|
||||
let map = Prelude.List.map
|
||||
|
||||
@ -156,31 +156,31 @@ let services = [ { name = "foo", host = "foo.example.com", version = "2.3" } ]
|
||||
|
||||
let makeTLS
|
||||
: Service → kubernetes.IngressTLS.Type
|
||||
= λ(service : Service)
|
||||
→ { hosts = Some [ service.host ]
|
||||
= λ(service : Service) →
|
||||
{ hosts = Some [ service.host ]
|
||||
, secretName = Some "${service.name}-certificate"
|
||||
}
|
||||
|
||||
let makeRule
|
||||
: Service → kubernetes.IngressRule.Type
|
||||
= λ(service : Service)
|
||||
→ { host = Some service.host
|
||||
= λ(service : Service) →
|
||||
{ host = Some service.host
|
||||
, http = Some
|
||||
{ paths =
|
||||
[ { backend =
|
||||
{ serviceName = service.name
|
||||
, servicePort = kubernetes.IntOrString.Int 80
|
||||
}
|
||||
, path = None Text
|
||||
{ paths =
|
||||
[ { backend =
|
||||
{ serviceName = service.name
|
||||
, servicePort = kubernetes.IntOrString.Int 80
|
||||
}
|
||||
]
|
||||
}
|
||||
, path = None Text
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
let mkIngress
|
||||
: List Service → kubernetes.Ingress.Type
|
||||
= λ(inputServices : List Service)
|
||||
→ let annotations =
|
||||
= λ(inputServices : List Service) →
|
||||
let annotations =
|
||||
toMap
|
||||
{ `kubernetes.io/ingress.class` = "nginx"
|
||||
, `kubernetes.io/ingress.allow-http` = "false"
|
||||
@ -238,7 +238,7 @@ apiVersion: extensions/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
annotations:
|
||||
kubernetes.io/ingress.allow-http: "false"
|
||||
kubernetes.io/ingress.allow-http: 'false'
|
||||
kubernetes.io/ingress.class: nginx
|
||||
name: nginx
|
||||
spec:
|
||||
|
@ -16,18 +16,11 @@ let heritage = "dhall"
|
||||
in kubernetes.DaemonSet::{
|
||||
, metadata = kubernetes.ObjectMeta::{
|
||||
, name = Some fullName
|
||||
, labels = Some
|
||||
( toMap
|
||||
{ app = name
|
||||
, chart = chart
|
||||
, release = release
|
||||
, heritage = heritage
|
||||
}
|
||||
)
|
||||
, labels = Some (toMap { app = name, chart, release, heritage })
|
||||
}
|
||||
, spec = Some kubernetes.DaemonSetSpec::{
|
||||
, selector = kubernetes.LabelSelector::{
|
||||
, matchLabels = Some (toMap { app = name, release = release })
|
||||
, matchLabels = Some (toMap { app = name, release })
|
||||
}
|
||||
, updateStrategy = Some kubernetes.DaemonSetUpdateStrategy::{
|
||||
, type = Some "RollingUpdate"
|
||||
@ -37,68 +30,68 @@ in kubernetes.DaemonSet::{
|
||||
, name = Some name
|
||||
, annotations = Some
|
||||
(toMap { `scheduler.alpha.kubernetes.io/critical-pod` = "" })
|
||||
, labels = Some (toMap { app = name, release = release })
|
||||
, labels = Some (toMap { app = name, release })
|
||||
}
|
||||
, spec = Some kubernetes.PodSpec::{
|
||||
, hostNetwork = Some True
|
||||
, nodeSelector = Some
|
||||
(toMap { `node-role.kubernetes.io/master` = "" })
|
||||
, tolerations = Some
|
||||
[ kubernetes.Toleration::{
|
||||
, effect = Some "NoSchedule"
|
||||
, key = Some "node-role.kubernetes.io/master"
|
||||
}
|
||||
, kubernetes.Toleration::{
|
||||
, effect = Some "CriticalAddonsOnly"
|
||||
, key = Some "Exists"
|
||||
}
|
||||
]
|
||||
[ 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 = Some
|
||||
[ "server"
|
||||
, "--config=/etc/aws-iam-authenticator/config.yaml"
|
||||
, "--state-dir=/var/aws-iam-authenticator"
|
||||
, "--generate-kubeconfig=/etc/kubernetes/aws-iam-authenticator/kubeconfig.yaml"
|
||||
]
|
||||
[ "server"
|
||||
, "--config=/etc/aws-iam-authenticator/config.yaml"
|
||||
, "--state-dir=/var/aws-iam-authenticator"
|
||||
, "--generate-kubeconfig=/etc/kubernetes/aws-iam-authenticator/kubeconfig.yaml"
|
||||
]
|
||||
, volumeMounts = Some
|
||||
[ 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/"
|
||||
}
|
||||
]
|
||||
[ 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 = Some
|
||||
[ kubernetes.Volume::{
|
||||
, name = "config"
|
||||
, configMap = Some kubernetes.ConfigMapVolumeSource::{
|
||||
, name = Some fullName
|
||||
}
|
||||
[ 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 = "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/"
|
||||
}
|
||||
}
|
||||
, kubernetes.Volume::{
|
||||
, name = "state"
|
||||
, hostPath = Some kubernetes.HostPathVolumeSource::{
|
||||
, path = "/srv/kubernetes/aws-iam-authenticator/"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
let Prelude =
|
||||
../Prelude.dhall sha256:771c7131fc87e13eb18f770a27c59f9418879f7e230ba2a50e46f4461f43ec69
|
||||
../Prelude.dhall sha256:10db3c919c25e9046833df897a8ffe2701dc390fa0893d958c3430524be5a43e
|
||||
|
||||
let kubernetes =
|
||||
../package.dhall sha256:6966f60104bbdcbab6f6472b89710599e58ced14421ebb28885b34b94f439dae
|
||||
@ -16,9 +16,9 @@ let deployment =
|
||||
, strategy = Some kubernetes.DeploymentStrategy::{
|
||||
, type = Some "RollingUpdate"
|
||||
, rollingUpdate = Some
|
||||
{ maxSurge = Some (kubernetes.IntOrString.Int 5)
|
||||
, maxUnavailable = Some (kubernetes.IntOrString.Int 0)
|
||||
}
|
||||
{ maxSurge = Some (kubernetes.IntOrString.Int 5)
|
||||
, maxUnavailable = Some (kubernetes.IntOrString.Int 0)
|
||||
}
|
||||
}
|
||||
, template = kubernetes.PodTemplateSpec::{
|
||||
, metadata = kubernetes.ObjectMeta::{
|
||||
@ -32,11 +32,11 @@ let deployment =
|
||||
, image = Some "nginx:1.15.3"
|
||||
, imagePullPolicy = Some "Always"
|
||||
, ports = Some
|
||||
[ kubernetes.ContainerPort::{ containerPort = 80 } ]
|
||||
[ kubernetes.ContainerPort::{ containerPort = 80 } ]
|
||||
, resources = Some
|
||||
{ limits = Some (toMap { cpu = "500m" })
|
||||
, requests = Some (toMap { cpu = "10m" })
|
||||
}
|
||||
{ limits = Some (toMap { cpu = "500m" })
|
||||
, requests = Some (toMap { cpu = "10m" })
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ let deployment =
|
||||
, name = "nginx"
|
||||
, image = Some "nginx:1.15.3"
|
||||
, ports = Some
|
||||
[ kubernetes.ContainerPort::{ containerPort = 80 } ]
|
||||
[ kubernetes.ContainerPort::{ containerPort = 80 } ]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
let Prelude =
|
||||
../Prelude.dhall sha256:771c7131fc87e13eb18f770a27c59f9418879f7e230ba2a50e46f4461f43ec69
|
||||
../Prelude.dhall sha256:10db3c919c25e9046833df897a8ffe2701dc390fa0893d958c3430524be5a43e
|
||||
|
||||
let map = Prelude.List.map
|
||||
|
||||
@ -12,31 +12,31 @@ let services = [ { name = "foo", host = "foo.example.com", version = "2.3" } ]
|
||||
|
||||
let makeTLS
|
||||
: Service → kubernetes.IngressTLS.Type
|
||||
= λ(service : Service)
|
||||
→ { hosts = Some [ service.host ]
|
||||
= λ(service : Service) →
|
||||
{ hosts = Some [ service.host ]
|
||||
, secretName = Some "${service.name}-certificate"
|
||||
}
|
||||
|
||||
let makeRule
|
||||
: Service → kubernetes.IngressRule.Type
|
||||
= λ(service : Service)
|
||||
→ { host = Some service.host
|
||||
= λ(service : Service) →
|
||||
{ host = Some service.host
|
||||
, http = Some
|
||||
{ paths =
|
||||
[ { backend =
|
||||
{ serviceName = service.name
|
||||
, servicePort = kubernetes.IntOrString.Int 80
|
||||
}
|
||||
, path = None Text
|
||||
{ paths =
|
||||
[ { backend =
|
||||
{ serviceName = service.name
|
||||
, servicePort = kubernetes.IntOrString.Int 80
|
||||
}
|
||||
]
|
||||
}
|
||||
, path = None Text
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
let mkIngress
|
||||
: List Service → kubernetes.Ingress.Type
|
||||
= λ(inputServices : List Service)
|
||||
→ let annotations =
|
||||
= λ(inputServices : List Service) →
|
||||
let annotations =
|
||||
toMap
|
||||
{ `kubernetes.io/ingress.class` = "nginx"
|
||||
, `kubernetes.io/ingress.allow-http` = "false"
|
||||
|
@ -15,7 +15,7 @@ spec:
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
scheduler.alpha.kubernetes.io/critical-pod: ""
|
||||
scheduler.alpha.kubernetes.io/critical-pod: ''
|
||||
labels:
|
||||
app: aws-iam-authenticator
|
||||
release: wintering-rodent
|
||||
@ -38,7 +38,7 @@ spec:
|
||||
name: output
|
||||
hostNetwork: true
|
||||
nodeSelector:
|
||||
node-role.kubernetes.io/master: ""
|
||||
node-role.kubernetes.io/master: ''
|
||||
tolerations:
|
||||
- effect: NoSchedule
|
||||
key: node-role.kubernetes.io/master
|
||||
|
@ -27,6 +27,6 @@ spec:
|
||||
- containerPort: 80
|
||||
resources:
|
||||
limits:
|
||||
cpu: 500m
|
||||
cpu: "500m"
|
||||
requests:
|
||||
cpu: 10m
|
||||
cpu: "10m"
|
||||
|
@ -2,7 +2,7 @@ apiVersion: extensions/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
annotations:
|
||||
kubernetes.io/ingress.allow-http: "false"
|
||||
kubernetes.io/ingress.allow-http: 'false'
|
||||
kubernetes.io/ingress.class: nginx
|
||||
name: nginx
|
||||
spec:
|
||||
|
@ -1,5 +1,5 @@
|
||||
let Prelude =
|
||||
../Prelude.dhall sha256:771c7131fc87e13eb18f770a27c59f9418879f7e230ba2a50e46f4461f43ec69
|
||||
../Prelude.dhall sha256:10db3c919c25e9046833df897a8ffe2701dc390fa0893d958c3430524be5a43e
|
||||
|
||||
let kubernetes =
|
||||
../package.dhall sha256:6966f60104bbdcbab6f6472b89710599e58ced14421ebb28885b34b94f439dae
|
||||
@ -8,11 +8,11 @@ let spec =
|
||||
{ selector = Some (toMap { app = "nginx" })
|
||||
, type = Some "NodePort"
|
||||
, ports = Some
|
||||
[ kubernetes.ServicePort::{
|
||||
, targetPort = Some (kubernetes.IntOrString.Int 80)
|
||||
, port = 80
|
||||
}
|
||||
]
|
||||
[ kubernetes.ServicePort::{
|
||||
, targetPort = Some (kubernetes.IntOrString.Int 80)
|
||||
, port = 80
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
let service
|
||||
|
@ -25,5 +25,5 @@
|
||||
-}
|
||||
|
||||
env:DHALL_PRELUDE
|
||||
? https://raw.githubusercontent.com/dhall-lang/dhall-lang/v10.0.0/Prelude/package.dhall sha256:771c7131fc87e13eb18f770a27c59f9418879f7e230ba2a50e46f4461f43ec69
|
||||
? https://raw.githubusercontent.com/dhall-lang/dhall-lang/v10.0.0/Prelude/package.dhall
|
||||
? https://raw.githubusercontent.com/dhall-lang/dhall-lang/v17.0.0/Prelude/package.dhall sha256:10db3c919c25e9046833df897a8ffe2701dc390fa0893d958c3430524be5a43e
|
||||
? https://raw.githubusercontent.com/dhall-lang/dhall-lang/v17.0.0/Prelude/package.dhall
|
||||
|
@ -71,7 +71,7 @@ let deployment =
|
||||
, name = "nginx"
|
||||
, image = Some "nginx:1.15.3"
|
||||
, ports = Some
|
||||
[ kubernetes.ContainerPort::{ containerPort = 80 } ]
|
||||
[ kubernetes.ContainerPort::{ containerPort = 80 } ]
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -143,7 +143,7 @@ Things to note in the following example:
|
||||
-- examples/ingress.dhall
|
||||
|
||||
let Prelude =
|
||||
../Prelude.dhall sha256:771c7131fc87e13eb18f770a27c59f9418879f7e230ba2a50e46f4461f43ec69
|
||||
../Prelude.dhall sha256:10db3c919c25e9046833df897a8ffe2701dc390fa0893d958c3430524be5a43e
|
||||
|
||||
let map = Prelude.List.map
|
||||
|
||||
@ -156,31 +156,31 @@ let services = [ { name = "foo", host = "foo.example.com", version = "2.3" } ]
|
||||
|
||||
let makeTLS
|
||||
: Service → kubernetes.IngressTLS.Type
|
||||
= λ(service : Service)
|
||||
→ { hosts = Some [ service.host ]
|
||||
= λ(service : Service) →
|
||||
{ hosts = Some [ service.host ]
|
||||
, secretName = Some "${service.name}-certificate"
|
||||
}
|
||||
|
||||
let makeRule
|
||||
: Service → kubernetes.IngressRule.Type
|
||||
= λ(service : Service)
|
||||
→ { host = Some service.host
|
||||
= λ(service : Service) →
|
||||
{ host = Some service.host
|
||||
, http = Some
|
||||
{ paths =
|
||||
[ { backend =
|
||||
{ serviceName = service.name
|
||||
, servicePort = kubernetes.IntOrString.Int 80
|
||||
}
|
||||
, path = None Text
|
||||
{ paths =
|
||||
[ { backend =
|
||||
{ serviceName = service.name
|
||||
, servicePort = kubernetes.IntOrString.Int 80
|
||||
}
|
||||
]
|
||||
}
|
||||
, path = None Text
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
let mkIngress
|
||||
: List Service → kubernetes.Ingress.Type
|
||||
= λ(inputServices : List Service)
|
||||
→ let annotations =
|
||||
= λ(inputServices : List Service) →
|
||||
let annotations =
|
||||
toMap
|
||||
{ `kubernetes.io/ingress.class` = "nginx"
|
||||
, `kubernetes.io/ingress.allow-http` = "false"
|
||||
@ -238,7 +238,7 @@ apiVersion: networking.k8s.io/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
annotations:
|
||||
kubernetes.io/ingress.allow-http: "false"
|
||||
kubernetes.io/ingress.allow-http: 'false'
|
||||
kubernetes.io/ingress.class: nginx
|
||||
name: nginx
|
||||
spec:
|
||||
|
@ -16,18 +16,11 @@ let heritage = "dhall"
|
||||
in kubernetes.DaemonSet::{
|
||||
, metadata = kubernetes.ObjectMeta::{
|
||||
, name = Some fullName
|
||||
, labels = Some
|
||||
( toMap
|
||||
{ app = name
|
||||
, chart = chart
|
||||
, release = release
|
||||
, heritage = heritage
|
||||
}
|
||||
)
|
||||
, labels = Some (toMap { app = name, chart, release, heritage })
|
||||
}
|
||||
, spec = Some kubernetes.DaemonSetSpec::{
|
||||
, selector = kubernetes.LabelSelector::{
|
||||
, matchLabels = Some (toMap { app = name, release = release })
|
||||
, matchLabels = Some (toMap { app = name, release })
|
||||
}
|
||||
, updateStrategy = Some kubernetes.DaemonSetUpdateStrategy::{
|
||||
, type = Some "RollingUpdate"
|
||||
@ -37,68 +30,68 @@ in kubernetes.DaemonSet::{
|
||||
, name = Some name
|
||||
, annotations = Some
|
||||
(toMap { `scheduler.alpha.kubernetes.io/critical-pod` = "" })
|
||||
, labels = Some (toMap { app = name, release = release })
|
||||
, labels = Some (toMap { app = name, release })
|
||||
}
|
||||
, spec = Some kubernetes.PodSpec::{
|
||||
, hostNetwork = Some True
|
||||
, nodeSelector = Some
|
||||
(toMap { `node-role.kubernetes.io/master` = "" })
|
||||
, tolerations = Some
|
||||
[ kubernetes.Toleration::{
|
||||
, effect = Some "NoSchedule"
|
||||
, key = Some "node-role.kubernetes.io/master"
|
||||
}
|
||||
, kubernetes.Toleration::{
|
||||
, effect = Some "CriticalAddonsOnly"
|
||||
, key = Some "Exists"
|
||||
}
|
||||
]
|
||||
[ 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 = Some
|
||||
[ "server"
|
||||
, "--config=/etc/aws-iam-authenticator/config.yaml"
|
||||
, "--state-dir=/var/aws-iam-authenticator"
|
||||
, "--generate-kubeconfig=/etc/kubernetes/aws-iam-authenticator/kubeconfig.yaml"
|
||||
]
|
||||
[ "server"
|
||||
, "--config=/etc/aws-iam-authenticator/config.yaml"
|
||||
, "--state-dir=/var/aws-iam-authenticator"
|
||||
, "--generate-kubeconfig=/etc/kubernetes/aws-iam-authenticator/kubeconfig.yaml"
|
||||
]
|
||||
, volumeMounts = Some
|
||||
[ 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/"
|
||||
}
|
||||
]
|
||||
[ 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 = Some
|
||||
[ kubernetes.Volume::{
|
||||
, name = "config"
|
||||
, configMap = Some kubernetes.ConfigMapVolumeSource::{
|
||||
, name = Some fullName
|
||||
}
|
||||
[ 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 = "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/"
|
||||
}
|
||||
}
|
||||
, kubernetes.Volume::{
|
||||
, name = "state"
|
||||
, hostPath = Some kubernetes.HostPathVolumeSource::{
|
||||
, path = "/srv/kubernetes/aws-iam-authenticator/"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
let Prelude =
|
||||
../Prelude.dhall sha256:771c7131fc87e13eb18f770a27c59f9418879f7e230ba2a50e46f4461f43ec69
|
||||
../Prelude.dhall sha256:10db3c919c25e9046833df897a8ffe2701dc390fa0893d958c3430524be5a43e
|
||||
|
||||
let kubernetes =
|
||||
../package.dhall sha256:ca5ddb1035b4740948ee91b380beb10253ff0cd042353cb2ca685de5c0ecec0a
|
||||
@ -16,9 +16,9 @@ let deployment =
|
||||
, strategy = Some kubernetes.DeploymentStrategy::{
|
||||
, type = Some "RollingUpdate"
|
||||
, rollingUpdate = Some
|
||||
{ maxSurge = Some (kubernetes.IntOrString.Int 5)
|
||||
, maxUnavailable = Some (kubernetes.IntOrString.Int 0)
|
||||
}
|
||||
{ maxSurge = Some (kubernetes.IntOrString.Int 5)
|
||||
, maxUnavailable = Some (kubernetes.IntOrString.Int 0)
|
||||
}
|
||||
}
|
||||
, template = kubernetes.PodTemplateSpec::{
|
||||
, metadata = kubernetes.ObjectMeta::{
|
||||
@ -32,11 +32,11 @@ let deployment =
|
||||
, image = Some "nginx:1.15.3"
|
||||
, imagePullPolicy = Some "Always"
|
||||
, ports = Some
|
||||
[ kubernetes.ContainerPort::{ containerPort = 80 } ]
|
||||
[ kubernetes.ContainerPort::{ containerPort = 80 } ]
|
||||
, resources = Some
|
||||
{ limits = Some (toMap { cpu = "500m" })
|
||||
, requests = Some (toMap { cpu = "10m" })
|
||||
}
|
||||
{ limits = Some (toMap { cpu = "500m" })
|
||||
, requests = Some (toMap { cpu = "10m" })
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ let deployment =
|
||||
, name = "nginx"
|
||||
, image = Some "nginx:1.15.3"
|
||||
, ports = Some
|
||||
[ kubernetes.ContainerPort::{ containerPort = 80 } ]
|
||||
[ kubernetes.ContainerPort::{ containerPort = 80 } ]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
let Prelude =
|
||||
../Prelude.dhall sha256:771c7131fc87e13eb18f770a27c59f9418879f7e230ba2a50e46f4461f43ec69
|
||||
../Prelude.dhall sha256:10db3c919c25e9046833df897a8ffe2701dc390fa0893d958c3430524be5a43e
|
||||
|
||||
let map = Prelude.List.map
|
||||
|
||||
@ -12,31 +12,31 @@ let services = [ { name = "foo", host = "foo.example.com", version = "2.3" } ]
|
||||
|
||||
let makeTLS
|
||||
: Service → kubernetes.IngressTLS.Type
|
||||
= λ(service : Service)
|
||||
→ { hosts = Some [ service.host ]
|
||||
= λ(service : Service) →
|
||||
{ hosts = Some [ service.host ]
|
||||
, secretName = Some "${service.name}-certificate"
|
||||
}
|
||||
|
||||
let makeRule
|
||||
: Service → kubernetes.IngressRule.Type
|
||||
= λ(service : Service)
|
||||
→ { host = Some service.host
|
||||
= λ(service : Service) →
|
||||
{ host = Some service.host
|
||||
, http = Some
|
||||
{ paths =
|
||||
[ { backend =
|
||||
{ serviceName = service.name
|
||||
, servicePort = kubernetes.IntOrString.Int 80
|
||||
}
|
||||
, path = None Text
|
||||
{ paths =
|
||||
[ { backend =
|
||||
{ serviceName = service.name
|
||||
, servicePort = kubernetes.IntOrString.Int 80
|
||||
}
|
||||
]
|
||||
}
|
||||
, path = None Text
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
let mkIngress
|
||||
: List Service → kubernetes.Ingress.Type
|
||||
= λ(inputServices : List Service)
|
||||
→ let annotations =
|
||||
= λ(inputServices : List Service) →
|
||||
let annotations =
|
||||
toMap
|
||||
{ `kubernetes.io/ingress.class` = "nginx"
|
||||
, `kubernetes.io/ingress.allow-http` = "false"
|
||||
|
@ -15,7 +15,7 @@ spec:
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
scheduler.alpha.kubernetes.io/critical-pod: ""
|
||||
scheduler.alpha.kubernetes.io/critical-pod: ''
|
||||
labels:
|
||||
app: aws-iam-authenticator
|
||||
release: wintering-rodent
|
||||
@ -38,7 +38,7 @@ spec:
|
||||
name: output
|
||||
hostNetwork: true
|
||||
nodeSelector:
|
||||
node-role.kubernetes.io/master: ""
|
||||
node-role.kubernetes.io/master: ''
|
||||
tolerations:
|
||||
- effect: NoSchedule
|
||||
key: node-role.kubernetes.io/master
|
||||
|
@ -27,6 +27,6 @@ spec:
|
||||
- containerPort: 80
|
||||
resources:
|
||||
limits:
|
||||
cpu: 500m
|
||||
cpu: "500m"
|
||||
requests:
|
||||
cpu: 10m
|
||||
cpu: "10m"
|
||||
|
@ -2,7 +2,7 @@ apiVersion: networking.k8s.io/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
annotations:
|
||||
kubernetes.io/ingress.allow-http: "false"
|
||||
kubernetes.io/ingress.allow-http: 'false'
|
||||
kubernetes.io/ingress.class: nginx
|
||||
name: nginx
|
||||
spec:
|
||||
|
@ -1,5 +1,5 @@
|
||||
let Prelude =
|
||||
../Prelude.dhall sha256:771c7131fc87e13eb18f770a27c59f9418879f7e230ba2a50e46f4461f43ec69
|
||||
../Prelude.dhall sha256:10db3c919c25e9046833df897a8ffe2701dc390fa0893d958c3430524be5a43e
|
||||
|
||||
let kubernetes =
|
||||
../package.dhall sha256:ca5ddb1035b4740948ee91b380beb10253ff0cd042353cb2ca685de5c0ecec0a
|
||||
@ -8,11 +8,11 @@ let spec =
|
||||
{ selector = Some (toMap { app = "nginx" })
|
||||
, type = Some "NodePort"
|
||||
, ports = Some
|
||||
[ kubernetes.ServicePort::{
|
||||
, targetPort = Some (kubernetes.IntOrString.Int 80)
|
||||
, port = 80
|
||||
}
|
||||
]
|
||||
[ kubernetes.ServicePort::{
|
||||
, targetPort = Some (kubernetes.IntOrString.Int 80)
|
||||
, port = 80
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
let service
|
||||
|
@ -25,5 +25,5 @@
|
||||
-}
|
||||
|
||||
env:DHALL_PRELUDE
|
||||
? https://raw.githubusercontent.com/dhall-lang/dhall-lang/v10.0.0/Prelude/package.dhall sha256:771c7131fc87e13eb18f770a27c59f9418879f7e230ba2a50e46f4461f43ec69
|
||||
? https://raw.githubusercontent.com/dhall-lang/dhall-lang/v10.0.0/Prelude/package.dhall
|
||||
? https://raw.githubusercontent.com/dhall-lang/dhall-lang/v17.0.0/Prelude/package.dhall sha256:10db3c919c25e9046833df897a8ffe2701dc390fa0893d958c3430524be5a43e
|
||||
? https://raw.githubusercontent.com/dhall-lang/dhall-lang/v17.0.0/Prelude/package.dhall
|
||||
|
@ -71,7 +71,7 @@ let deployment =
|
||||
, name = "nginx"
|
||||
, image = Some "nginx:1.15.3"
|
||||
, ports = Some
|
||||
[ kubernetes.ContainerPort::{ containerPort = 80 } ]
|
||||
[ kubernetes.ContainerPort::{ containerPort = 80 } ]
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -143,7 +143,7 @@ Things to note in the following example:
|
||||
-- examples/ingress.dhall
|
||||
|
||||
let Prelude =
|
||||
../Prelude.dhall sha256:771c7131fc87e13eb18f770a27c59f9418879f7e230ba2a50e46f4461f43ec69
|
||||
../Prelude.dhall sha256:10db3c919c25e9046833df897a8ffe2701dc390fa0893d958c3430524be5a43e
|
||||
|
||||
let map = Prelude.List.map
|
||||
|
||||
@ -156,31 +156,31 @@ let services = [ { name = "foo", host = "foo.example.com", version = "2.3" } ]
|
||||
|
||||
let makeTLS
|
||||
: Service → kubernetes.IngressTLS.Type
|
||||
= λ(service : Service)
|
||||
→ { hosts = Some [ service.host ]
|
||||
= λ(service : Service) →
|
||||
{ hosts = Some [ service.host ]
|
||||
, secretName = Some "${service.name}-certificate"
|
||||
}
|
||||
|
||||
let makeRule
|
||||
: Service → kubernetes.IngressRule.Type
|
||||
= λ(service : Service)
|
||||
→ { host = Some service.host
|
||||
= λ(service : Service) →
|
||||
{ host = Some service.host
|
||||
, http = Some
|
||||
{ paths =
|
||||
[ { backend =
|
||||
{ serviceName = service.name
|
||||
, servicePort = kubernetes.IntOrString.Int 80
|
||||
}
|
||||
, path = None Text
|
||||
{ paths =
|
||||
[ { backend =
|
||||
{ serviceName = service.name
|
||||
, servicePort = kubernetes.IntOrString.Int 80
|
||||
}
|
||||
]
|
||||
}
|
||||
, path = None Text
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
let mkIngress
|
||||
: List Service → kubernetes.Ingress.Type
|
||||
= λ(inputServices : List Service)
|
||||
→ let annotations =
|
||||
= λ(inputServices : List Service) →
|
||||
let annotations =
|
||||
toMap
|
||||
{ `kubernetes.io/ingress.class` = "nginx"
|
||||
, `kubernetes.io/ingress.allow-http` = "false"
|
||||
@ -238,7 +238,7 @@ apiVersion: networking.k8s.io/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
annotations:
|
||||
kubernetes.io/ingress.allow-http: "false"
|
||||
kubernetes.io/ingress.allow-http: 'false'
|
||||
kubernetes.io/ingress.class: nginx
|
||||
name: nginx
|
||||
spec:
|
||||
|
@ -16,18 +16,11 @@ let heritage = "dhall"
|
||||
in kubernetes.DaemonSet::{
|
||||
, metadata = kubernetes.ObjectMeta::{
|
||||
, name = Some fullName
|
||||
, labels = Some
|
||||
( toMap
|
||||
{ app = name
|
||||
, chart = chart
|
||||
, release = release
|
||||
, heritage = heritage
|
||||
}
|
||||
)
|
||||
, labels = Some (toMap { app = name, chart, release, heritage })
|
||||
}
|
||||
, spec = Some kubernetes.DaemonSetSpec::{
|
||||
, selector = kubernetes.LabelSelector::{
|
||||
, matchLabels = Some (toMap { app = name, release = release })
|
||||
, matchLabels = Some (toMap { app = name, release })
|
||||
}
|
||||
, updateStrategy = Some kubernetes.DaemonSetUpdateStrategy::{
|
||||
, type = Some "RollingUpdate"
|
||||
@ -37,68 +30,68 @@ in kubernetes.DaemonSet::{
|
||||
, name = Some name
|
||||
, annotations = Some
|
||||
(toMap { `scheduler.alpha.kubernetes.io/critical-pod` = "" })
|
||||
, labels = Some (toMap { app = name, release = release })
|
||||
, labels = Some (toMap { app = name, release })
|
||||
}
|
||||
, spec = Some kubernetes.PodSpec::{
|
||||
, hostNetwork = Some True
|
||||
, nodeSelector = Some
|
||||
(toMap { `node-role.kubernetes.io/master` = "" })
|
||||
, tolerations = Some
|
||||
[ kubernetes.Toleration::{
|
||||
, effect = Some "NoSchedule"
|
||||
, key = Some "node-role.kubernetes.io/master"
|
||||
}
|
||||
, kubernetes.Toleration::{
|
||||
, effect = Some "CriticalAddonsOnly"
|
||||
, key = Some "Exists"
|
||||
}
|
||||
]
|
||||
[ 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 = Some
|
||||
[ "server"
|
||||
, "--config=/etc/aws-iam-authenticator/config.yaml"
|
||||
, "--state-dir=/var/aws-iam-authenticator"
|
||||
, "--generate-kubeconfig=/etc/kubernetes/aws-iam-authenticator/kubeconfig.yaml"
|
||||
]
|
||||
[ "server"
|
||||
, "--config=/etc/aws-iam-authenticator/config.yaml"
|
||||
, "--state-dir=/var/aws-iam-authenticator"
|
||||
, "--generate-kubeconfig=/etc/kubernetes/aws-iam-authenticator/kubeconfig.yaml"
|
||||
]
|
||||
, volumeMounts = Some
|
||||
[ 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/"
|
||||
}
|
||||
]
|
||||
[ 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 = Some
|
||||
[ kubernetes.Volume::{
|
||||
, name = "config"
|
||||
, configMap = Some kubernetes.ConfigMapVolumeSource::{
|
||||
, name = Some fullName
|
||||
}
|
||||
[ 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 = "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/"
|
||||
}
|
||||
}
|
||||
, kubernetes.Volume::{
|
||||
, name = "state"
|
||||
, hostPath = Some kubernetes.HostPathVolumeSource::{
|
||||
, path = "/srv/kubernetes/aws-iam-authenticator/"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
let Prelude =
|
||||
../Prelude.dhall sha256:771c7131fc87e13eb18f770a27c59f9418879f7e230ba2a50e46f4461f43ec69
|
||||
../Prelude.dhall sha256:10db3c919c25e9046833df897a8ffe2701dc390fa0893d958c3430524be5a43e
|
||||
|
||||
let kubernetes =
|
||||
../package.dhall sha256:ae33004411e418e80644ff44593639fcd03216d667817b92db205796afeccd83
|
||||
@ -16,9 +16,9 @@ let deployment =
|
||||
, strategy = Some kubernetes.DeploymentStrategy::{
|
||||
, type = Some "RollingUpdate"
|
||||
, rollingUpdate = Some
|
||||
{ maxSurge = Some (kubernetes.IntOrString.Int 5)
|
||||
, maxUnavailable = Some (kubernetes.IntOrString.Int 0)
|
||||
}
|
||||
{ maxSurge = Some (kubernetes.IntOrString.Int 5)
|
||||
, maxUnavailable = Some (kubernetes.IntOrString.Int 0)
|
||||
}
|
||||
}
|
||||
, template = kubernetes.PodTemplateSpec::{
|
||||
, metadata = kubernetes.ObjectMeta::{
|
||||
@ -32,11 +32,11 @@ let deployment =
|
||||
, image = Some "nginx:1.15.3"
|
||||
, imagePullPolicy = Some "Always"
|
||||
, ports = Some
|
||||
[ kubernetes.ContainerPort::{ containerPort = 80 } ]
|
||||
[ kubernetes.ContainerPort::{ containerPort = 80 } ]
|
||||
, resources = Some
|
||||
{ limits = Some (toMap { cpu = "500m" })
|
||||
, requests = Some (toMap { cpu = "10m" })
|
||||
}
|
||||
{ limits = Some (toMap { cpu = "500m" })
|
||||
, requests = Some (toMap { cpu = "10m" })
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ let deployment =
|
||||
, name = "nginx"
|
||||
, image = Some "nginx:1.15.3"
|
||||
, ports = Some
|
||||
[ kubernetes.ContainerPort::{ containerPort = 80 } ]
|
||||
[ kubernetes.ContainerPort::{ containerPort = 80 } ]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
let Prelude =
|
||||
../Prelude.dhall sha256:771c7131fc87e13eb18f770a27c59f9418879f7e230ba2a50e46f4461f43ec69
|
||||
../Prelude.dhall sha256:10db3c919c25e9046833df897a8ffe2701dc390fa0893d958c3430524be5a43e
|
||||
|
||||
let map = Prelude.List.map
|
||||
|
||||
@ -12,31 +12,31 @@ let services = [ { name = "foo", host = "foo.example.com", version = "2.3" } ]
|
||||
|
||||
let makeTLS
|
||||
: Service → kubernetes.IngressTLS.Type
|
||||
= λ(service : Service)
|
||||
→ { hosts = Some [ service.host ]
|
||||
= λ(service : Service) →
|
||||
{ hosts = Some [ service.host ]
|
||||
, secretName = Some "${service.name}-certificate"
|
||||
}
|
||||
|
||||
let makeRule
|
||||
: Service → kubernetes.IngressRule.Type
|
||||
= λ(service : Service)
|
||||
→ { host = Some service.host
|
||||
= λ(service : Service) →
|
||||
{ host = Some service.host
|
||||
, http = Some
|
||||
{ paths =
|
||||
[ { backend =
|
||||
{ serviceName = service.name
|
||||
, servicePort = kubernetes.IntOrString.Int 80
|
||||
}
|
||||
, path = None Text
|
||||
{ paths =
|
||||
[ { backend =
|
||||
{ serviceName = service.name
|
||||
, servicePort = kubernetes.IntOrString.Int 80
|
||||
}
|
||||
]
|
||||
}
|
||||
, path = None Text
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
let mkIngress
|
||||
: List Service → kubernetes.Ingress.Type
|
||||
= λ(inputServices : List Service)
|
||||
→ let annotations =
|
||||
= λ(inputServices : List Service) →
|
||||
let annotations =
|
||||
toMap
|
||||
{ `kubernetes.io/ingress.class` = "nginx"
|
||||
, `kubernetes.io/ingress.allow-http` = "false"
|
||||
|
@ -15,7 +15,7 @@ spec:
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
scheduler.alpha.kubernetes.io/critical-pod: ""
|
||||
scheduler.alpha.kubernetes.io/critical-pod: ''
|
||||
labels:
|
||||
app: aws-iam-authenticator
|
||||
release: wintering-rodent
|
||||
@ -38,7 +38,7 @@ spec:
|
||||
name: output
|
||||
hostNetwork: true
|
||||
nodeSelector:
|
||||
node-role.kubernetes.io/master: ""
|
||||
node-role.kubernetes.io/master: ''
|
||||
tolerations:
|
||||
- effect: NoSchedule
|
||||
key: node-role.kubernetes.io/master
|
||||
|
@ -27,6 +27,6 @@ spec:
|
||||
- containerPort: 80
|
||||
resources:
|
||||
limits:
|
||||
cpu: 500m
|
||||
cpu: "500m"
|
||||
requests:
|
||||
cpu: 10m
|
||||
cpu: "10m"
|
||||
|
@ -2,7 +2,7 @@ apiVersion: networking.k8s.io/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
annotations:
|
||||
kubernetes.io/ingress.allow-http: "false"
|
||||
kubernetes.io/ingress.allow-http: 'false'
|
||||
kubernetes.io/ingress.class: nginx
|
||||
name: nginx
|
||||
spec:
|
||||
|
@ -1,5 +1,5 @@
|
||||
let Prelude =
|
||||
../Prelude.dhall sha256:771c7131fc87e13eb18f770a27c59f9418879f7e230ba2a50e46f4461f43ec69
|
||||
../Prelude.dhall sha256:10db3c919c25e9046833df897a8ffe2701dc390fa0893d958c3430524be5a43e
|
||||
|
||||
let kubernetes =
|
||||
../package.dhall sha256:ae33004411e418e80644ff44593639fcd03216d667817b92db205796afeccd83
|
||||
@ -8,11 +8,11 @@ let spec =
|
||||
{ selector = Some (toMap { app = "nginx" })
|
||||
, type = Some "NodePort"
|
||||
, ports = Some
|
||||
[ kubernetes.ServicePort::{
|
||||
, targetPort = Some (kubernetes.IntOrString.Int 80)
|
||||
, port = 80
|
||||
}
|
||||
]
|
||||
[ kubernetes.ServicePort::{
|
||||
, targetPort = Some (kubernetes.IntOrString.Int 80)
|
||||
, port = 80
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
let service
|
||||
|
@ -25,5 +25,5 @@
|
||||
-}
|
||||
|
||||
env:DHALL_PRELUDE
|
||||
? https://raw.githubusercontent.com/dhall-lang/dhall-lang/v10.0.0/Prelude/package.dhall sha256:771c7131fc87e13eb18f770a27c59f9418879f7e230ba2a50e46f4461f43ec69
|
||||
? https://raw.githubusercontent.com/dhall-lang/dhall-lang/v10.0.0/Prelude/package.dhall
|
||||
? https://raw.githubusercontent.com/dhall-lang/dhall-lang/v17.0.0/Prelude/package.dhall sha256:10db3c919c25e9046833df897a8ffe2701dc390fa0893d958c3430524be5a43e
|
||||
? https://raw.githubusercontent.com/dhall-lang/dhall-lang/v17.0.0/Prelude/package.dhall
|
||||
|
@ -71,7 +71,7 @@ let deployment =
|
||||
, name = "nginx"
|
||||
, image = Some "nginx:1.15.3"
|
||||
, ports = Some
|
||||
[ kubernetes.ContainerPort::{ containerPort = 80 } ]
|
||||
[ kubernetes.ContainerPort::{ containerPort = 80 } ]
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -143,7 +143,7 @@ Things to note in the following example:
|
||||
-- examples/ingress.dhall
|
||||
|
||||
let Prelude =
|
||||
../Prelude.dhall sha256:771c7131fc87e13eb18f770a27c59f9418879f7e230ba2a50e46f4461f43ec69
|
||||
../Prelude.dhall sha256:10db3c919c25e9046833df897a8ffe2701dc390fa0893d958c3430524be5a43e
|
||||
|
||||
let map = Prelude.List.map
|
||||
|
||||
@ -156,31 +156,31 @@ let services = [ { name = "foo", host = "foo.example.com", version = "2.3" } ]
|
||||
|
||||
let makeTLS
|
||||
: Service → kubernetes.IngressTLS.Type
|
||||
= λ(service : Service)
|
||||
→ { hosts = Some [ service.host ]
|
||||
= λ(service : Service) →
|
||||
{ hosts = Some [ service.host ]
|
||||
, secretName = Some "${service.name}-certificate"
|
||||
}
|
||||
|
||||
let makeRule
|
||||
: Service → kubernetes.IngressRule.Type
|
||||
= λ(service : Service)
|
||||
→ { host = Some service.host
|
||||
= λ(service : Service) →
|
||||
{ host = Some service.host
|
||||
, http = Some
|
||||
{ paths =
|
||||
[ { backend =
|
||||
{ serviceName = service.name
|
||||
, servicePort = kubernetes.IntOrString.Int 80
|
||||
}
|
||||
, path = None Text
|
||||
{ paths =
|
||||
[ { backend =
|
||||
{ serviceName = service.name
|
||||
, servicePort = kubernetes.IntOrString.Int 80
|
||||
}
|
||||
]
|
||||
}
|
||||
, path = None Text
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
let mkIngress
|
||||
: List Service → kubernetes.Ingress.Type
|
||||
= λ(inputServices : List Service)
|
||||
→ let annotations =
|
||||
= λ(inputServices : List Service) →
|
||||
let annotations =
|
||||
toMap
|
||||
{ `kubernetes.io/ingress.class` = "nginx"
|
||||
, `kubernetes.io/ingress.allow-http` = "false"
|
||||
@ -238,7 +238,7 @@ apiVersion: networking.k8s.io/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
annotations:
|
||||
kubernetes.io/ingress.allow-http: "false"
|
||||
kubernetes.io/ingress.allow-http: 'false'
|
||||
kubernetes.io/ingress.class: nginx
|
||||
name: nginx
|
||||
spec:
|
||||
|
@ -16,18 +16,11 @@ let heritage = "dhall"
|
||||
in kubernetes.DaemonSet::{
|
||||
, metadata = kubernetes.ObjectMeta::{
|
||||
, name = Some fullName
|
||||
, labels = Some
|
||||
( toMap
|
||||
{ app = name
|
||||
, chart = chart
|
||||
, release = release
|
||||
, heritage = heritage
|
||||
}
|
||||
)
|
||||
, labels = Some (toMap { app = name, chart, release, heritage })
|
||||
}
|
||||
, spec = Some kubernetes.DaemonSetSpec::{
|
||||
, selector = kubernetes.LabelSelector::{
|
||||
, matchLabels = Some (toMap { app = name, release = release })
|
||||
, matchLabels = Some (toMap { app = name, release })
|
||||
}
|
||||
, updateStrategy = Some kubernetes.DaemonSetUpdateStrategy::{
|
||||
, type = Some "RollingUpdate"
|
||||
@ -37,68 +30,68 @@ in kubernetes.DaemonSet::{
|
||||
, name = Some name
|
||||
, annotations = Some
|
||||
(toMap { `scheduler.alpha.kubernetes.io/critical-pod` = "" })
|
||||
, labels = Some (toMap { app = name, release = release })
|
||||
, labels = Some (toMap { app = name, release })
|
||||
}
|
||||
, spec = Some kubernetes.PodSpec::{
|
||||
, hostNetwork = Some True
|
||||
, nodeSelector = Some
|
||||
(toMap { `node-role.kubernetes.io/master` = "" })
|
||||
, tolerations = Some
|
||||
[ kubernetes.Toleration::{
|
||||
, effect = Some "NoSchedule"
|
||||
, key = Some "node-role.kubernetes.io/master"
|
||||
}
|
||||
, kubernetes.Toleration::{
|
||||
, effect = Some "CriticalAddonsOnly"
|
||||
, key = Some "Exists"
|
||||
}
|
||||
]
|
||||
[ 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 = Some
|
||||
[ "server"
|
||||
, "--config=/etc/aws-iam-authenticator/config.yaml"
|
||||
, "--state-dir=/var/aws-iam-authenticator"
|
||||
, "--generate-kubeconfig=/etc/kubernetes/aws-iam-authenticator/kubeconfig.yaml"
|
||||
]
|
||||
[ "server"
|
||||
, "--config=/etc/aws-iam-authenticator/config.yaml"
|
||||
, "--state-dir=/var/aws-iam-authenticator"
|
||||
, "--generate-kubeconfig=/etc/kubernetes/aws-iam-authenticator/kubeconfig.yaml"
|
||||
]
|
||||
, volumeMounts = Some
|
||||
[ 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/"
|
||||
}
|
||||
]
|
||||
[ 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 = Some
|
||||
[ kubernetes.Volume::{
|
||||
, name = "config"
|
||||
, configMap = Some kubernetes.ConfigMapVolumeSource::{
|
||||
, name = Some fullName
|
||||
}
|
||||
[ 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 = "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/"
|
||||
}
|
||||
}
|
||||
, kubernetes.Volume::{
|
||||
, name = "state"
|
||||
, hostPath = Some kubernetes.HostPathVolumeSource::{
|
||||
, path = "/srv/kubernetes/aws-iam-authenticator/"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
let Prelude =
|
||||
../Prelude.dhall sha256:771c7131fc87e13eb18f770a27c59f9418879f7e230ba2a50e46f4461f43ec69
|
||||
../Prelude.dhall sha256:10db3c919c25e9046833df897a8ffe2701dc390fa0893d958c3430524be5a43e
|
||||
|
||||
let kubernetes =
|
||||
../package.dhall sha256:1b741038994df16ced6eaa17908bfedf535634c7a0ac4f82ce48cde26bc07a76
|
||||
@ -16,9 +16,9 @@ let deployment =
|
||||
, strategy = Some kubernetes.DeploymentStrategy::{
|
||||
, type = Some "RollingUpdate"
|
||||
, rollingUpdate = Some
|
||||
{ maxSurge = Some (kubernetes.IntOrString.Int 5)
|
||||
, maxUnavailable = Some (kubernetes.IntOrString.Int 0)
|
||||
}
|
||||
{ maxSurge = Some (kubernetes.IntOrString.Int 5)
|
||||
, maxUnavailable = Some (kubernetes.IntOrString.Int 0)
|
||||
}
|
||||
}
|
||||
, template = kubernetes.PodTemplateSpec::{
|
||||
, metadata = kubernetes.ObjectMeta::{
|
||||
@ -32,11 +32,11 @@ let deployment =
|
||||
, image = Some "nginx:1.15.3"
|
||||
, imagePullPolicy = Some "Always"
|
||||
, ports = Some
|
||||
[ kubernetes.ContainerPort::{ containerPort = 80 } ]
|
||||
[ kubernetes.ContainerPort::{ containerPort = 80 } ]
|
||||
, resources = Some
|
||||
{ limits = Some (toMap { cpu = "500m" })
|
||||
, requests = Some (toMap { cpu = "10m" })
|
||||
}
|
||||
{ limits = Some (toMap { cpu = "500m" })
|
||||
, requests = Some (toMap { cpu = "10m" })
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ let deployment =
|
||||
, name = "nginx"
|
||||
, image = Some "nginx:1.15.3"
|
||||
, ports = Some
|
||||
[ kubernetes.ContainerPort::{ containerPort = 80 } ]
|
||||
[ kubernetes.ContainerPort::{ containerPort = 80 } ]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
let Prelude =
|
||||
../Prelude.dhall sha256:771c7131fc87e13eb18f770a27c59f9418879f7e230ba2a50e46f4461f43ec69
|
||||
../Prelude.dhall sha256:10db3c919c25e9046833df897a8ffe2701dc390fa0893d958c3430524be5a43e
|
||||
|
||||
let map = Prelude.List.map
|
||||
|
||||
@ -12,31 +12,31 @@ let services = [ { name = "foo", host = "foo.example.com", version = "2.3" } ]
|
||||
|
||||
let makeTLS
|
||||
: Service → kubernetes.IngressTLS.Type
|
||||
= λ(service : Service)
|
||||
→ { hosts = Some [ service.host ]
|
||||
= λ(service : Service) →
|
||||
{ hosts = Some [ service.host ]
|
||||
, secretName = Some "${service.name}-certificate"
|
||||
}
|
||||
|
||||
let makeRule
|
||||
: Service → kubernetes.IngressRule.Type
|
||||
= λ(service : Service)
|
||||
→ { host = Some service.host
|
||||
= λ(service : Service) →
|
||||
{ host = Some service.host
|
||||
, http = Some
|
||||
{ paths =
|
||||
[ { backend =
|
||||
{ serviceName = service.name
|
||||
, servicePort = kubernetes.IntOrString.Int 80
|
||||
}
|
||||
, path = None Text
|
||||
{ paths =
|
||||
[ { backend =
|
||||
{ serviceName = service.name
|
||||
, servicePort = kubernetes.IntOrString.Int 80
|
||||
}
|
||||
]
|
||||
}
|
||||
, path = None Text
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
let mkIngress
|
||||
: List Service → kubernetes.Ingress.Type
|
||||
= λ(inputServices : List Service)
|
||||
→ let annotations =
|
||||
= λ(inputServices : List Service) →
|
||||
let annotations =
|
||||
toMap
|
||||
{ `kubernetes.io/ingress.class` = "nginx"
|
||||
, `kubernetes.io/ingress.allow-http` = "false"
|
||||
|
@ -15,7 +15,7 @@ spec:
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
scheduler.alpha.kubernetes.io/critical-pod: ""
|
||||
scheduler.alpha.kubernetes.io/critical-pod: ''
|
||||
labels:
|
||||
app: aws-iam-authenticator
|
||||
release: wintering-rodent
|
||||
@ -38,7 +38,7 @@ spec:
|
||||
name: output
|
||||
hostNetwork: true
|
||||
nodeSelector:
|
||||
node-role.kubernetes.io/master: ""
|
||||
node-role.kubernetes.io/master: ''
|
||||
tolerations:
|
||||
- effect: NoSchedule
|
||||
key: node-role.kubernetes.io/master
|
||||
|
@ -27,6 +27,6 @@ spec:
|
||||
- containerPort: 80
|
||||
resources:
|
||||
limits:
|
||||
cpu: 500m
|
||||
cpu: "500m"
|
||||
requests:
|
||||
cpu: 10m
|
||||
cpu: "10m"
|
||||
|
@ -2,7 +2,7 @@ apiVersion: networking.k8s.io/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
annotations:
|
||||
kubernetes.io/ingress.allow-http: "false"
|
||||
kubernetes.io/ingress.allow-http: 'false'
|
||||
kubernetes.io/ingress.class: nginx
|
||||
name: nginx
|
||||
spec:
|
||||
|
@ -1,5 +1,5 @@
|
||||
let Prelude =
|
||||
../Prelude.dhall sha256:771c7131fc87e13eb18f770a27c59f9418879f7e230ba2a50e46f4461f43ec69
|
||||
../Prelude.dhall sha256:10db3c919c25e9046833df897a8ffe2701dc390fa0893d958c3430524be5a43e
|
||||
|
||||
let kubernetes =
|
||||
../package.dhall sha256:1b741038994df16ced6eaa17908bfedf535634c7a0ac4f82ce48cde26bc07a76
|
||||
@ -8,11 +8,11 @@ let spec =
|
||||
{ selector = Some (toMap { app = "nginx" })
|
||||
, type = Some "NodePort"
|
||||
, ports = Some
|
||||
[ kubernetes.ServicePort::{
|
||||
, targetPort = Some (kubernetes.IntOrString.Int 80)
|
||||
, port = 80
|
||||
}
|
||||
]
|
||||
[ kubernetes.ServicePort::{
|
||||
, targetPort = Some (kubernetes.IntOrString.Int 80)
|
||||
, port = 80
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
let service
|
||||
|
@ -25,5 +25,5 @@
|
||||
-}
|
||||
|
||||
env:DHALL_PRELUDE
|
||||
? https://raw.githubusercontent.com/dhall-lang/dhall-lang/v10.0.0/Prelude/package.dhall sha256:771c7131fc87e13eb18f770a27c59f9418879f7e230ba2a50e46f4461f43ec69
|
||||
? https://raw.githubusercontent.com/dhall-lang/dhall-lang/v10.0.0/Prelude/package.dhall
|
||||
? https://raw.githubusercontent.com/dhall-lang/dhall-lang/v17.0.0/Prelude/package.dhall sha256:10db3c919c25e9046833df897a8ffe2701dc390fa0893d958c3430524be5a43e
|
||||
? https://raw.githubusercontent.com/dhall-lang/dhall-lang/v17.0.0/Prelude/package.dhall
|
||||
|
@ -71,7 +71,7 @@ let deployment =
|
||||
, name = "nginx"
|
||||
, image = Some "nginx:1.15.3"
|
||||
, ports = Some
|
||||
[ kubernetes.ContainerPort::{ containerPort = 80 } ]
|
||||
[ kubernetes.ContainerPort::{ containerPort = 80 } ]
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -143,7 +143,7 @@ Things to note in the following example:
|
||||
-- examples/ingress.dhall
|
||||
|
||||
let Prelude =
|
||||
../Prelude.dhall sha256:771c7131fc87e13eb18f770a27c59f9418879f7e230ba2a50e46f4461f43ec69
|
||||
../Prelude.dhall sha256:10db3c919c25e9046833df897a8ffe2701dc390fa0893d958c3430524be5a43e
|
||||
|
||||
let map = Prelude.List.map
|
||||
|
||||
@ -156,31 +156,31 @@ let services = [ { name = "foo", host = "foo.example.com", version = "2.3" } ]
|
||||
|
||||
let makeTLS
|
||||
: Service → kubernetes.IngressTLS.Type
|
||||
= λ(service : Service)
|
||||
→ { hosts = Some [ service.host ]
|
||||
= λ(service : Service) →
|
||||
{ hosts = Some [ service.host ]
|
||||
, secretName = Some "${service.name}-certificate"
|
||||
}
|
||||
|
||||
let makeRule
|
||||
: Service → kubernetes.IngressRule.Type
|
||||
= λ(service : Service)
|
||||
→ { host = Some service.host
|
||||
= λ(service : Service) →
|
||||
{ host = Some service.host
|
||||
, http = Some
|
||||
{ paths =
|
||||
[ { backend =
|
||||
{ serviceName = service.name
|
||||
, servicePort = kubernetes.IntOrString.Int 80
|
||||
}
|
||||
, path = None Text
|
||||
{ paths =
|
||||
[ { backend =
|
||||
{ serviceName = service.name
|
||||
, servicePort = kubernetes.IntOrString.Int 80
|
||||
}
|
||||
]
|
||||
}
|
||||
, path = None Text
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
let mkIngress
|
||||
: List Service → kubernetes.Ingress.Type
|
||||
= λ(inputServices : List Service)
|
||||
→ let annotations =
|
||||
= λ(inputServices : List Service) →
|
||||
let annotations =
|
||||
toMap
|
||||
{ `kubernetes.io/ingress.class` = "nginx"
|
||||
, `kubernetes.io/ingress.allow-http` = "false"
|
||||
@ -238,7 +238,7 @@ apiVersion: networking.k8s.io/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
annotations:
|
||||
kubernetes.io/ingress.allow-http: "false"
|
||||
kubernetes.io/ingress.allow-http: 'false'
|
||||
kubernetes.io/ingress.class: nginx
|
||||
name: nginx
|
||||
spec:
|
||||
|
@ -16,18 +16,11 @@ let heritage = "dhall"
|
||||
in kubernetes.DaemonSet::{
|
||||
, metadata = kubernetes.ObjectMeta::{
|
||||
, name = Some fullName
|
||||
, labels = Some
|
||||
( toMap
|
||||
{ app = name
|
||||
, chart = chart
|
||||
, release = release
|
||||
, heritage = heritage
|
||||
}
|
||||
)
|
||||
, labels = Some (toMap { app = name, chart, release, heritage })
|
||||
}
|
||||
, spec = Some kubernetes.DaemonSetSpec::{
|
||||
, selector = kubernetes.LabelSelector::{
|
||||
, matchLabels = Some (toMap { app = name, release = release })
|
||||
, matchLabels = Some (toMap { app = name, release })
|
||||
}
|
||||
, updateStrategy = Some kubernetes.DaemonSetUpdateStrategy::{
|
||||
, type = Some "RollingUpdate"
|
||||
@ -37,68 +30,68 @@ in kubernetes.DaemonSet::{
|
||||
, name = Some name
|
||||
, annotations = Some
|
||||
(toMap { `scheduler.alpha.kubernetes.io/critical-pod` = "" })
|
||||
, labels = Some (toMap { app = name, release = release })
|
||||
, labels = Some (toMap { app = name, release })
|
||||
}
|
||||
, spec = Some kubernetes.PodSpec::{
|
||||
, hostNetwork = Some True
|
||||
, nodeSelector = Some
|
||||
(toMap { `node-role.kubernetes.io/master` = "" })
|
||||
, tolerations = Some
|
||||
[ kubernetes.Toleration::{
|
||||
, effect = Some "NoSchedule"
|
||||
, key = Some "node-role.kubernetes.io/master"
|
||||
}
|
||||
, kubernetes.Toleration::{
|
||||
, effect = Some "CriticalAddonsOnly"
|
||||
, key = Some "Exists"
|
||||
}
|
||||
]
|
||||
[ 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 = Some
|
||||
[ "server"
|
||||
, "--config=/etc/aws-iam-authenticator/config.yaml"
|
||||
, "--state-dir=/var/aws-iam-authenticator"
|
||||
, "--generate-kubeconfig=/etc/kubernetes/aws-iam-authenticator/kubeconfig.yaml"
|
||||
]
|
||||
[ "server"
|
||||
, "--config=/etc/aws-iam-authenticator/config.yaml"
|
||||
, "--state-dir=/var/aws-iam-authenticator"
|
||||
, "--generate-kubeconfig=/etc/kubernetes/aws-iam-authenticator/kubeconfig.yaml"
|
||||
]
|
||||
, volumeMounts = Some
|
||||
[ 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/"
|
||||
}
|
||||
]
|
||||
[ 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 = Some
|
||||
[ kubernetes.Volume::{
|
||||
, name = "config"
|
||||
, configMap = Some kubernetes.ConfigMapVolumeSource::{
|
||||
, name = Some fullName
|
||||
}
|
||||
[ 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 = "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/"
|
||||
}
|
||||
}
|
||||
, kubernetes.Volume::{
|
||||
, name = "state"
|
||||
, hostPath = Some kubernetes.HostPathVolumeSource::{
|
||||
, path = "/srv/kubernetes/aws-iam-authenticator/"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
let Prelude =
|
||||
../Prelude.dhall sha256:771c7131fc87e13eb18f770a27c59f9418879f7e230ba2a50e46f4461f43ec69
|
||||
../Prelude.dhall sha256:10db3c919c25e9046833df897a8ffe2701dc390fa0893d958c3430524be5a43e
|
||||
|
||||
let kubernetes =
|
||||
../package.dhall sha256:7150ac4309a091740321a3a3582e7695ee4b81732ce8f1ed1691c1c52791daa1
|
||||
@ -16,9 +16,9 @@ let deployment =
|
||||
, strategy = Some kubernetes.DeploymentStrategy::{
|
||||
, type = Some "RollingUpdate"
|
||||
, rollingUpdate = Some
|
||||
{ maxSurge = Some (kubernetes.IntOrString.Int 5)
|
||||
, maxUnavailable = Some (kubernetes.IntOrString.Int 0)
|
||||
}
|
||||
{ maxSurge = Some (kubernetes.IntOrString.Int 5)
|
||||
, maxUnavailable = Some (kubernetes.IntOrString.Int 0)
|
||||
}
|
||||
}
|
||||
, template = kubernetes.PodTemplateSpec::{
|
||||
, metadata = kubernetes.ObjectMeta::{
|
||||
@ -32,11 +32,11 @@ let deployment =
|
||||
, image = Some "nginx:1.15.3"
|
||||
, imagePullPolicy = Some "Always"
|
||||
, ports = Some
|
||||
[ kubernetes.ContainerPort::{ containerPort = 80 } ]
|
||||
[ kubernetes.ContainerPort::{ containerPort = 80 } ]
|
||||
, resources = Some
|
||||
{ limits = Some (toMap { cpu = "500m" })
|
||||
, requests = Some (toMap { cpu = "10m" })
|
||||
}
|
||||
{ limits = Some (toMap { cpu = "500m" })
|
||||
, requests = Some (toMap { cpu = "10m" })
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ let deployment =
|
||||
, name = "nginx"
|
||||
, image = Some "nginx:1.15.3"
|
||||
, ports = Some
|
||||
[ kubernetes.ContainerPort::{ containerPort = 80 } ]
|
||||
[ kubernetes.ContainerPort::{ containerPort = 80 } ]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
let Prelude =
|
||||
../Prelude.dhall sha256:771c7131fc87e13eb18f770a27c59f9418879f7e230ba2a50e46f4461f43ec69
|
||||
../Prelude.dhall sha256:10db3c919c25e9046833df897a8ffe2701dc390fa0893d958c3430524be5a43e
|
||||
|
||||
let map = Prelude.List.map
|
||||
|
||||
@ -12,31 +12,31 @@ let services = [ { name = "foo", host = "foo.example.com", version = "2.3" } ]
|
||||
|
||||
let makeTLS
|
||||
: Service → kubernetes.IngressTLS.Type
|
||||
= λ(service : Service)
|
||||
→ { hosts = Some [ service.host ]
|
||||
= λ(service : Service) →
|
||||
{ hosts = Some [ service.host ]
|
||||
, secretName = Some "${service.name}-certificate"
|
||||
}
|
||||
|
||||
let makeRule
|
||||
: Service → kubernetes.IngressRule.Type
|
||||
= λ(service : Service)
|
||||
→ { host = Some service.host
|
||||
= λ(service : Service) →
|
||||
{ host = Some service.host
|
||||
, http = Some
|
||||
{ paths =
|
||||
[ { backend =
|
||||
{ serviceName = service.name
|
||||
, servicePort = kubernetes.IntOrString.Int 80
|
||||
}
|
||||
, path = None Text
|
||||
{ paths =
|
||||
[ { backend =
|
||||
{ serviceName = service.name
|
||||
, servicePort = kubernetes.IntOrString.Int 80
|
||||
}
|
||||
]
|
||||
}
|
||||
, path = None Text
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
let mkIngress
|
||||
: List Service → kubernetes.Ingress.Type
|
||||
= λ(inputServices : List Service)
|
||||
→ let annotations =
|
||||
= λ(inputServices : List Service) →
|
||||
let annotations =
|
||||
toMap
|
||||
{ `kubernetes.io/ingress.class` = "nginx"
|
||||
, `kubernetes.io/ingress.allow-http` = "false"
|
||||
|
@ -15,7 +15,7 @@ spec:
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
scheduler.alpha.kubernetes.io/critical-pod: ""
|
||||
scheduler.alpha.kubernetes.io/critical-pod: ''
|
||||
labels:
|
||||
app: aws-iam-authenticator
|
||||
release: wintering-rodent
|
||||
@ -38,7 +38,7 @@ spec:
|
||||
name: output
|
||||
hostNetwork: true
|
||||
nodeSelector:
|
||||
node-role.kubernetes.io/master: ""
|
||||
node-role.kubernetes.io/master: ''
|
||||
tolerations:
|
||||
- effect: NoSchedule
|
||||
key: node-role.kubernetes.io/master
|
||||
|
@ -27,6 +27,6 @@ spec:
|
||||
- containerPort: 80
|
||||
resources:
|
||||
limits:
|
||||
cpu: 500m
|
||||
cpu: "500m"
|
||||
requests:
|
||||
cpu: 10m
|
||||
cpu: "10m"
|
||||
|
@ -2,7 +2,7 @@ apiVersion: networking.k8s.io/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
annotations:
|
||||
kubernetes.io/ingress.allow-http: "false"
|
||||
kubernetes.io/ingress.allow-http: 'false'
|
||||
kubernetes.io/ingress.class: nginx
|
||||
name: nginx
|
||||
spec:
|
||||
|
@ -1,5 +1,5 @@
|
||||
let Prelude =
|
||||
../Prelude.dhall sha256:771c7131fc87e13eb18f770a27c59f9418879f7e230ba2a50e46f4461f43ec69
|
||||
../Prelude.dhall sha256:10db3c919c25e9046833df897a8ffe2701dc390fa0893d958c3430524be5a43e
|
||||
|
||||
let kubernetes =
|
||||
../package.dhall sha256:7150ac4309a091740321a3a3582e7695ee4b81732ce8f1ed1691c1c52791daa1
|
||||
@ -8,11 +8,11 @@ let spec =
|
||||
{ selector = Some (toMap { app = "nginx" })
|
||||
, type = Some "NodePort"
|
||||
, ports = Some
|
||||
[ kubernetes.ServicePort::{
|
||||
, targetPort = Some (kubernetes.IntOrString.Int 80)
|
||||
, port = 80
|
||||
}
|
||||
]
|
||||
[ kubernetes.ServicePort::{
|
||||
, targetPort = Some (kubernetes.IntOrString.Int 80)
|
||||
, port = 80
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
let service
|
||||
|
@ -25,5 +25,5 @@
|
||||
-}
|
||||
|
||||
env:DHALL_PRELUDE
|
||||
? https://raw.githubusercontent.com/dhall-lang/dhall-lang/v10.0.0/Prelude/package.dhall sha256:771c7131fc87e13eb18f770a27c59f9418879f7e230ba2a50e46f4461f43ec69
|
||||
? https://raw.githubusercontent.com/dhall-lang/dhall-lang/v10.0.0/Prelude/package.dhall
|
||||
? https://raw.githubusercontent.com/dhall-lang/dhall-lang/v17.0.0/Prelude/package.dhall sha256:10db3c919c25e9046833df897a8ffe2701dc390fa0893d958c3430524be5a43e
|
||||
? https://raw.githubusercontent.com/dhall-lang/dhall-lang/v17.0.0/Prelude/package.dhall
|
||||
|
@ -23,9 +23,9 @@ executable dhall-kubernetes-generator
|
||||
base >= 4.8.2.0 && < 5 ,
|
||||
aeson >= 1.0.0.0 && < 1.5 ,
|
||||
containers >= 0.5.0.0 && < 0.7 ,
|
||||
dhall >= 1.22.0 && < 1.30 ,
|
||||
megaparsec >= 7.0 && < 7.1 ,
|
||||
optparse-applicative >= 0.14.3.0 && < 0.15 ,
|
||||
dhall >= 1.22.0 && < 1.34 ,
|
||||
megaparsec >= 7.0 && < 8.1 ,
|
||||
optparse-applicative >= 0.14.3.0 && < 0.16 ,
|
||||
parser-combinators >= 1.0.3 && < 1.3 ,
|
||||
prettyprinter >= 1.2.0.1 && < 1.7 ,
|
||||
sort >= 1.0 && < 1.1 ,
|
||||
|
@ -11,6 +11,7 @@ import Data.Text (Text, pack)
|
||||
import Data.Void (Void)
|
||||
import Data.Yaml
|
||||
import Dhall.Core (Expr(..))
|
||||
import Dhall.Format (Format(..))
|
||||
import Dhall.Kubernetes.Data (patchCyclicImports)
|
||||
import Numeric.Natural (Natural)
|
||||
import Text.Megaparsec (Parsec, some, parse, (<|>), errorBundlePretty)
|
||||
@ -57,8 +58,9 @@ writeDhall path expr = do
|
||||
|
||||
let censor = Dhall.Util.NoCensor
|
||||
|
||||
let formatMode =
|
||||
Dhall.Format.Modify (Dhall.Util.InputFile (Turtle.encodeString path))
|
||||
let outputMode = Dhall.Util.Write
|
||||
|
||||
let input = Dhall.Util.InputFile (Turtle.encodeString path)
|
||||
|
||||
let formatOptions = Dhall.Format.Format{..}
|
||||
|
||||
@ -278,6 +280,7 @@ main = do
|
||||
|
||||
let package =
|
||||
Combine
|
||||
Nothing
|
||||
(Embed (Convert.mkImport prefixMap [ ] "schemas.dhall"))
|
||||
(RecordLit
|
||||
[ ( "IntOrString"
|
||||
|
@ -1,9 +1,7 @@
|
||||
resolver: lts-13.27
|
||||
resolver: lts-15.3
|
||||
allow-newer: true
|
||||
packages:
|
||||
- .
|
||||
extra-deps:
|
||||
- dhall-1.27.0
|
||||
- dhall-json-1.5.0
|
||||
- th-lift-0.8.0.1
|
||||
- th-lift-instances-0.1.14
|
||||
- katip-0.8.3.0@sha256:8a67c0aec3ba1f0eabcfae443cb909e4cf9405e29bac99ccf1420f1f1bbda9c4,4097
|
||||
- dhall-1.33.0
|
||||
- dhall-json-1.7.0
|
||||
|
@ -5,50 +5,22 @@
|
||||
|
||||
packages:
|
||||
- completed:
|
||||
hackage: dhall-1.27.0@sha256:b522d6b534949e65771ed0179afc1488e4de2b185af5ed38e4806a6720db51bf,30519
|
||||
hackage: dhall-1.33.0@sha256:a291ed94aedcbbac3d3bc381b6597d25441cac4974d263c0173e829f37e63ce5,33324
|
||||
pantry-tree:
|
||||
size: 232998
|
||||
sha256: 3f79ba6a3eeb0f59c1cf41663d65eebe71f5780f5765169e3d52406789a6f286
|
||||
size: 281838
|
||||
sha256: 07168d492e30a7c964a9fda4108d6f2c3f95f2680cc3499783ca701a42f50926
|
||||
original:
|
||||
hackage: dhall-1.27.0
|
||||
hackage: dhall-1.33.0
|
||||
- completed:
|
||||
hackage: dhall-json-1.5.0@sha256:cf5ba9c349539715ba3a9642fbd56e905b1a7675ac82ea48ee4a67bc34446872,5644
|
||||
hackage: dhall-json-1.7.0@sha256:1512b0783407796f610ad4954fa13abe0e484b7f4f6f5488cb0e25062f2379f5,4597
|
||||
pantry-tree:
|
||||
size: 3601
|
||||
sha256: 109a2d85c440e3e0371da886ab1ddf004d51b0c20a1e61a8195e74bc0459802f
|
||||
size: 5299
|
||||
sha256: 135873df71073467f68c07ef30c2284bb00ee479d96a29a11afef3cc551e1538
|
||||
original:
|
||||
hackage: dhall-json-1.5.0
|
||||
- completed:
|
||||
hackage: th-lift-0.8.0.1@sha256:cceb81b12c0580e02a7a3898b6d60cca5e1be080741f69ddde4f12210d8ba7ca,1960
|
||||
pantry-tree:
|
||||
size: 461
|
||||
sha256: 7ed900048c8722069edb6063023d89343f056ca305be598f51f166bd389621df
|
||||
original:
|
||||
hackage: th-lift-0.8.0.1
|
||||
- completed:
|
||||
hackage: th-lift-instances-0.1.14@sha256:351314ffad77a5ba49439accb50d3baf9de0186ab1d8d207e88ed698f1becc5e,2625
|
||||
pantry-tree:
|
||||
size: 526
|
||||
sha256: ef2728ea6af150cf4514254b3ef74f16d8bf6f3c52f4c26a4f2625fceee6fd76
|
||||
original:
|
||||
hackage: th-lift-instances-0.1.14
|
||||
- completed:
|
||||
hackage: kubernetes-client-core-0.1.0.1@sha256:8751cc7ba60a9a3adc6b88da67539cd7a5ff42fc3128cb98f3a76033f03ff063,6467
|
||||
pantry-tree:
|
||||
size: 6855
|
||||
sha256: 75a3056503249f8dfcbb0067264c46d1da4126b02cfb406d4dab13f72c71e41d
|
||||
original:
|
||||
hackage: kubernetes-client-core-0.1.0.1@sha256:8751cc7ba60a9a3adc6b88da67539cd7a5ff42fc3128cb98f3a76033f03ff063,6467
|
||||
- completed:
|
||||
hackage: katip-0.8.3.0@sha256:8a67c0aec3ba1f0eabcfae443cb909e4cf9405e29bac99ccf1420f1f1bbda9c4,4097
|
||||
pantry-tree:
|
||||
size: 1140
|
||||
sha256: cad8c67256ec85819309d77bdcbc15b67885940ef76f2b850c8be20c2efd0149
|
||||
original:
|
||||
hackage: katip-0.8.3.0@sha256:8a67c0aec3ba1f0eabcfae443cb909e4cf9405e29bac99ccf1420f1f1bbda9c4,4097
|
||||
hackage: dhall-json-1.7.0
|
||||
snapshots:
|
||||
- completed:
|
||||
size: 500539
|
||||
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/13/27.yaml
|
||||
sha256: 690db832392afe55733b4c7023fd29b1b1c660ee42f1fb505b86b07394ca994e
|
||||
original: lts-13.27
|
||||
size: 491373
|
||||
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/15/3.yaml
|
||||
sha256: 29e9ff61b8bf4b4fcff55cde3ac106ebb971f0d21331dccac9eee63374fa6ca8
|
||||
original: lts-15.3
|
||||
|
@ -1,20 +0,0 @@
|
||||
{ mkDerivation, aeson, aeson-pretty, base, bytestring, cborg
|
||||
, criterion, deepseq, directory, process, scientific, stdenv, text
|
||||
, unordered-containers, vector, zlib
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "cborg-json";
|
||||
version = "0.2.2.0";
|
||||
sha256 = "ab68a2457cb71a76699d7a8df07a880ea70c51d2c1a891b12669ca9ccfa7517b";
|
||||
libraryHaskellDepends = [
|
||||
aeson aeson-pretty base cborg scientific text unordered-containers
|
||||
vector
|
||||
];
|
||||
benchmarkHaskellDepends = [
|
||||
aeson base bytestring cborg criterion deepseq directory process
|
||||
zlib
|
||||
];
|
||||
homepage = "https://github.com/well-typed/cborg";
|
||||
description = "A library for encoding JSON as CBOR";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
{ mkDerivation, aeson, aeson-pretty, aeson-yaml, ansi-terminal
|
||||
, base, bytestring, containers, dhall, exceptions, filepath
|
||||
, optparse-applicative, prettyprinter, prettyprinter-ansi-terminal
|
||||
, scientific, stdenv, tasty, tasty-hunit, text
|
||||
, unordered-containers, vector
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "dhall-json";
|
||||
version = "1.6.1";
|
||||
sha256 = "3ce9b0a9d3a946beb021bb42589426ceb4c44cf5f104e5bdf120659ccb5109c9";
|
||||
revision = "1";
|
||||
editedCabalFile = "07h7vldqd623y7jf15j87mhs3nnbwl3a0121ajqc56qc0vvpgywp";
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
libraryHaskellDepends = [
|
||||
aeson aeson-pretty aeson-yaml base bytestring containers dhall
|
||||
exceptions filepath optparse-applicative prettyprinter scientific
|
||||
text unordered-containers vector
|
||||
];
|
||||
executableHaskellDepends = [
|
||||
aeson aeson-pretty ansi-terminal base bytestring dhall exceptions
|
||||
optparse-applicative prettyprinter prettyprinter-ansi-terminal text
|
||||
];
|
||||
testHaskellDepends = [
|
||||
aeson base bytestring dhall tasty tasty-hunit text
|
||||
];
|
||||
description = "Convert between Dhall and JSON or YAML";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}
|
@ -1,49 +0,0 @@
|
||||
{ mkDerivation, aeson, aeson-pretty, ansi-terminal, atomic-write
|
||||
, base, bytestring, case-insensitive, cborg, cborg-json, containers
|
||||
, contravariant, cryptonite, data-fix, deepseq, Diff, directory
|
||||
, doctest, dotgen, either, exceptions, filepath, foldl, gauge
|
||||
, generic-random, hashable, haskeline, http-client, http-client-tls
|
||||
, http-types, lens-family-core, megaparsec, memory, mockery, mtl
|
||||
, network-uri, optparse-applicative, parsers, pretty-simple
|
||||
, prettyprinter, prettyprinter-ansi-terminal, profunctors
|
||||
, QuickCheck, quickcheck-instances, repline, scientific, semigroups
|
||||
, serialise, special-values, spoon, stdenv, tasty
|
||||
, tasty-expected-failure, tasty-hunit, tasty-quickcheck
|
||||
, template-haskell, text, th-lift-instances, transformers
|
||||
, transformers-compat, turtle, unordered-containers, uri-encode
|
||||
, vector
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "dhall";
|
||||
version = "1.29.0";
|
||||
sha256 = "c73e59717ff15707c77f3ff582f5adf68fc7abc68dbf70aa77ce65333637e7f6";
|
||||
revision = "2";
|
||||
editedCabalFile = "1qksvk63vmypqcd9hasacmqw7gsqcggs5lk85x7w2731mh3c3sa8";
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
libraryHaskellDepends = [
|
||||
aeson aeson-pretty ansi-terminal atomic-write base bytestring
|
||||
case-insensitive cborg cborg-json containers contravariant
|
||||
cryptonite data-fix deepseq Diff directory dotgen either exceptions
|
||||
filepath hashable haskeline http-client http-client-tls http-types
|
||||
lens-family-core megaparsec memory mtl network-uri
|
||||
optparse-applicative parsers pretty-simple prettyprinter
|
||||
prettyprinter-ansi-terminal profunctors repline scientific
|
||||
serialise template-haskell text th-lift-instances transformers
|
||||
transformers-compat unordered-containers uri-encode vector
|
||||
];
|
||||
executableHaskellDepends = [ base ];
|
||||
testHaskellDepends = [
|
||||
base bytestring cborg containers data-fix deepseq directory doctest
|
||||
either filepath foldl generic-random lens-family-core megaparsec
|
||||
mockery prettyprinter QuickCheck quickcheck-instances scientific
|
||||
semigroups serialise special-values spoon tasty
|
||||
tasty-expected-failure tasty-hunit tasty-quickcheck text
|
||||
transformers turtle unordered-containers vector
|
||||
];
|
||||
benchmarkHaskellDepends = [
|
||||
base bytestring containers directory gauge serialise text
|
||||
];
|
||||
description = "A configuration language guaranteed to terminate";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
{ mkDerivation, ansi-wl-pprint, base, base-compat, bytestring
|
||||
, containers, deepseq, doctest, gauge, mtl, pgp-wordlist
|
||||
, QuickCheck, quickcheck-instances, random, stdenv, tasty
|
||||
, tasty-hunit, tasty-quickcheck, text, transformers
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "prettyprinter";
|
||||
version = "1.6.0";
|
||||
sha256 = "fdaa85aeaff852c3d96f1ac2a323bc1dd96e0061185d11cdc4d1cdb269f5f2f5";
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
libraryHaskellDepends = [ base text ];
|
||||
testHaskellDepends = [
|
||||
base bytestring doctest pgp-wordlist QuickCheck
|
||||
quickcheck-instances tasty tasty-hunit tasty-quickcheck text
|
||||
];
|
||||
benchmarkHaskellDepends = [
|
||||
ansi-wl-pprint base base-compat containers deepseq gauge mtl
|
||||
QuickCheck random text transformers
|
||||
];
|
||||
homepage = "http://github.com/quchen/prettyprinter";
|
||||
description = "A modern, easy to use, well-documented, extensible pretty-printer";
|
||||
license = stdenv.lib.licenses.bsd2;
|
||||
}
|
@ -1,7 +1,9 @@
|
||||
{
|
||||
"url": "https://github.com/NixOS/nixpkgs.git",
|
||||
"rev": "8f3ca4ec1686251bab083c37d0a4e96f45bc495f",
|
||||
"date": "2019-12-10T15:32:27-05:00",
|
||||
"sha256": "0f09m8kp6akxx8m6z9iw95njsja37ihhkwpldmh24zvgaclgv5qj",
|
||||
"fetchSubmodules": false
|
||||
"rev": "2cd2e7267e5b9a960c2997756cb30e86f0958a6b",
|
||||
"date": "2020-06-23T09:46:29+03:00",
|
||||
"sha256": "0ir3rk776wldyjz6l6y5c5fs8lqk95gsik6w45wxgk6zdpsvhrn5",
|
||||
"fetchSubmodules": false,
|
||||
"deepClone": false,
|
||||
"leaveDotGit": false
|
||||
}
|
||||
|
@ -109,8 +109,6 @@ let
|
||||
previous = old.overrides or (_: _: {});
|
||||
|
||||
packages = pkgsNew.haskell.lib.packageSourceOverrides {
|
||||
dhall-json = "1.5.0";
|
||||
|
||||
dhall-kubernetes-generator = ../dhall-kubernetes-generator;
|
||||
};
|
||||
|
||||
@ -119,20 +117,16 @@ let
|
||||
};
|
||||
|
||||
manual = haskellPackagesNew: haskellPackagesOld: {
|
||||
dhall = pkgsNew.haskell.lib.dontCheck haskellPackagesOld.dhall;
|
||||
dhall = haskellPackagesOld.dhall_1_33_0;
|
||||
|
||||
dhall-json =
|
||||
pkgsNew.haskell.lib.dontCheck haskellPackagesOld.dhall-json;
|
||||
|
||||
prettyprinter =
|
||||
pkgsNew.haskell.lib.dontCheck haskellPackagesOld.prettyprinter;
|
||||
dhall-json = haskellPackagesOld.dhall-json_1_7_0;
|
||||
};
|
||||
|
||||
in
|
||||
pkgsNew.lib.fold pkgsNew.lib.composeExtensions (_: _: {})
|
||||
[ previous
|
||||
packages
|
||||
packagesFromDirectory
|
||||
# packagesFromDirectory
|
||||
manual
|
||||
];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user