cert-manager-operator
cert-manager-operator copied to clipboard
quality-of-life: Improve local development tooling
This PR updates the Makefile with .PHONY targets, better error handling for deploy/undeploy, and adds README.md sections on cleanup, tests, and linting.
Makefile Enhancements:
-
Added
.PHONYdeclarations to multiple targets (local-run,build-operator,build,run,image-build,image-push,deploy,undeploy,test-e2e-wait-for-stable-state,test-e2e-debug-cluster,lint) to ensure proper execution and avoid conflicts with files of the same name. [1] [2] [3] [4] [5] -
Improved the
deploytarget to create thecert-manager-operatornamespace if it does not exist, ensuring smoother deployment. -
Enhanced the
undeploytarget to ignore not-found errors when deleting resources, improving robustness. -
Added a check in the
linttarget to ensuregolangci-lintis installed before running, providing a clearer error message if it is missing.
Documentation Updates:
-
Added a "Cleaning up the deployment" section in
README.md, explaining how to remove the Cert Manager Operator and its associated resources usingmake undeploy. -
Introduced a "Running tests locally" section in
README.md, detailing how to execute unit tests and generate a coverage report. -
Added a "Linting the code" section in
README.md, describing how to runmake lintto check for linting issues usinggolangci-lint.
/retest
Walkthrough
Adds numerous PHONY Makefile targets for local run, build, run, image build/push, deploy/undeploy with namespace handling, opm download, and e2e wait/debug flows, plus a lint invocation tweak. README gains additional sections for cleanup, testing, and linting, including duplicated guidance blocks.
Changes
| Cohort / File(s) | Summary of changes |
|---|---|
Build, run, deploy, and test automationMakefile |
Adds PHONY targets: local-run, build-operator, build, run, image-build, image-push, deploy, undeploy, opm, test-e2e-wait-for-stable-state, test-e2e-debug-cluster. Implements namespace guard in deploy, safe deletion in undeploy, opm downloader, e2e wait/debug orchestration, and a minor lint command adjustment. |
Documentation updatesREADME.md |
Adds sections for cleanup (make undeploy), running tests (make test, coverage), and linting (make lint), with some duplicated sections appearing in multiple locations. |
Estimated code review effort
🎯 3 (Moderate) | ⏱️ ~25 minutes
Pre-merge checks and finishing touches
✅ Passed checks (3 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title Check | ✅ Passed | The title "quality-of-life: Improve local development tooling" concisely and accurately summarizes the primary intent of the changeset — Makefile additions and improvements to local developer workflows (and accompanying README updates) — making it clear and relevant for reviewers scanning history. |
| Description Check | ✅ Passed | The PR description directly describes the Makefile and README changes present in the diff, listing added .PHONY targets, deploy/undeploy robustness, a lint precheck, and the new documentation sections, so it is on-topic and adequately related to the changeset. |
| Docstring Coverage | ✅ Passed | No functions found in the changes. Docstring coverage check skipped. |
✨ Finishing touches
🧪 Generate unit tests
- [ ] Create PR with unit tests
- [ ] Post copyable unit tests in a comment
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.
@sebrandon1: all tests passed!
Full PR test history. Your PR dashboard.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: bharath-b-rh, sebrandon1
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [bharath-b-rh]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
no user facing changes /label docs-approved /label qe-approved /label px-approved