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

Provider to ProviderConfig #320

Merged
merged 34 commits into from
Aug 31, 2020
Merged

Conversation

muvaf
Copy link
Member

@muvaf muvaf commented Aug 24, 2020

Description of your changes

Part of crossplane/crossplane#1684

Fixes #38 too

Checklist

I have:

  • Run make reviewable to ensure this PR is ready for review.
  • Ensured this PR contains a neat, self documenting set of commits.
  • Updated any relevant documentation, examples, or release notes.
  • Updated the dependencies in app.yaml to include any new role permissions.

Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
…roviderRef

Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
…erConfig

Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
@muvaf
Copy link
Member Author

muvaf commented Aug 24, 2020

After all resources are migrated, I will need to add region fields to the spec of the ones that need region for their operations.

Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
…derconfig

Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
@muvaf
Copy link
Member Author

muvaf commented Aug 24, 2020

All resources now use the same GetConfig method which takes care of backward compatibility and all quirks of AWS Authentication. Next step is to figure out which resources need region field. Right now, nothing is broken but if you use ProviderConfig, there is no field to specify region.

…t has the necessary changes

Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
@muvaf muvaf marked this pull request as ready for review August 27, 2020 16:08
@muvaf
Copy link
Member Author

muvaf commented Aug 27, 2020

This should be ready to go. @negz 's sentiment was right - region has always been just a default used during *aws.Config object creation, all resources already have zone/region fields if there needs to be.

@muvaf muvaf requested review from hasheddan and negz August 27, 2020 16:10
Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
Copy link
Member

@hasheddan hasheddan left a comment

Choose a reason for hiding this comment

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

@muvaf This looks pretty good to me, main question is just on the apiVersion we want to use for ProviderConfig. Thanks for working on this tedious update :)

limitations under the License.
*/

package v1alpha3
Copy link
Member

Choose a reason for hiding this comment

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

Should we introduce ProviderConfig at v1alpha1?

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 there might even be a case for introducing it at v1beta1, given that it's an evolution of the Provider type which has been stable for some time.

Copy link
Member

Choose a reason for hiding this comment

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

That seems pretty reasonable to me

Copy link
Member Author

Choose a reason for hiding this comment

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

Makes sense. The fields are pretty lean already (I don't think we'll ever get rid of cred secret ref), so, if we want to add new functionality we can just expand this without breaking anyone.

…viderRef

Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
@muvaf muvaf force-pushed the providemeconfig branch 2 times, most recently from 07cbb09 to 2ec4492 Compare August 31, 2020 12:11
Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
Copy link
Member

@hasheddan hasheddan left a comment

Choose a reason for hiding this comment

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

Looks like CI got stuck so I just restarted, but LGTM! Thanks @muvaf 🎉

@muvaf
Copy link
Member Author

muvaf commented Aug 31, 2020

FYI, codecov fails because I removed all Connect tests because all they do differently is to call a different func so it's unnecessary to maintain tests of each one of them separately.

@muvaf muvaf merged commit da1a197 into crossplane-contrib:master Aug 31, 2020
@muvaf muvaf deleted the providemeconfig branch August 31, 2020 15:32
@kasey kasey mentioned this pull request Oct 1, 2020
4 tasks
wolffbe pushed a commit to wolffbe/provider-aws that referenced this pull request Feb 12, 2021
namku pushed a commit to namku/provider-aws that referenced this pull request Mar 9, 2021
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.

The AWS cloud providers should not include the region
3 participants