Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
e95b7540
Commit
e95b7540
authored
Jul 03, 2021
by
Brad Davidson
Committed by
Brad Davidson
Aug 20, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix lint failures
Signed-off-by:
Brad Davidson
<
brad.davidson@rancher.com
>
parent
a5355f08
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
19 deletions
+8
-19
config.go
pkg/agent/loadbalancer/config.go
+1
-4
deps.go
pkg/daemons/control/deps/deps.go
+1
-5
etcd.go
pkg/etcd/etcd.go
+2
-6
context.go
pkg/server/context.go
+2
-2
controller.go
pkg/servicelb/controller.go
+2
-2
No files found.
pkg/agent/loadbalancer/config.go
View file @
e95b7540
...
@@ -12,10 +12,7 @@ func (lb *LoadBalancer) writeConfig() error {
...
@@ -12,10 +12,7 @@ func (lb *LoadBalancer) writeConfig() error {
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
if
err
:=
util
.
WriteFile
(
lb
.
configFile
,
string
(
configOut
));
err
!=
nil
{
return
util
.
WriteFile
(
lb
.
configFile
,
string
(
configOut
))
return
err
}
return
nil
}
}
func
(
lb
*
LoadBalancer
)
updateConfig
()
error
{
func
(
lb
*
LoadBalancer
)
updateConfig
()
error
{
...
...
pkg/daemons/control/deps/deps.go
View file @
e95b7540
...
@@ -247,11 +247,7 @@ func genEncryptedNetworkInfo(controlConfig *config.Control, runtime *config.Cont
...
@@ -247,11 +247,7 @@ func genEncryptedNetworkInfo(controlConfig *config.Control, runtime *config.Cont
}
}
controlConfig
.
IPSECPSK
=
psk
controlConfig
.
IPSECPSK
=
psk
if
err
:=
ioutil
.
WriteFile
(
runtime
.
IPSECKey
,
[]
byte
(
psk
+
"
\n
"
),
0600
);
err
!=
nil
{
return
ioutil
.
WriteFile
(
runtime
.
IPSECKey
,
[]
byte
(
psk
+
"
\n
"
),
0600
)
return
err
}
return
nil
}
}
func
getServerPass
(
passwd
*
passwd
.
Passwd
,
config
*
config
.
Control
)
(
string
,
error
)
{
func
getServerPass
(
passwd
*
passwd
.
Passwd
,
config
*
config
.
Control
)
(
string
,
error
)
{
...
...
pkg/etcd/etcd.go
View file @
e95b7540
...
@@ -1210,18 +1210,14 @@ func (e *ETCD) Restore(ctx context.Context) error {
...
@@ -1210,18 +1210,14 @@ func (e *ETCD) Restore(ctx context.Context) error {
return
err
return
err
}
}
logrus
.
Infof
(
"Pre-restore etcd database moved to %s"
,
oldDataDir
)
logrus
.
Infof
(
"Pre-restore etcd database moved to %s"
,
oldDataDir
)
sManager
:=
snapshot
.
NewV3
(
nil
)
return
snapshot
.
NewV3
(
nil
)
.
Restore
(
snapshot
.
RestoreConfig
{
if
err
:=
sManager
.
Restore
(
snapshot
.
RestoreConfig
{
SnapshotPath
:
e
.
config
.
ClusterResetRestorePath
,
SnapshotPath
:
e
.
config
.
ClusterResetRestorePath
,
Name
:
e
.
name
,
Name
:
e
.
name
,
OutputDataDir
:
etcdDBDir
(
e
.
config
),
OutputDataDir
:
etcdDBDir
(
e
.
config
),
OutputWALDir
:
walDir
(
e
.
config
),
OutputWALDir
:
walDir
(
e
.
config
),
PeerURLs
:
[]
string
{
e
.
peerURL
()},
PeerURLs
:
[]
string
{
e
.
peerURL
()},
InitialCluster
:
e
.
name
+
"="
+
e
.
peerURL
(),
InitialCluster
:
e
.
name
+
"="
+
e
.
peerURL
(),
});
err
!=
nil
{
})
return
err
}
return
nil
}
}
// snapshotRetention iterates through the snapshots and removes the oldest
// snapshotRetention iterates through the snapshots and removes the oldest
...
...
pkg/server/context.go
View file @
e95b7540
...
@@ -11,12 +11,12 @@ import (
...
@@ -11,12 +11,12 @@ import (
"github.com/rancher/k3s/pkg/deploy"
"github.com/rancher/k3s/pkg/deploy"
"github.com/rancher/k3s/pkg/generated/controllers/k3s.cattle.io"
"github.com/rancher/k3s/pkg/generated/controllers/k3s.cattle.io"
"github.com/rancher/k3s/pkg/version"
"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/apps"
"github.com/rancher/wrangler/pkg/generated/controllers/batch"
"github.com/rancher/wrangler/pkg/generated/controllers/batch"
"github.com/rancher/wrangler/pkg/generated/controllers/core"
"github.com/rancher/wrangler/pkg/generated/controllers/core"
"github.com/rancher/wrangler/pkg/generated/controllers/rbac"
"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/rancher/wrangler/pkg/start"
"github.com/sirupsen/logrus"
"github.com/sirupsen/logrus"
"k8s.io/apimachinery/pkg/apis/meta/v1/validation"
"k8s.io/apimachinery/pkg/apis/meta/v1/validation"
...
...
pkg/servicelb/controller.go
View file @
e95b7540
...
@@ -7,10 +7,10 @@ import (
...
@@ -7,10 +7,10 @@ import (
"strconv"
"strconv"
"github.com/rancher/k3s/pkg/version"
"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/apply"
"github.com/rancher/wrangler/pkg/condition"
"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/objectset"
"github.com/rancher/wrangler/pkg/relatedresource"
"github.com/rancher/wrangler/pkg/relatedresource"
"github.com/rancher/wrangler/pkg/slice"
"github.com/rancher/wrangler/pkg/slice"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment