tigerquoll commented on code in PR #1060:
URL: https://github.com/apache/yunikorn-k8shim/pull/1060#discussion_r3766751286
##########
pkg/admission/webhook_manager.go:
##########
@@ -91,6 +91,11 @@ func NewWebhookManager(conf *conf.AdmissionControllerConf)
(WebhookManager, erro
log.Log(log.AdmissionWebhook).Error("Unable to create
kubernetes config", zap.Error(err))
return nil, err
}
+ // the webhook and secret writes must be attributed to the admission
controller
+ kubeconfig.UserAgent =
client.UserAgent(client.UserAgentAdmissionController)
+ // no client side rate limiting: leaving the QPS at 0 would mean the
client-go defaults
+ // of 5 QPS / 10 burst
+ kubeconfig.QPS = -1
Review Comment:
Yes, that works here too - done in the latest push: `NewWebhookManager` now
uses `NewKubeClientWithUserAgent` and takes `GetClientSet()` from it. The
policy comes out the same: the admission controller never populates the
scheduler configuration, so the constructor resolves to unlimited, which is
exactly what the hand-set `QPS = -1` did. Same user agent, and the webhook
client now gets the standard "creating Kubernetes client" log line the other
clients get.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]