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

Initial impl. of cloud provider for AWS #1229

Merged
merged 2 commits into from
Sep 12, 2014

Conversation

ragnard
Copy link
Contributor

@ragnard ragnard commented Sep 9, 2014

Sumitting the pull request discussed in issue #1187 for initial review and more feedback.

Implements only the cloudprovider.Instances interface for now.

New dependencies:

Caveats:

  • DNS name used is private DNS names (kubernetes should run in VPC)
  • filtering is done on the Name tag (private DNS is auto-assigned and not something you can affect)
    • should move away from regexp in order to better leverage cloud provider specific filtering capabilities (tags for AWS)

Configuration file is in INI format (as implemented by gcfg) and currently has only one (required) configuration option, the region:

[global]
region = eu-west-1

@ragnard ragnard mentioned this pull request Sep 9, 2014
@bgrant0607 bgrant0607 assigned jbeda and unassigned jbeda Sep 9, 2014
@bgrant0607
Copy link
Member

@jbeda @lavalamp @thockin Any volunteers to take a look at this, or suggest a reviewer?

@lavalamp
Copy link
Member

lavalamp commented Sep 9, 2014

@ragnard first, thanks a ton for this. Second, can you put the new dependencies and the other changes into separate commits? It's really hard to look at the important stuff in the github diff view when it's all together.

@lavalamp
Copy link
Member

lavalamp commented Sep 9, 2014

I also suspect I'm going to ask for tests :)

@ragnard
Copy link
Contributor Author

ragnard commented Sep 9, 2014

Syre, will do that. I'm UTC+0 so probably tomorrow...
On 9 Sep 2014 19:06, "Daniel Smith" notifications@github.com wrote:

@ragnard https://github.com/ragnard first, thanks a ton for this.
Second, can you put the new dependencies and the other changes into
separate commits? It's really hard to look at the important stuff in the
github diff view when it's all together.


Reply to this email directly or view it on GitHub
#1229 (comment)
.

@ragnard ragnard force-pushed the aws-provider branch 2 times, most recently from 2c3ff39 to 747c288 Compare September 9, 2014 21:26
@ragnard
Copy link
Contributor Author

ragnard commented Sep 9, 2014

Updated with separate commits for dependencies and cloud provider impl.

@ragnard
Copy link
Contributor Author

ragnard commented Sep 10, 2014

@lavalamp Regarding tests, I'm not sure what (if anything) is a good fit for unit testing in these commits. Did you have any specific concerns or suggestions? If so, I'd be happy to address them.

@lavalamp
Copy link
Member

@ragnard I'm willing to take this without tests, because it's still an improvement over not having it--

But I think readAWSCloudConfig, IPAddress, and getInstancesByRegex functions could use tests; for the latter two, you'd provide a fake/mock ec2 and verify that the functions are doing the right thing. This would help keep us from breaking the behavior should we do a refactor of the cloudprovider interface.

@ragnard ragnard force-pushed the aws-provider branch 2 times, most recently from 121084c to b469474 Compare September 11, 2014 14:57
@ragnard
Copy link
Contributor Author

ragnard commented Sep 11, 2014

@lavalamp Added some tests. This is basically the first Go code I'm writing so I'm probably missing some stuff. I extracted an interface for the EC2 interactions I'm doing, implemented that using the goamz/ec2 package, and used another, fake, implementation for the List test. Not to happy with how that turned out so I haven't added test for the other method (IPAddress) yet. Would be grateful for feedback/pointers.

@lavalamp
Copy link
Member

@ragnard Actually it looks pretty good, I left a few suggestions but you're basically doing it right.

@ragnard
Copy link
Contributor Author

ragnard commented Sep 11, 2014

@lavalamp Updated tests after suggestions. Added test for IPAddress.

- goamz: for interacting with AWS API
- gcfg: for cloud provider config file (as suggested in issue)
@lavalamp
Copy link
Member

LGTM

lavalamp added a commit that referenced this pull request Sep 12, 2014
Initial impl. of cloud provider for AWS
@lavalamp lavalamp merged commit 6eeb967 into kubernetes:master Sep 12, 2014
@ragnard ragnard deleted the aws-provider branch September 12, 2014 22:20
rphillips pushed a commit to rphillips/kubernetes that referenced this pull request Jun 9, 2022
Bug 2065749: UPSTREAM: 109103: cpu/memory manager containerMap memory leak
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