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

Plumb Azure interface's VPC / primary CIDR and set it as native routing CIDR in Azure IPAM mode #16696

Merged
merged 3 commits into from
Jul 1, 2021

Conversation

christarazi
Copy link
Member

@christarazi christarazi commented Jun 30, 2021

  • azure, ipam, k8s: Derive primary / VPC CIDR of Azure interface
  • daemon: Add Azure IPAM mode for setting the native routing CIDR

Related: #16672
Fixes: #16693

@christarazi christarazi added area/daemon Impacts operation of the Cilium daemon. sig/k8s Impacts the kubernetes API, or kubernetes -> cilium internals translation layers. sig/ipam IP address management, including cloud IPAM area/azure Impacts Azure based IPAM. needs-backport/1.10 release-note/bug This PR fixes an issue in a previous release of Cilium. labels Jun 30, 2021
@maintainer-s-little-helper maintainer-s-little-helper bot added dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. and removed dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. labels Jun 30, 2021
@maintainer-s-little-helper maintainer-s-little-helper bot added this to Needs backport from master in 1.10.2 Jun 30, 2021
@maintainer-s-little-helper maintainer-s-little-helper bot added this to Needs backport from master in 1.9.9 Jun 30, 2021
@christarazi christarazi changed the title pr/christarazi/router ip azure Plumb Azure interface's VPC / primary CIDR and set it as native routing CIDR Jun 30, 2021
@christarazi christarazi changed the title Plumb Azure interface's VPC / primary CIDR and set it as native routing CIDR Plumb Azure interface's VPC / primary CIDR and set it as native routing CIDR in Azure IPAM mode Jun 30, 2021
@christarazi

This comment has been minimized.

@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Needs backport from master to Backport pending to v1.10 in 1.10.2 Jun 30, 2021
@christarazi christarazi requested a review from aanm June 30, 2021 06:41
@christarazi christarazi marked this pull request as ready for review June 30, 2021 06:42
@christarazi christarazi requested a review from a team June 30, 2021 06:42
@christarazi christarazi requested review from a team as code owners June 30, 2021 06:42
@christarazi christarazi requested review from a team and tgraf June 30, 2021 06:42
Copy link
Member

@aanm aanm left a comment

Choose a reason for hiding this comment

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

LGTM, only a small nit

pkg/ipam/crd.go Show resolved Hide resolved
The `return` statement wasn't placed in the correct place, as the code
should return as soon as a valid result is found.

Signed-off-by: Chris Tarazi <chris@isovalent.com>
To align with other CRD-backed IPAM modes such as ENI and Alibaba,
derive the VPC CIDR from the Azure API and set it as the native routing
CIDR. This enables the subsequent commit to use the CIDR to validate the
router IPs upon restoration.

Signed-off-by: Chris Tarazi <chris@isovalent.com>
This will allow the router IP restoration logic to pick up the correct
pod CIDR to validate the router IP.

This also fixes the issue where upon Cilium restart, additional IPs
were erroneously assigned to `cilium_host`.

Signed-off-by: Chris Tarazi <chris@isovalent.com>
@christarazi christarazi force-pushed the pr/christarazi/router-ip-azure branch from 6c86624 to 037ba33 Compare June 30, 2021 23:12
@christarazi
Copy link
Member Author

christarazi commented Jul 1, 2021

test-me-please

Edit: AKS cluster failed to provision, rerunning

@christarazi
Copy link
Member Author

ci-aks

@aanm aanm merged commit dc7df4d into cilium:master Jul 1, 2021
@christarazi christarazi deleted the pr/christarazi/router-ip-azure branch July 1, 2021 05:37
@aanm aanm added this to Backport pending to v1.10 in 1.10.3 Jul 2, 2021
@aanm aanm removed this from Backport pending to v1.10 in 1.10.2 Jul 2, 2021
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Needs backport from master to Backport pending to v1.9 in 1.9.9 Jul 4, 2021
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Backport pending to v1.9 to Backport done to v1.9 in 1.9.9 Jul 12, 2021
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Backport pending to v1.9 to Backport done to v1.9 in 1.9.9 Jul 12, 2021
@aanm aanm moved this from Backport pending to v1.10 to Backport done to v1.10 in 1.10.3 Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/azure Impacts Azure based IPAM. area/daemon Impacts operation of the Cilium daemon. release-note/bug This PR fixes an issue in a previous release of Cilium. sig/ipam IP address management, including cloud IPAM sig/k8s Impacts the kubernetes API, or kubernetes -> cilium internals translation layers.
Projects
No open projects
1.10.3
Backport done to v1.10
1.9.9
Backport done to v1.9
4 participants