-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LeaderElectionConfig UserAgent is not honored #2243
Comments
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
This may be resolved as the httpClient for leader election respects the kubeconfig passed into the options for the manager. Not sure this is what you were saying but this behavior did change and is now in v0.16.0 |
/kind support |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close not-planned |
@k8s-triage-robot: Closing this issue, marking it as "Not Planned". In response to this:
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/test-infra repository. |
Problem:
We are seeing two different user-agents for our controller in the kubernetes audit logs.
Expected:
The leader election user-agent should conform to what was specified in the controllerManager configuration.
Actual:
The leader-election user-agent is overriden by the controllerManager.
Details:
We figured that we were missing the
ctrl.Options.LeaderElectionConfig
. Trying to set this has no effect. With the following configurationIt seems that the user agent for the leader election client is ignored. Drilling through the code, the function used by the controller to build the leader election user agent is
rest.AddUserAgent
. That seems to be a misnomer, since it doesn't really "adds a user agent", but only concatenates the default k8s user agent with some suffix. (I would've expected it to rather append the given suffix to a pre-existing user-agent string)controller-runtime/pkg/leaderelection/leader_election.go
Line 90 in c3c1f05
https://github.com/kubernetes/client-go/blob/4666344cbcd76aba5a198e0fdfc3e7e5051698a9/rest/config.go#L593
The text was updated successfully, but these errors were encountered: