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
9ef85a7e
Commit
9ef85a7e
authored
May 02, 2017
by
Maxim Ivanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restore buildTags in createTags
parent
54203aaa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
tags.go
pkg/cloudprovider/providers/aws/tags.go
+7
-1
No files found.
pkg/cloudprovider/providers/aws/tags.go
View file @
9ef85a7e
...
...
@@ -174,6 +174,10 @@ func (c *awsTagging) readRepairClusterTags(client EC2, resourceID string, lifecy
}
}
if
len
(
addTags
)
==
0
{
return
nil
}
if
err
:=
c
.
createTags
(
client
,
resourceID
,
lifecycle
,
addTags
);
err
!=
nil
{
return
fmt
.
Errorf
(
"error adding missing tags to resource %q: %v"
,
resourceID
,
err
)
}
...
...
@@ -184,7 +188,9 @@ func (c *awsTagging) readRepairClusterTags(client EC2, resourceID string, lifecy
// createTags calls EC2 CreateTags, but adds retry-on-failure logic
// We retry mainly because if we create an object, we cannot tag it until it is "fully created" (eventual consistency)
// The error code varies though (depending on what we are tagging), so we simply retry on all errors
func
(
t
*
awsTagging
)
createTags
(
client
EC2
,
resourceID
string
,
lifecycle
ResourceLifecycle
,
tags
map
[
string
]
string
)
error
{
func
(
t
*
awsTagging
)
createTags
(
client
EC2
,
resourceID
string
,
lifecycle
ResourceLifecycle
,
additionalTags
map
[
string
]
string
)
error
{
tags
:=
t
.
buildTags
(
lifecycle
,
additionalTags
)
if
tags
==
nil
||
len
(
tags
)
==
0
{
return
nil
}
...
...
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