From 7843271e1f38d722994932356fb4bb840e1b99ef Mon Sep 17 00:00:00 2001 From: Sunil Thaha Date: Mon, 4 Dec 2023 20:05:12 +1000 Subject: [PATCH 1/3] ci: run all tests Signed-off-by: Sunil Thaha --- tests/run-e2e.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/run-e2e.sh b/tests/run-e2e.sh index e2f667bb..4f413b13 100755 --- a/tests/run-e2e.sh +++ b/tests/run-e2e.sh @@ -152,7 +152,6 @@ run_e2e() { local ret=0 go test -v -failfast -timeout $TEST_TIMEOUT \ ./tests/e2e/... \ - -run Reconcile \ 2>&1 | tee "$LOGS_DIR/e2e.log" || ret=1 # terminate both log_events From 861ebca8a870b0bb9944f27f16a6a3fa2b91801a Mon Sep 17 00:00:00 2001 From: Sunil Thaha Date: Mon, 4 Dec 2023 18:15:24 +1000 Subject: [PATCH 2/3] fix(test): provide more time for operator to initialize This commit increases the liveness and the readiness probes' timeout so that the operator has time to build its internal cache and be ready for reconcile. Tests fail because the resources (kepler) are recreated and expected to be reconciled before the operator has had a change to build cache and the informers. Signed-off-by: Sunil Thaha --- .../manifests/kepler-operator.clusterserviceversion.yaml | 8 ++++---- config/manager/manager.yaml | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bundle/manifests/kepler-operator.clusterserviceversion.yaml b/bundle/manifests/kepler-operator.clusterserviceversion.yaml index 6647b20d..6f14ef33 100644 --- a/bundle/manifests/kepler-operator.clusterserviceversion.yaml +++ b/bundle/manifests/kepler-operator.clusterserviceversion.yaml @@ -27,7 +27,7 @@ metadata: capabilities: Basic Install categories: Monitoring containerImage: quay.io/sustainable_computing_io/kepler-operator:0.9.2 - createdAt: "2023-11-30T08:58:07Z" + createdAt: "2023-12-04T08:14:16Z" description: 'Deploys and Manages Kepler on Kubernetes ' operators.operatorframework.io/builder: operator-sdk-v1.27.0 operators.operatorframework.io/internal-objects: |- @@ -258,7 +258,7 @@ spec: httpGet: path: /healthz port: 8081 - initialDelaySeconds: 15 + initialDelaySeconds: 20 periodSeconds: 20 name: manager ports: @@ -269,8 +269,8 @@ spec: httpGet: path: /readyz port: 8081 - initialDelaySeconds: 5 - periodSeconds: 10 + initialDelaySeconds: 20 + periodSeconds: 20 resources: limits: cpu: 500m diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index 7dd9b232..b0f95c6f 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -92,14 +92,14 @@ spec: httpGet: path: /healthz port: 8081 - initialDelaySeconds: 15 + initialDelaySeconds: 20 periodSeconds: 20 readinessProbe: httpGet: path: /readyz port: 8081 - initialDelaySeconds: 5 - periodSeconds: 10 + initialDelaySeconds: 20 + periodSeconds: 20 # TODO(user): Configure the resources accordingly based on the project requirements. # More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ resources: From cbadcc91502160be1374f189aa0b6128ede8f57f Mon Sep 17 00:00:00 2001 From: Sunil Thaha Date: Mon, 4 Dec 2023 20:03:32 +1000 Subject: [PATCH 3/3] fix(test): fix deployment namespace used in test Signed-off-by: Sunil Thaha --- tests/e2e/kepler_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/kepler_test.go b/tests/e2e/kepler_test.go index d6e616af..e4aa16b7 100644 --- a/tests/e2e/kepler_test.go +++ b/tests/e2e/kepler_test.go @@ -76,7 +76,7 @@ func TestBadKepler_Reconciliation(t *testing.T) { k := f.CreateKepler("invalid-name") ds := appsv1.DaemonSet{} - f.AssertNoResourceExists(k.Name, controllers.BpfAttachMethodAnnotation, &ds) + f.AssertNoResourceExists(k.Name, controllers.KeplerDeploymentNS, &ds) } func TestNodeSelector(t *testing.T) {