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 feature for region self to use ec2metadata service for configuration #27

Merged
merged 1 commit into from
Sep 20, 2019

Conversation

trjstewart
Copy link
Contributor

Proposed changes

implements solution for issue #26 - use aws ec2 metadata for region config

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto master
  • I will ensure my PR is targeting the master branch and pulling from my branch from my own fork

@trjstewart
Copy link
Contributor Author

I am currently unsure how I can add tests to cover the feature given the reliance on the ec2metadata service, open to suggestions.

@pleshakov pleshakov added the enhancement Pull requests for new features/feature enhancements label Sep 19, 2019
Copy link
Contributor

@pleshakov pleshakov left a comment

Choose a reason for hiding this comment

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

@trjstewart thanks for the PR!

Please see a couple of consistency suggestions.

Additionally,
From the corresponding issue

I considered removing the region configuration all together and only using the EC2 Metadata service for configuration but I definitely think there is a use-case to allow for cross-region upstreams.

It is better to leave the region field so that we retain backward compatibility. I think the suggested special value self works OK. Alternatively, we could make the region field optional, so that if it is not set, then the asg-sync will try to discover the region.

We're gonna do some additional testing and get back to you shortly.

cmd/sync/aws.go Outdated Show resolved Hide resolved
cmd/sync/aws.go Outdated Show resolved Hide resolved
@trjstewart
Copy link
Contributor Author

It is better to leave the region field so that we retain backward compatibility. I think the suggested special value self works OK. Alternatively, we could make the region field optional, so that if it is not set, then the asg-sync will try to discover the region.

A colleague of mine did actually raise this same question. Personally I am more a fan of declarative configuration rather than something that could be attributed to a typo or the like.

Copy link
Contributor

@pleshakov pleshakov left a comment

Choose a reason for hiding this comment

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

👍

@pleshakov pleshakov merged commit f06d6ab into nginxinc:master Sep 20, 2019
@Rulox Rulox mentioned this pull request Nov 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Pull requests for new features/feature enhancements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants