Bump operator-sdk to v1.42.1 in operator and storage-operator#4818
Bump operator-sdk to v1.42.1 in operator and storage-operator#4818bert-e merged 9 commits intodevelopment/133.0from
operator-sdk to v1.42.1 in operator and storage-operator#4818Conversation
Hello ezekiel-alexrod,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
Peer approvals must include at least 1 approval from the following list: |
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
Peer approvals must include at least 1 approval from the following list: |
ConflictThere is a conflict between your branch Please resolve the conflict on the feature branch ( git fetch && \
git checkout origin/improvement/bump-operator-sdk-v1.42.1 && \
git merge origin/development/133.0Resolve merge conflicts and commit git push origin HEAD:improvement/bump-operator-sdk-v1.42.1 |
4572b35 to
0b47fdb
Compare
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
Peer approvals must include at least 1 approval from the following list: |
0b47fdb to
c48e699
Compare
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
Peer approvals must include at least 1 approval from the following list: |
0d65a14 to
9562fe6
Compare
python3 tools/upgrade-operator-sdk/upgrade.py --operator-dir operator tools/upgrade-operator-sdk/operator Scaffold realigned with operator-sdk v1.42.1, Go bumped to 1.24.13, k8s.io dependencies pinned to v0.33.10.
python3 tools/upgrade-operator-sdk/upgrade.py --operator-dir storage-operator tools/upgrade-operator-sdk/storage-operator Scaffold realigned with operator-sdk v1.42.1, Go bumped to 1.24.13, k8s.io dependencies pinned to v0.33.10.
9562fe6 to
bfd32fe
Compare
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
Peer approvals must include at least 1 approval from the following list: |
|
| @@ -0,0 +1,329 @@ | |||
| /* | |||
There was a problem hiding this comment.
The e2e test files (test/e2e/ and test/utils/) are scaffolded boilerplate that will never run in MetalK8s CI (they require Kind, make docker-build, etc.). Including them adds dead code to the repo. Consider deleting these scaffold-only test directories if they are not intended for use, or add a note in the PR about plans to integrate them.
— Claude Code
| )) | ||
| // so if, for whatever reason, this one get deleted we log the error | ||
| // and exit so that the operator restarts and re-creates the ClusterConfig | ||
| reqLogger.Error(nil, "ClusterConfig object should not be deleted, exiting") |
There was a problem hiding this comment.
The PR description mentions replacing panic(fmt.Errorf(...)) with logr.Error + os.Exit(1), but this code now passes a nil error to reqLogger.Error(). While logr allows nil errors, this loses the descriptive message that the old panic had. Consider creating an actual error to include context about why the exit is happening, e.g. reqLogger.Error(fmt.Errorf("main ClusterConfig object unexpectedly deleted"), "exiting").
— Claude Code
|
1a54a1c to
de52219
Compare
|
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
Peer approvals must include at least 1 approval from the following list: |
|
/approve |
In the queueThe changeset has received all authorizations and has been added to the The changeset will be merged in:
The following branches will NOT be impacted:
There is no action required on your side. You will be notified here once IMPORTANT Please do not attempt to modify this pull request.
If you need this pull request to be removed from the queue, please contact a The following options are set: approve |
|
I have successfully merged the changeset of this pull request
The following branches have NOT changed:
Please check the status of the associated issue None. Goodbye ezekiel-alexrod. |
Summary
operator-sdkfromv1.37.xtov1.42.1in bothoperatorandstorage-operator, using the upgrade tool from tools: add script to upgrade operator-sdk #4816panic(fmt.Errorf(...))with structuredlogr.Error+os.Exit(1)inClusterConfigcontrollerCrashLoopBackOffChanges
operator-sdkv1.37.x→v1.42.1(operator&storage-operator)Upgrade performed using the config-driven tool from #4816:
Incremental changes for each version, applied all at once using the tool:
kube-rbac-proxy; expose metrics via native HTTPS endpoint; updategolangci-linttov1.59.1,controller-toolstov0.15.0,kustomizetov5.4.2k8s.iodependencies tov0.31.14andcontroller-runtimetov0.19.5; updatekustomizetov5.4.3andcontroller-toolstov0.16.1; add network-policy scaffolding1.23.12andk8s.iodependencies tov0.32.12withcontroller-runtimev0.20.4; add metrics certificate watcher support; replace staticENVTESTversions with dynamicgo list1.24.13andk8s.iodependencies tov0.33.8withcontroller-runtimev0.21.0; migrategolangci-lintto v2 config format; updatecontroller-toolstov0.18.0; add Kind cluster targets for e2e tests1.25.8andk8s.iodependencies tov0.33.9; scaffold generatesCOPY internal/instead ofCOPY internal/controller/After all version bumps, configuration files for both operators (
config/,cmd/main.go,Makefile,Dockerfile,README.md, etc.) were realigned with the upstream scaffold. New scaffold additions includetest/e2e/,.github/workflows/, andconfig/rbac/*_admin_role.yaml.Fix: replace
panicwith structured log +os.Exit(1)inClusterConfigcontrollerIn
operator/pkg/controller/clusterconfig/controller.go,panic(fmt.Errorf(...))when the mainClusterConfigis unexpectedly deleted has been replaced withlogr.Error+os.Exit(1). This produces a clean log entry and still triggers a pod restart, avoiding an uncontrolled panic and its confusing stack trace.Fix: rollout restart of operator after ingress tests
A new
autousemodule-scoped pytest fixture intests/post/steps/test_ingress.pyperforms akubectl rollout restartof the operator deployment at the end of the ingress test module. Ingress tests heavily modify theClusterConfig, which can leave the operator inCrashLoopBackOffwith growing backoff delays; the restart ensures a fresh pod before subsequent test modules.Closes: MK8S-110, MK8S-111