mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
Fix lint failures
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
This commit is contained in:
parent
a5355f0827
commit
e95b75409a
@ -12,10 +12,7 @@ func (lb *LoadBalancer) writeConfig() error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := util.WriteFile(lb.configFile, string(configOut)); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
return util.WriteFile(lb.configFile, string(configOut))
|
||||
}
|
||||
|
||||
func (lb *LoadBalancer) updateConfig() error {
|
||||
|
@ -247,11 +247,7 @@ func genEncryptedNetworkInfo(controlConfig *config.Control, runtime *config.Cont
|
||||
}
|
||||
|
||||
controlConfig.IPSECPSK = psk
|
||||
if err := ioutil.WriteFile(runtime.IPSECKey, []byte(psk+"\n"), 0600); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
return ioutil.WriteFile(runtime.IPSECKey, []byte(psk+"\n"), 0600)
|
||||
}
|
||||
|
||||
func getServerPass(passwd *passwd.Passwd, config *config.Control) (string, error) {
|
||||
|
@ -1210,18 +1210,14 @@ func (e *ETCD) Restore(ctx context.Context) error {
|
||||
return err
|
||||
}
|
||||
logrus.Infof("Pre-restore etcd database moved to %s", oldDataDir)
|
||||
sManager := snapshot.NewV3(nil)
|
||||
if err := sManager.Restore(snapshot.RestoreConfig{
|
||||
return snapshot.NewV3(nil).Restore(snapshot.RestoreConfig{
|
||||
SnapshotPath: e.config.ClusterResetRestorePath,
|
||||
Name: e.name,
|
||||
OutputDataDir: etcdDBDir(e.config),
|
||||
OutputWALDir: walDir(e.config),
|
||||
PeerURLs: []string{e.peerURL()},
|
||||
InitialCluster: e.name + "=" + e.peerURL(),
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
||||
// snapshotRetention iterates through the snapshots and removes the oldest
|
||||
|
@ -11,12 +11,12 @@ import (
|
||||
"github.com/rancher/k3s/pkg/deploy"
|
||||
"github.com/rancher/k3s/pkg/generated/controllers/k3s.cattle.io"
|
||||
"github.com/rancher/k3s/pkg/version"
|
||||
"github.com/rancher/wrangler/pkg/apply"
|
||||
"github.com/rancher/wrangler/pkg/crd"
|
||||
"github.com/rancher/wrangler/pkg/generated/controllers/apps"
|
||||
"github.com/rancher/wrangler/pkg/generated/controllers/batch"
|
||||
"github.com/rancher/wrangler/pkg/generated/controllers/core"
|
||||
"github.com/rancher/wrangler/pkg/generated/controllers/rbac"
|
||||
"github.com/rancher/wrangler/pkg/apply"
|
||||
"github.com/rancher/wrangler/pkg/crd"
|
||||
"github.com/rancher/wrangler/pkg/start"
|
||||
"github.com/sirupsen/logrus"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/validation"
|
||||
|
@ -7,10 +7,10 @@ import (
|
||||
"strconv"
|
||||
|
||||
"github.com/rancher/k3s/pkg/version"
|
||||
appclient "github.com/rancher/wrangler/pkg/generated/controllers/apps/v1"
|
||||
coreclient "github.com/rancher/wrangler/pkg/generated/controllers/core/v1"
|
||||
"github.com/rancher/wrangler/pkg/apply"
|
||||
"github.com/rancher/wrangler/pkg/condition"
|
||||
appclient "github.com/rancher/wrangler/pkg/generated/controllers/apps/v1"
|
||||
coreclient "github.com/rancher/wrangler/pkg/generated/controllers/core/v1"
|
||||
"github.com/rancher/wrangler/pkg/objectset"
|
||||
"github.com/rancher/wrangler/pkg/relatedresource"
|
||||
"github.com/rancher/wrangler/pkg/slice"
|
||||
|
Loading…
Reference in New Issue
Block a user