@@ -40,15 +40,23 @@ func generateLogLevel(cr *v1.Config) string {
40
40
return "debug"
41
41
}
42
42
43
+ // generateLivenessProbeConfig returns an HTTPS liveness probe for the image
44
+ // registry.
43
45
func generateLivenessProbeConfig () * corev1.Probe {
44
46
probeConfig := generateProbeConfig ()
45
- probeConfig . InitialDelaySeconds = 10
46
-
47
+ // Wait until the registry is ready to serve requests.
48
+ probeConfig . InitialDelaySeconds = 5
47
49
return probeConfig
48
50
}
49
51
52
+ // generateReadinessProbeConfig returns an HTTPS readiness probe for the image
53
+ // registry.
50
54
func generateReadinessProbeConfig () * corev1.Probe {
51
- return generateProbeConfig ()
55
+ probeConfig := generateProbeConfig ()
56
+ // Wait until the registry checks its storage health before reporting
57
+ // the registry as Ready.
58
+ probeConfig .InitialDelaySeconds = 15
59
+ return probeConfig
52
60
}
53
61
54
62
func generateProbeConfig () * corev1.Probe {
@@ -157,6 +165,9 @@ func makePodTemplateSpec(coreClient coreset.CoreV1Interface, proxyLister configl
157
165
corev1.EnvVar {Name : "REGISTRY_OPENSHIFT_QUOTA_ENABLED" , Value : "true" },
158
166
corev1.EnvVar {Name : "REGISTRY_STORAGE_CACHE_BLOBDESCRIPTOR" , Value : "inmemory" },
159
167
corev1.EnvVar {Name : "REGISTRY_STORAGE_DELETE_ENABLED" , Value : "true" },
168
+ corev1.EnvVar {Name : "REGISTRY_HEALTH_STORAGEDRIVER_ENABLED" , Value : "true" },
169
+ corev1.EnvVar {Name : "REGISTRY_HEALTH_STORAGEDRIVER_INTERVAL" , Value : "10s" },
170
+ corev1.EnvVar {Name : "REGISTRY_HEALTH_STORAGEDRIVER_THRESHOLD" , Value : "1" },
160
171
corev1.EnvVar {Name : "REGISTRY_OPENSHIFT_METRICS_ENABLED" , Value : "true" },
161
172
// TODO(dmage): sync with InternalRegistryHostname in origin
162
173
corev1.EnvVar {Name : "REGISTRY_OPENSHIFT_SERVER_ADDR" , Value : fmt .Sprintf ("%s.%s.svc:%d" , defaults .ServiceName , defaults .ImageRegistryOperatorNamespace , defaults .ContainerPort )},
0 commit comments