-
Notifications
You must be signed in to change notification settings - Fork 113
Fix manifest kustomization for metrics service #202
Fix manifest kustomization for metrics service #202
Conversation
Also removed unused ClusterRole and ClusterRoleBinding that is supposed to grant access through kube-rbac-proxy, which is currently not in use in HNC. Tested: Verified that metrics service works as annotated by prometheus service annotations
@@ -40,9 +40,6 @@ spec: | |||
- /manager | |||
args: | |||
- "--webhook-server-port=9443" | |||
# If /config/default/manager_auth_proxy_patch.yaml is used, the port in | |||
# --metrics-addr must match the value of --upstream passed to | |||
# kube-rbac-proxy. | |||
- "--metrics-addr=:8080" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't just changing this to 8443 fix our issue and still allow us to use HTTPS? I'm not sure we want to take a step back in security and not use HTTPS for metrics.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't just changing this to 8443 fix our issue and still allow us to use HTTPS? I'm not sure we want to take a step back in security and not use HTTPS for metrics.
No, there is nothing providing a HTTPS listener (on port 8443). Then we need to include the kube-rbac-proxy sidecar and route all metrics scrape request through its HTTPS listener - forwarding the request to the controller-manager metrics HTTP endpoint. That is an alternative mentioned in the PR description, though more complex, and I don't see the true benefit of this. I expect many K8s distros to block namespace ingress traffic by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah we took out kube-rbac-proxy a while ago (it has a bunch of problems from a supply chain perspective) and I'd rather not put it back in without good justification.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need rbac proxy for https, that is only needed for authz. We already serve https traffic for the webhook on 9443. So I guess I don't see why we couldn't also use it (or have the option) for 8443 for metrics. However, that is probably out of scope of this PR if metrics are currently broken.
I created this to revisit this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
/lgtm
/hold
/assign @rjbez17
I think this is good unless Ryan has any remaining concerns.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: adrianludwin, erikgb The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
I opened #204 to follow up on my concerns. /hold cancel |
@rjbez17 @adrianludwin Thanks for accepting this PR. I think this is a bugfix, and should be cherry-picked to the |
sgtm, I'd happily approve that and then release v1.0.1.
…On Fri, Apr 22, 2022 at 4:27 PM Erik Godding Boye ***@***.***> wrote:
@rjbez17 <https://github.com/rjbez17> @adrianludwin
<https://github.com/adrianludwin> Thanks for accepting this PR. I think
this is a bugfix, and should be cherry-picked to the v1.0 branch. The
metrics setup is borked in the 1.0 release. WDYT?
—
Reply to this email directly, view it on GitHub
<#202 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AE43PZBQSXYZ6EHEAHV67TTVGMDUJANCNFSM5TZW3W6A>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Nice, here is the cherry-pick PR: #207 |
Also removed unused ClusterRole and ClusterRoleBinding that is supposed to grant access through kube-rbac-proxy, which is currently not in use in HNC.
Tested: Verified that metrics service works as annotated by prometheus service annotations
Fixes #115
With this change, I can scrape metrics as described by metrics-service prometheus annotations:
Before this change, this fails:
Another option is to configure the kube-rbac-proxy. Please let me know if that solution is preferred.
/cc @adrianludwin