-
Notifications
You must be signed in to change notification settings - Fork 398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kubernetes: add support for node pool taints #854
Kubernetes: add support for node pool taints #854
Conversation
829ac85
to
a9da600
Compare
@@ -337,6 +338,7 @@ func TestKubernetesList(t *testing.T) { | |||
|
|||
func TestKubernetesCreate(t *testing.T) { | |||
testNodePool := testNodePool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the point of testNodePool := testNodePool
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was already there when I touched the code :) I think it's meant to make a copy of testNodePool
to work with that does not interfere with other tests. Although this only has limited effect since testNodePool
includes slices and maps which are always copied by reference.
Probably something that can be addressed in a future PR (presumably by creating a function that returns a fresh, new testNodePool
struct on each invocation).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I was just curious. But yeah, I guess that makes sense. Thank you for the clarification!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added https://github.com/mitchellh/copystructure as a dependency in a recent PR that's been merged already so you could use that to do a deep copy if you wanted to!
@@ -337,6 +338,7 @@ func TestKubernetesList(t *testing.T) { | |||
|
|||
func TestKubernetesCreate(t *testing.T) { | |||
testNodePool := testNodePool | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra whitespace?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added it on purpose to provide for a better visual separation between initializations of more "complex" structs (namely labels and taints).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, sgtm!
go.mod
Outdated
@@ -52,3 +52,5 @@ require ( | |||
replace github.com/stretchr/objx => github.com/stretchr/objx v0.2.0 | |||
|
|||
replace golang.org/x/crypto => golang.org/x/crypto v0.0.0-20200420201142-3c4aac89819a | |||
|
|||
replace github.com/digitalocean/godo => github.com/timoreimann/godo v1.7.4-0.20200921135118-82e120c0a69c |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is adding github.com/timoreimann/godo
just for testing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes -- see the PR description about the temporary nature of the associated commit.
60ad833
to
e6b58c4
Compare
CI is failing because of the breaking change in |
e6b58c4
to
b93a049
Compare
This change allows to set node pool taints during node pool create and update operations.
b93a049
to
ae9567c
Compare
PR has been rebased onto the latest Thanks for the help @kamaln7 👏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
This change allows to set node pool taints during node pool create and update operations.
Refs digitalocean/DOKS#3