cluster-api-provider-gcp
cluster-api-provider-gcp copied to clipboard
Add support for Instance Alias IP Ranges
What type of PR is this? /kind feature
What this PR does / why we need it: Allows instances to be created with a Secondary Alias IP/CIDR Range configured. https://cloud.google.com/vpc/docs/alias-ip
This enables things like Cilium to use Google Cloud's networks for Native Routing. By giving each pod/service an IP from the Alias IP Range.
TODOs:
- [X] squashed commits
- [ ] includes documentation
- [ ] adds unit tests
Release note:
Add support for Instance Alias IP Ranges. `GCPMachine.Spec.AliasIPRanges` This allows for [Native Routing](https://docs.cilium.io/en/stable/network/concepts/routing/#google-cloud).
Hi @jwmay2012. Thanks for your PR.
I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
I understand the commands that are listed here.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
Deploy Preview for kubernetes-sigs-cluster-api-gcp ready!
| Name | Link |
|---|---|
| Latest commit | acb982fb8ec2202717885041227d7d3e06f66795 |
| Latest deploy log | https://app.netlify.com/projects/kubernetes-sigs-cluster-api-gcp/deploys/68e94b32f194da000885f1c6 |
| Deploy Preview | https://deploy-preview-1314--kubernetes-sigs-cluster-api-gcp.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify project configuration.
/ok-to-test
Rebased. We're running this code and it's helping us enable Native Routing for our Pods in GCP. Let me know if there's anything else to be done before merge :)
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.
This bot triages PRs according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the PR is closed
You can:
- Mark this PR as fresh with
/remove-lifecycle stale - Close this PR with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
Having the ability to utilize Native Networking in GCP for pods and services from CAPI && CAPG is pretty neat and enabled by being able to configure these Alias IP Ranges. We're still using this for our clusters but would love to get it upstreamed and stop using our custom build :) A pretty standard GCPMachine spec addition and conversion to the existing GCP SDK structs.
Is there something I could do to help move this ticket forward? Thanks :)
I think this would be a good addition. Any thoughts @cpanato @salasberryfin @richardcase ?
/retest
It would be great to see this merged. 👍🏽
@jwmay2012 You might be interested in this change I made in our fork, in relation to this PR: https://github.com/getditto/cluster-api-provider-gcp/commit/50effa68ce3a4c99e3454e5f82b2ab1859a72d2e
It adds a firewall rule allowing traffic from the secondary IP ranges. Necessary if using native routing mode from pods.
The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs.
This bot triages PRs according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the PR is closed
You can:
- Mark this PR as fresh with
/remove-lifecycle rotten - Close this PR with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages PRs according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the PR is closed
You can:
- Reopen this PR with
/reopen - Mark this PR as fresh with
/remove-lifecycle rotten - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close
@k8s-triage-robot: Closed this PR.
In response to this:
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages PRs according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied- After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied- After 30d of inactivity since
lifecycle/rottenwas applied, the PR is closedYou can:
- Reopen this PR with
/reopen- Mark this PR as fresh with
/remove-lifecycle rotten- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
/reopen
@sl1pm4t: You can't reopen an issue/PR unless you authored it or you are a collaborator.
In response to this:
/reopen
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
/reopen
@jwmay2012: Reopened this PR.
In response to this:
/reopen
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
Merged main but this test seems broken.(wont run. other builds have same problem) This should still be good to merge.
@barbacbd are you happy with this?
@damdo this is LGTM
@jwmay2012 You might be interested in this change I made in our fork, in relation to this PR: getditto@50effa6
It adds a firewall rule allowing traffic from the secondary IP ranges. Necessary if using native routing mode from pods.
@sl1pm4t We use a SharedVPC and manage our own Subnets and firewalls via terraform. (firewall rule generation is disabled when using a SharedVPC in CAPG) So I won't be able to make or test any firewall rule changes in this PR, unfortunately.
@cpanato @damdo I've added some unit tests and tests that use the API server to validate the CRD regex validation for the fields. Also added some documentation.
Let me know what ya think and if there's anything else needed to get this merged.
I'm uncertain what would be required to do a full e2e test, but my changes end where the "google.golang.org/api/compute/v1" SDK begins.
I can say, with this field, GCP Machines are created with Alias IP ranges option on the Network interfaces section with the correct value and function. Our environment uses a SharedVPC subnet created outside CAPG.
/retest
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: damdo, jwmay2012
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [damdo]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
/retest
@cpanato @salasberryfin @justinsb @barbacbd
Are you able to add your review or LGTM if happy? Thanks!
Thanks!
/lgtm
Copyright corrected
/label tide/merge-method-squash
Re-adding LGTM after feedback addressing
/lgtm