From bd339b9c9c81401c3d8d25e7765a3d46a89fbfb9 Mon Sep 17 00:00:00 2001 From: ldsdsy Date: Sat, 17 Sep 2022 10:01:15 +0800 Subject: [PATCH] Eliminate unnecessary string conversions in options.go --- cmd/kube-apiserver/app/options/options.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/kube-apiserver/app/options/options.go b/cmd/kube-apiserver/app/options/options.go index 97f82fabd31..cb95df13492 100644 --- a/cmd/kube-apiserver/app/options/options.go +++ b/cmd/kube-apiserver/app/options/options.go @@ -112,7 +112,7 @@ func NewServerRunOptions() *ServerRunOptions { EnableLogsHandler: true, EventTTL: 1 * time.Hour, MasterCount: 1, - EndpointReconcilerType: string(reconcilers.LeaseEndpointReconcilerType), + EndpointReconcilerType: reconcilers.LeaseEndpointReconcilerType, IdentityLeaseDurationSeconds: 3600, IdentityLeaseRenewIntervalSeconds: 10, KubeletConfig: kubeletclient.KubeletClientConfig{ @@ -180,7 +180,7 @@ func (s *ServerRunOptions) Flags() (fss cliflag.NamedFlagSets) { "The number of apiservers running in the cluster, must be a positive number. (In use when --endpoint-reconciler-type=master-count is enabled.)") fs.MarkDeprecated("apiserver-count", "apiserver-count is deprecated and will be removed in a future version.") - fs.StringVar(&s.EndpointReconcilerType, "endpoint-reconciler-type", string(s.EndpointReconcilerType), + fs.StringVar(&s.EndpointReconcilerType, "endpoint-reconciler-type", s.EndpointReconcilerType, "Use an endpoint reconciler ("+strings.Join(reconcilers.AllTypes.Names(), ", ")+") master-count is deprecated, and will be removed in a future version.") fs.IntVar(&s.IdentityLeaseDurationSeconds, "identity-lease-duration-seconds", s.IdentityLeaseDurationSeconds,