Created
June 26, 2017 01:24
-
-
Save anguslees/3f5c2e548ae8734d0053ee100df1e225 to your computer and use it in GitHub Desktop.
basic echoheaders test serviice
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
local kube = import "kube.libsonnet"; | |
local all = { | |
namespace:: "gus", | |
echo_ing: kube.Ingress("echoheaders") { | |
metadata+: { namespace: $.namespace }, | |
spec+: { | |
backend: $.echo_svc.name_port, | |
}, | |
}, | |
echo_svc: kube.Service("echoheaders") { | |
metadata+: { | |
namespace: $.namespace, | |
}, | |
target_pod: $.echo.spec.template, | |
}, | |
echo: kube.Deployment("echoheaders") { | |
metadata+: { namespace: $.namespace }, | |
spec+: { | |
template+: { | |
spec+: { | |
containers_+: { | |
echoheaders: kube.Container("echoheaders") { | |
image: "gcr.io/google_containers/echoserver:1.4", | |
ports_+: { | |
http: { hostPort: 5636, containerPort: 8081 }, | |
}, | |
readinessProbe: { | |
httpGet: { path: "/", port: "http" }, | |
}, | |
livenessProbe: self.readinessProbe, | |
}, | |
}, | |
}, | |
}, | |
}, | |
}, | |
}; | |
kube.List() { items_+: all } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment