add readyz endpoint for kube-apiserver readiness checks

add startup sequence duration and readyz endpoint

add rbac bootstrapping policy for readyz

add integration test around grace period and readyz

rename startup sequence duration flag

copy health checks to fields

rename health-check installed boolean, refactor clock injection logic

cleanup clock injection code

remove todo about poststarthook url registration from healthz
This commit is contained in:
Han Kang
2019-05-30 11:19:49 -07:00
parent 35e8a70b53
commit 54dcf5c9c4
15 changed files with 334 additions and 20 deletions

View File

@@ -198,7 +198,7 @@ func ClusterRoles() []rbacv1.ClusterRole {
ObjectMeta: metav1.ObjectMeta{Name: "system:discovery"},
Rules: []rbacv1.PolicyRule{
rbacv1helpers.NewRule("get").URLs(
"/healthz", "/version", "/version/",
"/readyz", "/healthz", "/version", "/version/",
"/openapi", "/openapi/*",
"/api", "/api/*",
"/apis", "/apis/*",
@@ -218,7 +218,7 @@ func ClusterRoles() []rbacv1.ClusterRole {
ObjectMeta: metav1.ObjectMeta{Name: "system:public-info-viewer"},
Rules: []rbacv1.PolicyRule{
rbacv1helpers.NewRule("get").URLs(
"/healthz", "/version", "/version/",
"/readyz", "/healthz", "/version", "/version/",
).RuleOrDie(),
},
},

View File

@@ -535,6 +535,7 @@ items:
- /healthz
- /openapi
- /openapi/*
- /readyz
- /version
- /version/
verbs:
@@ -1156,6 +1157,7 @@ items:
rules:
- nonResourceURLs:
- /healthz
- /readyz
- /version
- /version/
verbs: