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

✨ Use filters to select subnet for machines #1833

Merged
merged 1 commit into from
Jul 27, 2020

Conversation

gab-satchi
Copy link
Member

What this PR does / why we need it:
Currently the only way to specify a subnet to be used by a machine is by using the subnetID. It's restrictive as the user may not always have the subnet provisioned beforehand or have access to the subnetID. These changes allow the user to specify AWS filters to be used to select a subnet for a given machine template.

It looks for subnet to use in the following order:

  • subnetID specified in template
  • subnet filters specified in template (will add availability-zone filter if failureDomain is also specified)
  • filter available private subnets by failureDomain if specified
  • select first available private subnet

If multiple subnets are returned by the filter parameters, the first one is used.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #1776

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 20, 2020
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jul 20, 2020
Copy link
Member

@detiber detiber left a comment

Choose a reason for hiding this comment

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

/lgtm

pkg/cloud/services/ec2/instances.go Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 23, 2020
@detiber detiber added this to the v0.5.5 milestone Jul 27, 2020
@rudoi
Copy link
Contributor

rudoi commented Jul 27, 2020

this looks good, thank you!

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rudoi

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 27, 2020
@k8s-ci-robot k8s-ci-robot merged commit d59f677 into kubernetes-sigs:master Jul 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement subnet filter capability currently in the API for AWSMachineTemplate
4 participants