Skip to content

Commit 22af5cf

Browse files
chore: align cert-manager ready check with e2e tests (#953)
* chore: Align cert-manager ready check with e2e tests Link: https://github.com/kubeflow/notebooks/blob/d76af839376385ee893ac666447a0ca1ed00e85d/workspaces/controller/test/utils/certmanager.go#L67-L73 Signed-off-by: Christian Heusel <christian@heusel.eu> * chore: Remove usage of deprecated endpoint resource When running the checks here the following warning was emitted: Warning: v1 Endpoints is deprecated in v1.33+; use discovery.k8s.io/v1 EndpointSlice Fix this by migrating to the new `endpointslice` resource type. Link: https://kubernetes.io/blog/2025/04/24/endpoints-deprecation/ Signed-off-by: Christian Heusel <christian@heusel.eu> --------- Signed-off-by: Christian Heusel <christian@heusel.eu>
1 parent c262971 commit 22af5cf

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

developing/scripts/setup-cert-manager.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,20 @@ kubectl wait --for=condition=ready pod \
2424
-n cert-manager \
2525
--timeout=120s
2626

27+
kubectl wait deployment.apps --for condition=Available \
28+
--selector app.kubernetes.io/instance=cert-manager \
29+
--all-namespaces \
30+
--timeout=120s
31+
32+
kubectl wait endpointslice \
33+
--for="jsonpath=endpoints[0].targetRef.kind=Pod" \
34+
--selector app.kubernetes.io/instance=cert-manager \
35+
--all-namespaces \
36+
--timeout=120s
37+
2738
# Also wait for the CRDs to be established
2839
kubectl wait --for=condition=established crd/certificates.cert-manager.io --timeout=60s
2940
kubectl wait --for=condition=established crd/issuers.cert-manager.io --timeout=60s
3041
kubectl wait --for=condition=established crd/clusterissuers.cert-manager.io --timeout=60s
3142

32-
echo "Cert-manager setup complete"
43+
echo "Cert-manager setup complete"

workspaces/controller/test/utils/certmanager.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ func WaitCertManagerRunning() error {
7979
// Wait for the cert-manager Endpoints to be ready
8080
// NOTE: the webhooks will not function correctly until this is ready
8181
cmd = exec.Command("kubectl", "wait",
82-
"endpoints",
83-
"--for", "jsonpath=subsets[0].addresses[0].targetRef.kind=Pod",
82+
"endpointslice",
83+
"--for", "jsonpath=endpoints[0].targetRef.kind=Pod",
8484
"--selector", "app.kubernetes.io/instance=cert-manager",
8585
"--all-namespaces",
8686
"--timeout", "2m",

0 commit comments

Comments
 (0)