-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Virtual IP configuration to set different address/port (#986)
**What problem does this PR solve?**: New configuration to support setting different virutalIP address from the external controlPlaneEndpoint. This is useful for Clusters like a Nutanix Cluster in a VPC where the virtual IP needs to be some IP from same Subnet as the VMs, but the conrtol-plane endpoint is a floating IP mapped to the virtual IP accessible from outside the VPC. ``` spec: topology: variables: - name: clusterConfig value: nutanix: controlPlaneEndpoint: host: x.x.x.x port: 6443 virtualIP: configuration: address: y.y.y.y ``` The "configuration" keyword comes from an existing API here https://github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/blob/8e2b30770c64d6976a7990274988d53f9626f169/api/v1alpha1/addon_types.go#L260 **Which issue(s) this PR fixes**: Fixes # **How Has This Been Tested?**: <!-- Please describe the tests that you ran to verify your changes. Provide output from the tests and any manual steps needed to replicate the tests. --> * New unit tests * Created a Nutanix Cluster inside a VPC Assigned a floating IP `10.22.198.34` to an internal IP `172.16.0.101` <img width="1123" alt="image" src="https://github.com/user-attachments/assets/1b099de8-1b88-4820-93fc-e4c2ea3e7586"> One of the control-plane VMs got the internal VIP assigned. <img width="547" alt="image" src="https://github.com/user-attachments/assets/bcc17ce8-f2c8-45ab-9a87-a1261a2c0bf0"> And the Cluster is accessible outside of the VPC. ``` kubectl get nodes NAME STATUS ROLES AGE VERSION dkoshkin-floating-ip-k9d74-d8jxp Ready control-plane 122m v1.30.5 dkoshkin-floating-ip-k9d74-fb5pb Ready control-plane 125m v1.30.5 dkoshkin-floating-ip-k9d74-wtl5w Ready control-plane 123m v1.30.5 dkoshkin-floating-ip-md-0-qkg7q-pm5z9-6zf8f Ready <none> 124m v1.30.5 ``` **Special notes for your reviewer**: <!-- Use this to provide any additional information to the reviewers. This may include: - Best way to review the PR. - Where the author wants the most review attention on. - etc. -->
- Loading branch information
Showing
12 changed files
with
337 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.