chore: bump operator-sdk and related tools versions and fix the issues reported
Description
Bumps the version of the operator-sdk, which requires updating the linter configuration (and fixing the issues reported).
Which issue(s) does this PR fix or relate to
- Fixes https://issues.redhat.com/browse/RHIDP-11243
PR acceptance criteria
- [ ] Tests
- [ ] Documentation
How to test changes / Special notes to the reviewer
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please assign rm3l for approval. For more information see the Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
Quality Gate passed
Issues
6 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.2% Duplication on New Code
PR Reviewer Guide 🔍
Here are some key observations to aid the review process:
|
🎫 Ticket compliance analysis 🔶 RHIDP-11243 - Partially compliant Compliant requirements:
Non-compliant requirements:
Requires further human verification:
|
| ⏱️ Estimated effort to review: 4 🔵🔵🔵🔵⚪ |
| 🔒 No security concerns identified |
⚡ Recommended focus areas for reviewTLS Misconfig
TLSOpts: webhookTLSOpts, which couples metrics TLS settings to webhook certificate configuration. This is likely unintended (metrics should use its own TLS opts and its own cert watcher when configured), and it can produce surprising behavior when only webhook cert flags are set. |
📚 Focus areas based on broader codebase contextCompile Error
checkMountWSubpath now declares its first parameter as _ Gomega but the function body still calls g.Expect(...), which will not compile because g is undefined. Rename the parameter back to g Gomega (or update the body to not reference g) and ensure the helper is invoked accordingly. (Ref 6, Ref 8)
Reference reasoning: Existing integration tests consistently pass a named |
📄 References
|
PR Type
Enhancement, Bug fix
Description
-
Upgraded operator-sdk from v1.37.0 to v1.42.0 and updated related dependencies (controller-runtime, ginkgo, gomega)
-
Updated tool versions including OPM, controller-tools, goimports, gosec, and ginkgo
-
Implemented certificate watcher support for secure metrics and webhook servers with TLS configuration
-
Restructured and enhanced
.golangci.ymllinter configuration with explicit linter selection and improved rules -
Fixed linter violations across the codebase including comment formatting, line length compliance, and import organization
-
Refactored test code to remove redundant parameters, extract constants, and improve assertion patterns
-
Added envtest binary directory discovery with
getFirstFoundEnvTestBinaryDir()helper function -
Updated CRD generation with kubebuilder v0.18.0 and simplified condition descriptions
-
Added GitHub Actions workflow for linter configuration validation
-
Fixed parameter naming to avoid package shadowing in
pkg/model/runtime.go -
Added comprehensive security documentation for Prometheus metrics monitoring
-
Created new configuration patches for metrics server certificate management
File Walkthrough
| Relevant files | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Formatting | 58 files
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Enhancement | 2 files
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Bug fix | 2 files
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Dependencies | 2 files
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Configuration changes | 17 files
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Documentation | 1 files
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Additional files |
PR Code Suggestions ✨
Explore these optional code suggestions:
| Category | Suggestion | Impact |
| Possible issue |
✅
| High |
Fix incorrect path in install macroFix the
Suggestion importance[1-10]: 9__ Why: The suggestion correctly identifies a critical bug in the | High | |
✅
| Medium | |
Fail fast on test setup errorModify integration_tests/suite_test.go [142-155]
Suggestion importance[1-10]: 6__ Why: The suggestion correctly proposes to fail fast on a test setup error by using | Low | |
| General |
✅
| Low |
✅
| Low | |
Return nil for unneeded cancel functionIn tests/e2e/e2e_test.go [216-218]
Suggestion importance[1-10]: 5__ Why: The suggestion correctly points out that returning | Low | |
| Organization best practice |
✅
| Low |
| ||
PR images are available:
- https://quay.io/rhdh-community/operator:0.9.0-pr-2060-e61a4af
- https://quay.io/rhdh-community/operator-bundle:0.9.0-pr-2060-e61a4af
- https://quay.io/rhdh-community/operator-catalog:0.9.0-pr-2060-e61a4af
⚠️ Files changed in bundle and installer generation!
Those changes to the operator bundle/installer manifests should have been pushed automatically to your PR branch.
NOTE: If the PR checks are stuck after this additional commit, manually close the PR and immediately reopen it to trigger the checks again.
/agentic_review
Code Review by Qodo
🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0) 📜 Skill insights (0)
1. Broken golangci exclusions ✓ Resolved 🐞 Bug ≡ Correctness
Description
.golangci.yml uses regex-based exclusion rules but sets paths to "api/*" and "internal/*", which won’t match typical paths like "api/v1alpha5/..." or "internal/controller/...". The intended lll/dupl exclusions therefore won’t apply, causing unexpected lint failures/noise.
Code
+ - linters: + - lll + path: api/* + - linters: + - dupl + - lll + path: internal/* + paths:
Relevance
⭐⭐⭐ HighTeam accepted fixing golangci-lint exclusion regex/path semantics; broken patterns cause CI noise/failures (PR #1797).
ⓘ Recommendations generated based on similar findings in past PRs
Evidence
The current exclusion rules specify path: api/* and path: internal/*, which are not correct regexes for matching those directories, so golangci-lint will not apply the exclusions as intended.
Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution ### Issue description `linters.exclusions.rules[].path` is interpreted as a regex, but patterns like `api/*` and `internal/*` are not correct regexes for “everything under api/ or internal/”. As a result, exclusions for `lll`/`dupl` won’t match and will be ineffective. ### Issue Context In regex, `*` repeats the **previous token**, so `api/*` matches `api/` plus additional `/` characters—not `api/<anything>`. ### Fix Change the rule paths to proper regexes, for example: - `^api/` (or `^api/.*`) - `^internal/` (or `^internal/.*`) ### Fix Focus Areas - .golangci.yml[30-45]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
2. ServiceMonitor port mismatch ✓ Resolved 🐞 Bug ≡ Correctness
Description
config/prometheus/monitor.yaml scrapes a Service port named "https", but config/manager/metrics_service.yaml exposes the metrics Service port as "metrics". Prometheus will fail to scrape because the referenced named port does not exist on the selected Service.
Code
config/prometheus/monitor.yaml[14]+ port: https # Ensure this is the name of the port that exposes HTTPS metrics
Relevance
⭐⭐ MediumNo direct history on ServiceMonitor named-port mismatch; only general ServiceMonitor feature work found (PR #1374).
ⓘ Recommendations generated based on similar findings in past PRs
Evidence
The ServiceMonitor is configured to scrape a Service port named "https", but the metrics Service only defines a port named "metrics", so the ServiceMonitor cannot resolve the port to scrape.
config/prometheus/monitor.yaml[11-16]config/manager/metrics_service.yaml[15-21]
Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution ### Issue description The ServiceMonitor endpoint references a Service port name (`https`) that doesn’t exist on the metrics Service (which exposes `metrics`). This prevents Prometheus from scraping operator metrics. ### Issue Context - `ServiceMonitor.spec.endpoints[].port` must match a **named port on the selected Service**. - The current metrics Service uses `name: metrics`. ### Fix Pick one of these and make them consistent: 1) Update `config/prometheus/monitor.yaml` to use `port: metrics`, OR 2) Rename the Service port in `config/manager/metrics_service.yaml` to `https` (and keep targetPort consistent). ### Fix Focus Areas - config/prometheus/monitor.yaml[11-18] - config/manager/metrics_service.yaml[15-21]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
3. Envtest binaries misselected ✓ Resolved 🐞 Bug ☼ Reliability
Description
integration_tests/suite_test.go sets envtest.BinaryAssetsDirectory by returning the first directory under ../bin/k8s, which can select the wrong Kubernetes version when multiple are present (or return "" when none exist). This makes integration tests flaky or fail to start envtest despite Makefile already providing an exact KUBEBUILDER_ASSETS path.
Code
integration_tests/suite_test.go[R83-88]+ BinaryAssetsDirectory: getFirstFoundEnvTestBinaryDir(), + CRDDirectoryPaths: []string{ + filepath.Join("..", "config", "crd", "bases"), + filepath.Join("..", "config", "crd", "external"), + }, ErrorIfCRDPathMissing: true,
Relevance
⭐⭐ MediumNo prior evidence on envtest BinaryAssetsDirectory selection; past efforts addressed other integration-test flakiness (PR #1479).
ⓘ Recommendations generated based on similar findings in past PRs
Evidence
The integration test suite hardcodes BinaryAssetsDirectory via a directory scan, while the Makefile provides a precise KUBEBUILDER_ASSETS path for the desired envtest version; these can diverge when multiple versions exist or when the directory is missing.
integration_tests/suite_test.go[81-89]integration_tests/suite_test.go[142-155]Makefile[166-171]
Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution ### Issue description The envtest setup picks the *first* directory found under `../bin/k8s`, which can be a different Kubernetes version than the one requested by `setup-envtest use ...`. This can lead to hard-to-reproduce failures. ### Issue Context The Makefile already computes a specific assets path via `KUBEBUILDER_ASSETS=... $(ENVTEST) use ... -p path`. ### Fix Prefer deterministic selection: - If `KUBEBUILDER_ASSETS` is set, use it (or omit `BinaryAssetsDirectory` entirely and let envtest use the env var). - Otherwise, either error out with a clear message or select a directory based on the expected version (not “first found”). ### Fix Focus Areas - integration_tests/suite_test.go[81-89] - integration_tests/suite_test.go[142-155] - Makefile[166-171]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
Codecov Report
:x: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 61.51%. Comparing base (1fb800b) to head (18a3644).
:warning: Report is 8 commits behind head on main.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| internal/controller/backstage_controller.go | 0.00% | 2 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #2060 +/- ##
==========================================
+ Coverage 61.41% 61.51% +0.09%
==========================================
Files 37 37
Lines 2159 2162 +3
==========================================
+ Hits 1326 1330 +4
Misses 691 691
+ Partials 142 141 -1
| Flag | Coverage Δ | |
|---|---|---|
| nightly | ? |
|
| unittests | 61.51% <0.00%> (+0.09%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Files with missing lines | Coverage Δ | |
|---|---|---|
| internal/controller/deployable_finder.go | 0.00% <ø> (ø) |
|
| internal/controller/mock_client.go | 36.98% <ø> (ø) |
|
| internal/controller/watchers.go | 0.00% <ø> (ø) |
|
| internal/controller/backstage_controller.go | 0.00% <0.00%> (ø) |
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
/agentic_review
Code review by qodo was updated up to the latest commit https://github.com/redhat-developer/rhdh-operator/commit/5aed70774e94084dc84a23c1fb3dc859a505d35a
PR images are available:
- https://quay.io/rhdh-community/operator:0.11.0-pr-2060-5aed707
- https://quay.io/rhdh-community/operator-bundle:0.11.0-pr-2060-5aed707
- https://quay.io/rhdh-community/operator-catalog:0.11.0-pr-2060-5aed707
Code review by qodo was updated up to the latest commit https://github.com/redhat-developer/rhdh-operator/commit/5aed70774e94084dc84a23c1fb3dc859a505d35a
PR Summary by Qodo
chore: Bump operator-sdk to v1.42.2, controller-runtime to v0.21.0, and fix lint issues
⚙️ Configuration changes ✨ Enhancement 🕐 20-40 Minutes
Walkthroughs
Description
• Bumps operator-sdk v1.37.0→v1.42.2, controller-runtime v0.19.4→v0.21.0, and pins k8s.io/* replace directives to v0.33.0 to match the new controller-runtime. • Updates golangci-lint config to v2 format: enables additional linters (errcheck, govet, ineffassign, misspell, etc.), adds gofmt/goimports formatters, and adds a new CI workflow to verify the linter config. • Adds cert-watcher support for metrics and webhook TLS certificates in cmd/main.go, aligning with the operator-sdk v1.42 scaffold; removes the now-redundant --metrics-secure flag from deployment manifests. • Bumps all Makefile tool versions (golangci-lint v2.12.2, goimports v0.46.0, gosec v2.27.1, ginkgo v2.28.1, kustomize v5.8.1, OPM v1.72.0) and refactors the go-install-tool macro to use symlinks for version-pinned binaries. • Fixes golangci-lint-reported issues: normalizes //+kubebuilder: → // +kubebuilder: comment style across all API types, fixes import aliasing in generated deepcopy files, and reformats long lines throughout test and helper files.
Diagram
graph TD
A["operator-sdk v1.42.2"] --> B["cmd/main.go"]
A --> C["Makefile"]
A --> D[".golangci.yml"]
D --> E[".github/workflows/lint-config-checks.yaml"]
B --> F["certwatcher\n(metrics + webhook TLS)"]
B --> G["metricsserver.Options"]
C --> H["go.mod / go.sum"]
H --> I["controller-runtime v0.21.0"]
H --> J["k8s.io/* v0.33.0"]
I --> K["internal/controller"]
K --> L["Named controller"]
C --> M["Tool Binaries\n(symlink pattern)"]
B --> N["config/manager/\nkustomization.yaml"]
N --> O["manager_metrics_patch.yaml"]
N --> P["metrics_service.yaml"]
N --> Q["cert_metrics_manager_patch.yaml"]
subgraph Legend
direction LR
_ext["External Tool"] ~~~ _file["Source File"] ~~~ _cfg["Config/Manifest"]
end
High-Level Assessment
The PR follows the standard operator-sdk upgrade path (https://sdk.operatorframework.io/docs/upgrading-sdk-version/) and there is no meaningful alternative approach. The cert-watcher pattern is the canonical controller-runtime v0.21 way to handle TLS certificate rotation. The symlink-based go-install-tool refactor is a well-known pattern for managing multiple tool versions in a Makefile. All changes are either mandated by the upstream scaffold or are mechanical lint fixes.
File Changes
Enhancement (2)
main.go
Add cert-watcher support for metrics and webhook TLS certificates+99/-12
Add cert-watcher support for metrics and webhook TLS certificates
• Aligns 'cmd/main.go' with the operator-sdk v1.42 scaffold. Adds '--metrics-cert-path/name/key' and '--webhook-cert-path/name/key' flags and wires up 'certwatcher.CertWatcher' instances for both, enabling hot-reload of TLS certificates. Changes '--metrics-secure' default from false to true. Removes the now-redundant '--metrics-secure' flag from deployment args (it defaults to true). Normalizes kubebuilder scaffold comment style.cmd/main.go
suite_test.go
Add auto-discovery of envtest binary dir and normalize comment style+33/-5
Add auto-discovery of envtest binary dir and normalize comment style
• Adds 'getFirstFoundEnvTestBinaryDir()' helper that scans '../bin/k8s' for envtest binaries, enabling IDE-based test runs without setting 'KUBEBUILDER_ASSETS'. Reformats 'CRDDirectoryPaths' slice and normalizes commented-out code style.integration_tests/suite_test.go
Bug fix (8)
zz_generated.deepcopy.go
Fix import alias in v1alpha1 generated deepcopy+1/-1
Fix import alias in v1alpha1 generated deepcopy
• Removes the redundant 'v1' alias from the 'k8s.io/apimachinery/pkg/apis/meta/v1' import to satisfy the 'unconvert'/'staticcheck' linter.api/v1alpha1/zz_generated.deepcopy.go
zz_generated.deepcopy.go
Fix import alias in v1alpha2 generated deepcopy+1/-1
Fix import alias in v1alpha2 generated deepcopy
• Removes redundant 'v1' alias from the apiextensions import.api/v1alpha2/zz_generated.deepcopy.go
zz_generated.deepcopy.go
Fix import alias in v1alpha3 generated deepcopy+1/-1
Fix import alias in v1alpha3 generated deepcopy
• Removes redundant 'v1' alias from the apiextensions import.api/v1alpha3/zz_generated.deepcopy.go
zz_generated.deepcopy.go
Fix import alias in v1alpha4 generated deepcopy+1/-1
Fix import alias in v1alpha4 generated deepcopy
• Removes redundant 'v1' alias from the apiextensions import.api/v1alpha4/zz_generated.deepcopy.go
zz_generated.deepcopy.go
Fix import alias in v1alpha5 generated deepcopy+1/-1
Fix import alias in v1alpha5 generated deepcopy
• Removes redundant 'v1' alias from the apiextensions import.api/v1alpha5/zz_generated.deepcopy.go
backstage_controller.go
Normalize RBAC marker comments and name the controller+12/-11
Normalize RBAC marker comments and name the controller
• Changes '//+kubebuilder:rbac:' to '// +kubebuilder:rbac:' for all RBAC markers. Adds '.Named("backstage")' to the controller builder, required by controller-runtime v0.21.internal/controller/backstage_controller.go
plugin-deps_test.go
Replace nil with empty maps in generateConfigMap call+1/-1
Replace nil with empty maps in generateConfigMap call
• Passes 'map[string]string{}' instead of 'nil' for labels and annotations to avoid a potential linter warning about nil map usage.integration_tests/plugin-deps_test.go
e2e_test.go
Fix linter issues in e2e tests: remove loop variable capture and reformat+11/-7
Fix linter issues in e2e tests: remove loop variable capture and reformat
• Removes the now-unnecessary 'tt := tt' loop variable capture (fixed in Go 1.22+). Fixes 'appUrlProvider' lambda to use '_ Gomega' and return a non-nil 'func(){}' cancel func. Reformats long lines.tests/e2e/e2e_test.go
Refactor (15)
backstage_types.go
Normalize kubebuilder marker comment style in v1alpha1 types+11/-11
Normalize kubebuilder marker comment style in v1alpha1 types
• Changes '//+kubebuilder:' to '// +kubebuilder:' throughout to satisfy the updated golangci-lint rules.api/v1alpha1/backstage_types.go
backstage_types.go
Normalize kubebuilder marker comment style in v1alpha2 types+11/-11
Normalize kubebuilder marker comment style in v1alpha2 types
• Same '//+kubebuilder:' → '// +kubebuilder:' normalization as v1alpha1.api/v1alpha2/backstage_types.go
backstage_types.go
Normalize kubebuilder marker comment style in v1alpha3 types+13/-13
Normalize kubebuilder marker comment style in v1alpha3 types
• Same comment normalization as other API versions.api/v1alpha3/backstage_types.go
backstage_types.go
Normalize kubebuilder marker comment style in v1alpha4 types+11/-11
Normalize kubebuilder marker comment style in v1alpha4 types
• Same comment normalization as other API versions.api/v1alpha4/backstage_types.go
backstage_types.go
Normalize kubebuilder marker comment style in v1alpha5 types+11/-11
Normalize kubebuilder marker comment style in v1alpha5 types
• Same comment normalization as other API versions.api/v1alpha5/backstage_types.go
deployable_finder.go
Normalize commented-out log statements+3/-3
Normalize commented-out log statements
• Reformats '//lg.' commented lines to '// lg.' to satisfy the linter.internal/controller/deployable_finder.go
mock_client.go
Normalize commented-out code style+1/-1
Normalize commented-out code style
• Reformats a commented-out return statement to satisfy the linter.internal/controller/mock_client.go
watchers.go
Normalize commented-out code style in watchers+8/-8
Normalize commented-out code style in watchers
• Reformats several commented-out lines to satisfy the linter.internal/controller/watchers.go
utils.go
Reformat long function signatures and fix import ordering+18/-6
Reformat long function signatures and fix import ordering
• Breaks 'generateConfigMap', 'generateSecret', 'executeRemoteCommand', and 'backstageDeployment' signatures across multiple lines. Moves 'k8s.io/apimachinery/pkg/util/yaml' import to the correct group. Extracts a local variable for 'client.MatchingLabels' to reduce line length.integration_tests/utils.go
matchers.go
Reformat long string literal in matcher template+2/-1
Reformat long string literal in matcher template
• Splits a long string literal across two lines to satisfy the linter.integration_tests/matchers.go
e2e_suite_test.go
Refactor e2e suite: extract isEnvEnabled helper and reformat long lines+20/-10
Refactor e2e suite: extract isEnvEnabled helper and reformat long lines
• Extracts 'isEnvEnabled(env string) bool' helper to reduce repetition. Reformats long 'exec.Command' and 'EventuallyWithOffset' calls. Normalizes commented-out code style.tests/e2e/e2e_suite_test.go
e2e_upgrade_test.go
Reformat long lines in upgrade e2e test+12/-8
Reformat long lines in upgrade e2e test
• Breaks long 'EventuallyWithOffset' and 'g.Expect' calls across multiple lines to satisfy the linter.tests/e2e/e2e_upgrade_test.go
helper_backstage.go
Reformat long function signatures and exec.Command calls in helper+21/-9
Reformat long function signatures and exec.Command calls in helper
• Breaks 'VerifyBackstageAppAccessWithUrlProvider', 'VerifyBackstageCRStatus', 'PatchBackstageCR', 'GetBackstageRouteHost', and 'VerifyBackstageAppAccess' calls across multiple lines.tests/helper/helper_backstage.go
utils.go
Reformat StartPortForward function signature+6/-1
Reformat StartPortForward function signature
• Breaks the 'StartPortForward' function signature across multiple lines to satisfy the linter.tests/helper/utils.go
utils_test.go
Normalize commented-out code style in utils tests+8/-6
Normalize commented-out code style in utils tests
• Reformats commented-out assertions and inline comments to satisfy the linter.pkg/utils/utils_test.go
Other (21)
lint-config-checks.yaml
Add CI workflow to verify golangci-lint configuration+27/-0
Add CI workflow to verify golangci-lint configuration
• New GitHub Actions workflow that triggers on changes to '.golangci.yml' or itself, runs 'make lint-config' to validate the linter configuration is well-formed..github/workflows/lint-config-checks.yaml
.golangci.yml
Rewrite golangci-lint config to v2 format with additional linters+51/-3
Rewrite golangci-lint config to v2 format with additional linters
• Migrates the config to the golangci-lint v2 schema. Enables errcheck, govet, ineffassign, misspell, nakedret, unconvert, and unused linters in addition to staticcheck. Adds gofmt and goimports formatters. Adds path exclusions for third_party/builtin/examples. Several linters (copyloopvar, dupl, revive, etc.) are commented out as tracked tech debt..golangci.yml
Makefile
Bump all tool versions and refactor go-install-tool to use symlinks+53/-35
Bump all tool versions and refactor go-install-tool to use symlinks
• Updates operator-sdk (v1.37→v1.42.2), OPM (v1.23→v1.72.0), kustomize (v5.4.2→v5.8.1), golangci-lint (v2.6.2→v2.12.2), goimports (v0.16.1→v0.46.0), gosec (v2.22.8→v2.27.1), and ginkgo (v2.22.2→v2.28.1). Refactors 'go-install-tool' to store versioned binaries and create a symlink at the unversioned path, so multiple versions can coexist. Adds 'setup-envtest' and 'lint-config' phony targets. Fixes 'gosec' invocation to add '-exclude-generated'. Removes version suffix from tool binary variable names (e.g. 'KUSTOMIZE' no longer embeds the version).Makefile
kustomization.yaml
Add metrics service resource and extensive commented scaffold for cert-manager/webhook+208/-0
Add metrics service resource and extensive commented scaffold for cert-manager/webhook
• Adds 'metrics_service.yaml' as a resource and 'manager_metrics_patch.yaml' as a patch to enable the HTTPS metrics endpoint. Includes a large block of commented-out kustomize replacements for cert-manager CA injection (webhook, validating/mutating/conversion webhooks), following the operator-sdk v1.42 scaffold template.config/manager/kustomization.yaml
manager_metrics_patch.yaml
Add kustomize patch to inject --metrics-bind-address arg+4/-0
Add kustomize patch to inject --metrics-bind-address arg
• New JSON patch file that appends '--metrics-bind-address=:8443' to the manager container args, replacing the previously hardcoded arg in 'deployment.yaml'.config/manager/manager_metrics_patch.yaml
cert_metrics_manager_patch.yaml
Add kustomize patch for metrics-server certificate volume mounts+30/-0
Add kustomize patch for metrics-server certificate volume mounts
• New JSON patch file that adds a 'metrics-certs' volume (backed by the 'metrics-server-cert' Secret) and a corresponding volumeMount plus '--metrics-cert-path' arg to the manager container.config/manager/cert_metrics_manager_patch.yaml
deployment.yaml
Remove hardcoded metrics args from base deployment manifest+0/-2
Remove hardcoded metrics args from base deployment manifest
• Removes '--metrics-bind-address=:8443' and '--metrics-secure=true' from the base deployment args; these are now injected via kustomize patches.config/manager/deployment.yaml
metrics_service.yaml
Add metrics Service manifest for the controller manager+0/-0
Add metrics Service manifest for the controller manager
• New Kubernetes Service manifest exposing the controller manager metrics endpoint, referenced by the updated kustomization.config/manager/metrics_service.yaml
monitor.yaml
Update ServiceMonitor port name and add TLS config comments+10/-1
Update ServiceMonitor port name and add TLS config comments
• Renames the metrics endpoint port from 'https' to 'metrics' to match the new metrics Service. Adds a comment block explaining the security implications of 'insecureSkipVerify: true' and how to configure proper TLS.config/prometheus/monitor.yaml
kustomization.yaml
Move metrics_service.yaml reference from rbac to manager kustomization+0/-2
Move metrics_service.yaml reference from rbac to manager kustomization
• Removes the 'metrics_service.yaml' resource reference from the RBAC kustomization; it is now managed under 'config/manager/kustomization.yaml'.config/rbac/kustomization.yaml
kustomization.yaml
Remove stale cert-manager CA injection scaffold comments+0/-6
Remove stale cert-manager CA injection scaffold comments
• Removes commented-out cert-manager CA injection patch references that are no longer relevant.config/crd/kustomization.yaml
go.mod
Bump controller-runtime to v0.21.0 and k8s.io/* replace directives to v0.33.0+24/-26
Bump controller-runtime to v0.21.0 and k8s.io/* replace directives to v0.33.0
• Updates 'sigs.k8s.io/controller-runtime' from v0.19.4 to v0.21.0. Updates all 'k8s.io/*' replace directives from v0.31.3 to v0.33.0. Bumps ginkgo (v2.22.2→v2.28.1), gomega (v1.36.2→v1.39.1), and several transitive dependencies. Removes 'imdario/mergo', 'golang/groupcache', 'google/gofuzz', and 'asaskevich/govalidator'; adds 'Masterminds/semver', 'google/btree', 'sigs.k8s.io/randfill'.go.mod
go.sum
Update go.sum for all dependency changes+52/-35
Update go.sum for all dependency changes
• Reflects all additions, removals, and version changes from go.mod.go.sum
bundle.Dockerfile
Update operator-sdk version label in backstage.io bundle Dockerfile+1/-1
Update operator-sdk version label in backstage.io bundle Dockerfile
• Updates the 'operators.operatorframework.io.metrics.builder' label from operator-sdk-v1.37.0 to operator-sdk-v1.42.2.bundle/backstage.io/bundle.Dockerfile
backstage-operator.clusterserviceversion.yaml
Regenerate backstage.io CSV with updated operator-sdk version+3/-4
Regenerate backstage.io CSV with updated operator-sdk version
• Updates builder annotation to operator-sdk-v1.42.2, refreshes createdAt timestamp, and removes '--metrics-secure=true' from the manager container args (now the default).bundle/backstage.io/manifests/backstage-operator.clusterserviceversion.yaml
annotations.yaml
Update operator-sdk version in backstage.io bundle annotations+1/-1
Update operator-sdk version in backstage.io bundle annotations
• Updates the builder annotation to operator-sdk-v1.42.2.bundle/backstage.io/metadata/annotations.yaml
bundle.Dockerfile
Update operator-sdk version label in rhdh bundle Dockerfile+1/-1
Update operator-sdk version label in rhdh bundle Dockerfile
• Updates the 'operators.operatorframework.io.metrics.builder' label to operator-sdk-v1.42.2.bundle/rhdh/bundle.Dockerfile
backstage-operator.clusterserviceversion.yaml
Regenerate rhdh CSV with updated operator-sdk version+3/-4
Regenerate rhdh CSV with updated operator-sdk version
• Updates builder annotation to operator-sdk-v1.42.2, refreshes createdAt timestamp, and removes '--metrics-secure=true' from the manager container args.bundle/rhdh/manifests/backstage-operator.clusterserviceversion.yaml
annotations.yaml
Update operator-sdk version in rhdh bundle annotations+1/-1
Update operator-sdk version in rhdh bundle annotations
• Updates the builder annotation to operator-sdk-v1.42.2.bundle/rhdh/metadata/annotations.yaml
install.yaml
Remove --metrics-secure=true from backstage.io dist install manifest+1/-2
Remove --metrics-secure=true from backstage.io dist install manifest
• Removes the now-default '--metrics-secure=true' flag from the manager container args in the generated install manifest.dist/backstage.io/install.yaml
install.yaml
Remove --metrics-secure=true from rhdh dist install manifest+1/-2
Remove --metrics-secure=true from rhdh dist install manifest
• Same as backstage.io dist: removes the redundant '--metrics-secure=true' flag.dist/rhdh/install.yaml
PR images are available:
- https://quay.io/rhdh-community/operator:0.11.0-pr-2060-5aed707
- https://quay.io/rhdh-community/operator-bundle:0.11.0-pr-2060-5aed707
- https://quay.io/rhdh-community/operator-catalog:0.11.0-pr-2060-5aed707
/agentic_review
Code review by qodo was updated up to the latest commit https://github.com/redhat-developer/rhdh-operator/commit/5aed70774e94084dc84a23c1fb3dc859a505d35a
PR images are available:
- https://quay.io/rhdh-community/operator:0.11.0-pr-2060-5cd26b9
- https://quay.io/rhdh-community/operator-bundle:0.11.0-pr-2060-5cd26b9
- https://quay.io/rhdh-community/operator-catalog:0.11.0-pr-2060-5cd26b9
PR images are available:
- https://quay.io/rhdh-community/operator:0.11.0-pr-2060-18a3644
- https://quay.io/rhdh-community/operator-bundle:0.11.0-pr-2060-18a3644
- https://quay.io/rhdh-community/operator-catalog:0.11.0-pr-2060-18a3644