Conversation
Signed-off-by: emirot <emirot.nolan@gmail.com>
f318383 to
d1ed395
Compare
Bundle ReportBundle size has no change ✅ |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1095 +/- ##
==========================================
+ Coverage 53.46% 53.87% +0.40%
==========================================
Files 54 54
Lines 6168 6168
==========================================
+ Hits 3298 3323 +25
+ Misses 2511 2497 -14
+ Partials 359 348 -11 ☔ View full report in Codecov by Sentry. |
4c561a9 to
1170b58
Compare
Signed-off-by: emirot <emirot.nolan@gmail.com>
1170b58 to
86d7952
Compare
be2e956 to
86d7952
Compare
Signed-off-by: Nolan Emirot <emirot.nolan@gmail.com>
There was a problem hiding this comment.
Pull request overview
This PR removes the kube-rbac-proxy sidecar container and implements metrics authentication directly using controller-runtime's built-in filters, following the Kubebuilder community recommendation from kubernetes-sigs/kubebuilder#3907. This simplifies the deployment architecture by eliminating an external dependency while maintaining secure access to the metrics endpoint.
Changes:
- Removed kube-rbac-proxy sidecar container and replaced it with controller-runtime's native authentication/authorization filters
- Updated RBAC configuration to grant the controller service account permissions for token and subject access reviews
- Modified the metrics endpoint to bind directly on port 8443 with TLS enabled
Reviewed changes
Copilot reviewed 15 out of 17 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| go.mod, go.sum | Added indirect dependencies for controller-runtime metrics authentication (OpenTelemetry, k8s.io/apiserver, etc.) |
| cmd/main.go | Configured metrics server with filters.WithAuthenticationAndAuthorization for built-in auth |
| config/rbac/metrics_auth_role.yaml | New role granting permissions to create tokenreviews and subjectaccessreviews for metrics auth |
| config/rbac/metrics_auth_role_binding.yaml | Binds the metrics auth role to the controller-manager service account |
| config/rbac/metrics_reader_role.yaml | New role for reading metrics endpoint |
| config/rbac/kustomization.yaml | Updated to reference new RBAC files instead of auth_proxy files |
| config/rbac/auth_proxy_*.yaml | Removed old kube-rbac-proxy RBAC configuration files |
| config/manager/deployment.yaml | Added port definitions for https (8443) and health (8081) |
| config/manager/metrics_service.yaml | Updated service labels and structure, removed old kube-rbac-proxy references |
| config/manager/kustomization.yaml | Added metrics_service.yaml to resources list |
| config/default/manager_auth_proxy_patch.yaml | Removed kube-rbac-proxy sidecar container, updated args to bind metrics on :8443 with --metrics-secure=true |
| config/release/kustomization.yaml | Added newName and newTag fields (should be removed - see comments) |
| dist/install.yaml | Generated file reflecting all configuration changes |
| Tiltfile | Removed references to old kube-rbac-proxy ClusterRoles and ClusterRoleBindings |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Nolan Emirot <emirot.nolan@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Nolan Emirot <emirot.nolan@gmail.com>
Signed-off-by: emirot <emirot.nolan@gmail.com>
Signed-off-by: Nolan Emirot <emirot.nolan@gmail.com>
Signed-off-by: emirot <emirot.nolan@gmail.com>
Signed-off-by: emirot <emirot.nolan@gmail.com>
Signed-off-by: emirot <emirot.nolan@gmail.com>
Signed-off-by: Nolan Emirot <emirot.nolan@gmail.com>
Signed-off-by: Nolan Emirot <emirot.nolan@gmail.com>
Signed-off-by: emirot <emirot.nolan@gmail.com>
Signed-off-by: emirot <emirot.nolan@gmail.com>
Signed-off-by: emirot <emirot.nolan@gmail.com>
# Conflicts: # go.mod
Signed-off-by: emirot <emirot.nolan@gmail.com>
Signed-off-by: emirot <emirot.nolan@gmail.com>
Signed-off-by: emirot <emirot.nolan@gmail.com>
Signed-off-by: emirot <emirot.nolan@gmail.com>
What
Following kubernetes-sigs/kubebuilder#3907
Also requested from helm chart argoproj-labs/gitops-promoter-helm#35
Test
For http
5.Check If it is found

For https
Change the configuration
It also requieres a service account/ cluster role etc