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

make Private IP of the internal LB of the API Server configurable #5274

Merged

Conversation

nawazkh
Copy link
Member

@nawazkh nawazkh commented Nov 13, 2024

What type of PR is this?
/kind feature

What this PR does / why we need it:

  • This PR makes the private IP of the internal LB of the API Server configurable.
  • We need private IP of the workload's API server to be configurable when deploying multiple workload clusters.
    • CAPZ defaults the Private IP to 10.0.0.100 (strongly coupled with DefaultVnetCIDR and DefaultControlPlaneSubnetCIDR)
    • While working with AKS as the management cluster; we peer mgmt VNet with Workload cluster's VNet so that mgmt cluster can reach to FQDN of the workload cluster's controlplane.
    • Since we peer VNets, we need the VNet CIDRs to be non-overlapping.
    • Since the VNet CIDRs have to be non-overlapping, we cannot default to 10.0.0.100 as the VNet CIDR will be opinionated when peering mgmt and workload cluster VNets.
    • Therefore, we want to have a configurable Private IP of the Internal LB of the API Server.

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 #5264

Special notes for your reviewer:

  • cherry-pick candidate

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests

Release note:

Private IP of the Internal LB of the API Server will be configurable

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Nov 13, 2024
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 13, 2024
@nawazkh nawazkh force-pushed the make_private_lb_ip_configurable branch from 9a4b4be to 52f19e9 Compare November 13, 2024 20:35
Copy link

codecov bot commented Nov 13, 2024

Codecov Report

Attention: Patch coverage is 92.55319% with 7 lines in your changes missing coverage. Please review.

Project coverage is 52.85%. Comparing base (8a89dfa) to head (2a44ea8).
Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
api/v1beta1/azurecluster_default.go 64.28% 4 Missing and 1 partial ⚠️
api/v1beta1/azurecluster_validation.go 94.28% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5274      +/-   ##
==========================================
+ Coverage   52.82%   52.85%   +0.03%     
==========================================
  Files         270      270              
  Lines       29085    29121      +36     
==========================================
+ Hits        15365    15393      +28     
- Misses      12928    12935       +7     
- Partials      792      793       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nawazkh nawazkh force-pushed the make_private_lb_ip_configurable branch 2 times, most recently from dac34a8 to 78fdefd Compare November 13, 2024 20:56
@nawazkh nawazkh marked this pull request as ready for review November 13, 2024 20:56
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 13, 2024
@willie-yao
Copy link
Contributor

/assign

@nawazkh
Copy link
Member Author

nawazkh commented Nov 14, 2024

A couple of questions:

  • We havent documented in our docs that the CAPZ templates will now allow specifying private IP for the API Server of the workload cluster. I think we should update the documentation as well.
  • We havent documented that an internal LB is created along side a public lb every time a user creates a template with public LB. And we are also updating the hosts file of the worker nodes. We should document that too.

Shall I do them in this PR or the uber PR #5248 that is revamping Tilt workflow ?

- Update cluster.go to add private IP of the ILB
- Create private IP to the API Server if not mentioned by the user. Going ahead, every API Server will have one Private IP attached to it.
- Add validation logic to the Private IP in the API Server LB Spec.
@nawazkh nawazkh force-pushed the make_private_lb_ip_configurable branch from 01e4267 to 2a44ea8 Compare November 14, 2024 00:43
@willie-yao
Copy link
Contributor

@nawazkh I think the documentation can be added in the uber PR if it will land prior to the release. Otherwise we'd want the docs to be up to date for the release.

Copy link
Contributor

@willie-yao willie-yao left a comment

Choose a reason for hiding this comment

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

/lgtm
/assign nojnhuh

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 14, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 76b1b171fd6a9e42e3fbcb5cbfcf3e0f7af1d1fd

@nojnhuh
Copy link
Contributor

nojnhuh commented Nov 14, 2024

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nojnhuh

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 Nov 14, 2024
@nawazkh nawazkh added this to the v1.18 milestone Nov 14, 2024
@k8s-ci-robot k8s-ci-robot merged commit 4ff53b9 into kubernetes-sigs:main Nov 14, 2024
21 checks passed
@nawazkh nawazkh deleted the make_private_lb_ip_configurable branch November 14, 2024 22:23
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. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Make internal LB IP configurable
4 participants