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
b60ee806
Commit
b60ee806
authored
Apr 30, 2021
by
Brian Downs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add nodeName to etcd struct, update refs
Signed-off-by:
Brian Downs
<
brian.downs@gmail.com
>
parent
a1220f7f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
etcd.go
pkg/etcd/etcd.go
+4
-4
No files found.
pkg/etcd/etcd.go
View file @
b60ee806
...
...
@@ -72,6 +72,7 @@ type ETCD struct {
address
string
cron
*
cron
.
Cron
s3
*
s3
nodeName
string
}
type
learnerProgress
struct
{
...
...
@@ -92,6 +93,7 @@ type Members struct {
func
NewETCD
()
*
ETCD
{
return
&
ETCD
{
cron
:
cron
.
New
(),
nodeName
:
os
.
Getenv
(
"NODE_NAME"
),
}
}
...
...
@@ -891,8 +893,6 @@ type snapshotFile struct {
// snapshots on disk or in S3 along with their relevant
// metadata.
func
(
e
*
ETCD
)
listSnapshots
(
ctx
context
.
Context
,
snapshotDir
string
)
([]
snapshotFile
,
error
)
{
nodeName
:=
os
.
Getenv
(
"NODE_NAME"
)
var
snapshots
[]
snapshotFile
if
e
.
config
.
EtcdS3
{
...
...
@@ -924,7 +924,7 @@ func (e *ETCD) listSnapshots(ctx context.Context, snapshotDir string) ([]snapsho
snapshots
=
append
(
snapshots
,
snapshotFile
{
Name
:
filepath
.
Base
(
obj
.
Key
),
NodeName
:
nodeName
,
NodeName
:
e
.
nodeName
,
CreatedAt
:
&
metav1
.
Time
{
Time
:
ca
,
},
...
...
@@ -952,7 +952,7 @@ func (e *ETCD) listSnapshots(ctx context.Context, snapshotDir string) ([]snapsho
snapshots
=
append
(
snapshots
,
snapshotFile
{
Name
:
f
.
Name
(),
Location
:
"file://"
+
filepath
.
Join
(
snapshotDir
,
f
.
Name
()),
NodeName
:
nodeName
,
NodeName
:
e
.
nodeName
,
CreatedAt
:
&
metav1
.
Time
{
Time
:
f
.
ModTime
(),
},
...
...
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