Skip to content

fix(helm): remove duplicate metrics service causing install failures#83

Merged
ian-flores merged 1 commit intomainfrom
fix-duplicate-metrics-service-v2
Feb 12, 2026
Merged

fix(helm): remove duplicate metrics service causing install failures#83
ian-flores merged 1 commit intomainfrom
fix-duplicate-metrics-service-v2

Conversation

@ian-flores
Copy link
Collaborator

@ian-flores ian-flores commented Feb 12, 2026

Summary

  • Remove dist/chart/templates/rbac/auth_proxy_service.yaml which duplicates the metrics service already defined in dist/chart/templates/metrics/metrics-service.yaml
  • Add rm -f post-processing step to make helm-generate to prevent kubebuilder from re-introducing the file

Context

The duplicate was originally fixed in PR #44 (Jan 20) and comprehensively addressed in PR #60 (Feb 2), but was re-introduced in commit ec76694 ("fix tests", Feb 3). Every release from v1.6.0 onward has both files, causing services "team-operator-controller-manager-metrics-service" already exists errors when both rbac.enable and metrics.enable are true.

Test plan

  • helm template renders only one metrics service
  • make helm-generate does not re-create auth_proxy_service.yaml
  • Deploy to staging cluster and verify no "already exists" error

The auth_proxy_service.yaml in rbac/ creates the same
team-operator-controller-manager-metrics-service as the one in
metrics/metrics-service.yaml. When both rbac.enable and metrics.enable
are true, Helm fails with "already exists".

Add rm -f to helm-generate post-processing to prevent kubebuilder from
re-introducing the duplicate.
@claude
Copy link

claude bot commented Feb 12, 2026

Claude finished @ian-flores's task —— View job


PR Review: fix(helm): remove duplicate metrics service causing install failures

  • Read review guidelines
  • Analyze the PR diff and changed files
  • Review Helm chart changes against checklist
  • Submit review

Overall: Clean, targeted fix that correctly addresses the duplicate service issue.

What's good

  • The deleted auth_proxy_service.yaml was indeed a duplicate of metrics-service.yaml — same service name, same ports, same selector. The only difference was the gate (.Values.rbac.enable vs .Values.metrics.enable), making the metrics-gated version the correct one to keep.
  • The rm -f in helm-generate follows the existing pattern on line 189 (rm -f .github/workflows/test-chart.yml), preventing kubebuilder from re-introducing the file on regeneration.

Helm checklist

  • Templates render correctly — only one metrics service will be produced
  • RBAC permissions are minimal — no RBAC change, just removal of a misplaced service
  • Values have sensible defaults — no values changes

Suggestion (non-blocking)

Makefile:184-186 — The 3-line comment block is more verbose than other comments in the helm-generate target (compare with the single-line comments on lines 179, 182, 188). The first line (Remove duplicate metrics service...) provides sufficient context; the other two explain why the bug existed and which service is correct, which already lives in the PR description and commit message. Consider trimming to one line for consistency.

Security

No security concerns — this is purely removing a duplicate resource definition. No RBAC, credential, or network policy changes.


Note: I was unable to post a formal GitHub review with inline comments because the create_and_submit_pull_request_review and add_comment_to_pending_review tools were not granted. To enable formal reviews, add these tools to --allowedTools.

@ian-flores ian-flores marked this pull request as ready for review February 12, 2026 16:28
@ian-flores ian-flores requested a review from timtalbot February 12, 2026 16:28
@ian-flores ian-flores merged commit 8533b4f into main Feb 12, 2026
7 checks passed
@ian-flores ian-flores deleted the fix-duplicate-metrics-service-v2 branch February 12, 2026 16:39
ian-flores pushed a commit that referenced this pull request Feb 12, 2026
## [1.8.1](v1.8.0...v1.8.1) (2026-02-12)

### Bug Fixes

* **helm:** remove duplicate metrics service causing install failures ([#83](#83)) ([8533b4f](8533b4f))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments