Skip to content
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

Add serviceRole and instanceProfile to ClusterOptions #159

Merged
merged 11 commits into from
Jul 1, 2019

Conversation

VRanga000
Copy link
Contributor

@VRanga000 VRanga000 commented Jun 12, 2019

Addresses issue #159

Copy link
Contributor

@metral metral left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall. Left a couple of comments.

Thanks for the submission!

nodejs/eks/cluster.ts Outdated Show resolved Hide resolved
nodejs/eks/cluster.ts Show resolved Hide resolved
nodejs/eks/cluster.ts Show resolved Hide resolved
VRanga000 and others added 3 commits June 18, 2019 10:36
Co-Authored-By: metral <1112768+metral@users.noreply.github.com>
Co-Authored-By: metral <1112768+metral@users.noreply.github.com>
Copy link
Contributor

@metral metral left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. @lukehoban @pgavlin any thoughts?

nit: could you please squash the commit history before we merge? Thanks!

nodejs/eks/cluster.ts Outdated Show resolved Hide resolved
nodejs/eks/cluster.ts Outdated Show resolved Hide resolved
Copy link
Member

@lukehoban lukehoban left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One change I think is needed, along with the changes @pgavlin suggested - but looking forward to landing this!

@@ -216,9 +221,13 @@ export function createCore(name: string, args: ClusterOptions, parent: pulumi.Co
} else if (args.instanceRole) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a third branch of this if/else if/else if that also creates an InstanceProfile. I assume we need to update that one as well?

The branching here is a little wild, and probably eventually should get simplified down or refactored a bit - but that can be part of a a follow-up PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, currently the instanceprofile only seems to get created if a single iam role is passed in among the args. Presumably an instanceprofile (or profiles?) need to get get created in the "if" branch as well? In that branch, a list of roles are passed in. The only use case we currently have is when a single role is passed in, so I didn't pay attention to the other logical branches :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we do need to make the change in the other branch as well to be correct here. We are allowing the user to pass an explicit InstanceRole they want to use, but then in some cases will ignore it and create a new one anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok.. Ill address this shortly. Thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just pushed a commit for this.

@VRanga000
Copy link
Contributor Author

Thank you guys for the review / comments. Is anything else needed from me at this point to merge this PR?

Copy link
Contributor

@metral metral left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Resolve the conflicts and you should be all set. Thanks for the PR!

@lukehoban any thoughts before merging?

@VRanga000
Copy link
Contributor Author

LGTM. Resolve the conflicts and you should be all set. Thanks for the PR!

@lukehoban any thoughts before merging?

Thank you, conflicts resolved!

@lukehoban
Copy link
Member

Just bubbling this up - since I think my note got hidden in a resolved thread:

#159 (comment)

I think we do need to make the change in the other branch as well to be correct here. We are allowing the user to pass an explicit InstanceRole they want to use, but then in some cases will ignore it and create a new one anyway.

…iform in handling of instanceprofile creation
@lukehoban lukehoban dismissed pgavlin’s stale review July 1, 2019 20:15

The feedback was addressed.

@lukehoban lukehoban merged commit 743bcc6 into pulumi:master Jul 1, 2019
metral added a commit that referenced this pull request Jul 1, 2019
metral added a commit that referenced this pull request Jul 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants