mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
Merge pull request #106740 from wojtek-t/update_kubemark_clients
Update kubemark to use EndpointSlices and proper user-agents
This commit is contained in:
commit
022d49dcbc
@ -180,12 +180,13 @@ func run(cmd *cobra.Command, config *hollowNodeConfig) error {
|
||||
return fmt.Errorf("Failed to create a ClientConfig, error: %w. Exiting", err)
|
||||
}
|
||||
|
||||
client, err := clientset.NewForConfig(clientConfig)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Failed to create a ClientSet, error: %w. Exiting", err)
|
||||
}
|
||||
|
||||
if config.Morph == "kubelet" {
|
||||
clientConfig.UserAgent = "hollow-kubelet"
|
||||
client, err := clientset.NewForConfig(clientConfig)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Failed to create a ClientSet, error: %w. Exiting", err)
|
||||
}
|
||||
|
||||
f, c := kubemark.GetHollowKubeletConfig(config.createHollowKubeletOptions())
|
||||
|
||||
heartbeatClientConfig := *clientConfig
|
||||
@ -253,6 +254,8 @@ func run(cmd *cobra.Command, config *hollowNodeConfig) error {
|
||||
}
|
||||
|
||||
if config.Morph == "proxy" {
|
||||
clientConfig.UserAgent = "hollow-proxy"
|
||||
|
||||
client, err := clientset.NewForConfig(clientConfig)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Failed to create API Server client, error: %w", err)
|
||||
|
@ -118,16 +118,17 @@ func NewHollowProxyOrDie(
|
||||
}
|
||||
return &HollowProxy{
|
||||
ProxyServer: &proxyapp.ProxyServer{
|
||||
Client: client,
|
||||
EventClient: eventClient,
|
||||
IptInterface: iptInterface,
|
||||
Proxier: proxier,
|
||||
Broadcaster: broadcaster,
|
||||
Recorder: recorder,
|
||||
ProxyMode: "fake",
|
||||
NodeRef: nodeRef,
|
||||
OOMScoreAdj: utilpointer.Int32Ptr(0),
|
||||
ConfigSyncPeriod: 30 * time.Second,
|
||||
Client: client,
|
||||
EventClient: eventClient,
|
||||
IptInterface: iptInterface,
|
||||
Proxier: proxier,
|
||||
Broadcaster: broadcaster,
|
||||
Recorder: recorder,
|
||||
ProxyMode: "fake",
|
||||
NodeRef: nodeRef,
|
||||
UseEndpointSlices: true,
|
||||
OOMScoreAdj: utilpointer.Int32Ptr(0),
|
||||
ConfigSyncPeriod: 30 * time.Second,
|
||||
},
|
||||
}, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user