mirror of
https://git.vectorsigma.ru/public/k3s.git
synced 2026-08-04 05:39:27 +00:00
Remove unnecessary copies of runtime struct
Several types contained redundant references to ControlRuntime data. Switch to consistently accessing this via config.Runtime instead.
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 2989b8b2c5)
This commit is contained in:
committed by
Brad Davidson
parent
171dd09d79
commit
a18c38d63d
@@ -39,11 +39,11 @@ func (c *Cluster) newListener(ctx context.Context) (net.Listener, http.Handler,
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
cert, key, err := factory.LoadCerts(c.runtime.ServerCA, c.runtime.ServerCAKey)
|
||||
cert, key, err := factory.LoadCerts(c.config.Runtime.ServerCA, c.config.Runtime.ServerCAKey)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
storage := tlsStorage(ctx, c.config.DataDir, c.runtime)
|
||||
storage := tlsStorage(ctx, c.config.DataDir, c.config.Runtime)
|
||||
return dynamiclistener.NewListener(tcp, storage, cert, key, dynamiclistener.Config{
|
||||
ExpirationDaysCheck: config.CertificateRenewDays,
|
||||
Organization: []string{version.Program},
|
||||
|
||||
Reference in New Issue
Block a user