From 9d87b47d772bc4150e0eb42cbee8317f0b9d69bc Mon Sep 17 00:00:00 2001 From: Daniel Smith Date: Mon, 22 Feb 2016 17:43:25 -0800 Subject: [PATCH] add readiness probe to proxy test --- test/e2e/proxy.go | 10 ++++++++++ test/e2e/util.go | 36 +++++++++++++++++++----------------- 2 files changed, 29 insertions(+), 17 deletions(-) diff --git a/test/e2e/proxy.go b/test/e2e/proxy.go index ce60da577f1..f37f4f2471b 100644 --- a/test/e2e/proxy.go +++ b/test/e2e/proxy.go @@ -125,6 +125,16 @@ func proxyContext(version string) { "tlsdest1": 460, "tlsdest2": 462, }, + ReadinessProbe: &api.Probe{ + Handler: api.Handler{ + HTTPGet: &api.HTTPGetAction{ + Port: intstr.FromInt(80), + }, + }, + InitialDelaySeconds: 1, + TimeoutSeconds: 5, + PeriodSeconds: 10, + }, Labels: labels, CreatedPods: &pods, } diff --git a/test/e2e/util.go b/test/e2e/util.go index 75012ebf77d..4a1faf4309e 100644 --- a/test/e2e/util.go +++ b/test/e2e/util.go @@ -230,19 +230,20 @@ func (s *podStore) Stop() { } type RCConfig struct { - Client *client.Client - Image string - Command []string - Name string - Namespace string - PollInterval time.Duration - Timeout time.Duration - PodStatusFile *os.File - Replicas int - CpuRequest int64 // millicores - CpuLimit int64 // millicores - MemRequest int64 // bytes - MemLimit int64 // bytes + Client *client.Client + Image string + Command []string + Name string + Namespace string + PollInterval time.Duration + Timeout time.Duration + PodStatusFile *os.File + Replicas int + CpuRequest int64 // millicores + CpuLimit int64 // millicores + MemRequest int64 // bytes + MemLimit int64 // bytes + ReadinessProbe *api.Probe // Env vars, set the same for every pod. Env map[string]string @@ -1613,10 +1614,11 @@ func (config *RCConfig) create() error { Spec: api.PodSpec{ Containers: []api.Container{ { - Name: config.Name, - Image: config.Image, - Command: config.Command, - Ports: []api.ContainerPort{{ContainerPort: 80}}, + Name: config.Name, + Image: config.Image, + Command: config.Command, + Ports: []api.ContainerPort{{ContainerPort: 80}}, + ReadinessProbe: config.ReadinessProbe, }, }, DNSPolicy: api.DNSDefault,