From d150f15d912c37fd93aa0d2c3d2bfbf136f6940f Mon Sep 17 00:00:00 2001 From: Jordan Liggitt Date: Fri, 30 Aug 2019 22:42:38 -0400 Subject: [PATCH] Add readiness probes to CRD/Admission webhook pods --- test/e2e/apimachinery/crd_conversion_webhook.go | 12 ++++++++++++ test/e2e/apimachinery/webhook.go | 12 ++++++++++++ test/utils/image/manifest.go | 2 +- 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/test/e2e/apimachinery/crd_conversion_webhook.go b/test/e2e/apimachinery/crd_conversion_webhook.go index f6a28daa78c..ecc0df82ecf 100644 --- a/test/e2e/apimachinery/crd_conversion_webhook.go +++ b/test/e2e/apimachinery/crd_conversion_webhook.go @@ -292,6 +292,18 @@ func deployCustomResourceWebhookAndService(f *framework.Framework, image string, // Use a non-default port for containers. fmt.Sprintf("--port=%d", containerPort), }, + ReadinessProbe: &v1.Probe{ + Handler: v1.Handler{ + HTTPGet: &v1.HTTPGetAction{ + Scheme: v1.URISchemeHTTPS, + Port: intstr.FromInt(int(containerPort)), + Path: "/readyz", + }, + }, + PeriodSeconds: 1, + SuccessThreshold: 1, + FailureThreshold: 30, + }, Image: image, Ports: []v1.ContainerPort{{ContainerPort: containerPort}}, }, diff --git a/test/e2e/apimachinery/webhook.go b/test/e2e/apimachinery/webhook.go index 4e28765ee23..177d398b15a 100644 --- a/test/e2e/apimachinery/webhook.go +++ b/test/e2e/apimachinery/webhook.go @@ -778,6 +778,18 @@ func deployWebhookAndService(f *framework.Framework, image string, context *cert // Use a non-default port for containers. fmt.Sprintf("--port=%d", containerPort), }, + ReadinessProbe: &v1.Probe{ + Handler: v1.Handler{ + HTTPGet: &v1.HTTPGetAction{ + Scheme: v1.URISchemeHTTPS, + Port: intstr.FromInt(int(containerPort)), + Path: "/readyz", + }, + }, + PeriodSeconds: 1, + SuccessThreshold: 1, + FailureThreshold: 30, + }, Image: image, Ports: []v1.ContainerPort{{ContainerPort: containerPort}}, }, diff --git a/test/utils/image/manifest.go b/test/utils/image/manifest.go index b149f54a939..ee2d41922e9 100644 --- a/test/utils/image/manifest.go +++ b/test/utils/image/manifest.go @@ -204,7 +204,7 @@ const ( func initImageConfigs() map[int]Config { configs := map[int]Config{} - configs[Agnhost] = Config{e2eRegistry, "agnhost", "2.5"} + configs[Agnhost] = Config{e2eRegistry, "agnhost", "2.6"} configs[Alpine] = Config{dockerLibraryRegistry, "alpine", "3.7"} configs[AuthenticatedAlpine] = Config{gcAuthenticatedRegistry, "alpine", "3.7"} configs[AuthenticatedWindowsNanoServer] = Config{gcAuthenticatedRegistry, "windows-nanoserver", "v1"}