Add readiness probes to CRD/Admission webhook pods

This commit is contained in:
Jordan Liggitt 2019-08-30 22:42:38 -04:00
parent f4887d692e
commit d150f15d91
3 changed files with 25 additions and 1 deletions

View File

@ -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}},
},

View File

@ -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}},
},

View File

@ -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"}