-
Notifications
You must be signed in to change notification settings - Fork 40
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 IP addresses of PacketMachine(Template) configurable #484
Conversation
Signed-off-by: Ondrej Vasko <ondrej.vaskoo@gmail.com>
Welcome @Lirt! |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Lirt The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
Based on discussion in issue #226 I think this PR can be closed. TLDR explanation: If you think this PR could be beneficial, please contact maintainers and reopen. |
What this PR does / why we need it:
This PR allows users to configure IP addresses of packet machines through PacketMachineTemplate. It helps to fix issue #226.
As described in Equinix API Spec the device is by default configured with 1 Public IPv4, 1 Private IPv4 and 1 Public IPv6 address.
Currently there is no way to change this setting in CAPP. This change allows full control of IP address struct from within PacketMachineTemplate.
Here is example of PacketMachineTemplate with 1 IPv4 private address:
This change is backwards compatible as by default it keeps the structure empty which resolves to default.
Notes
In ideal scenario the struct for IP addresses would look like this (see the type
packngo.IPAddressCreateRequest
):And then we wouldn't need code that unpacks slice:
But this isn't possible, because this structure doesn't provide the necessary DeepCopy functions in the packngo library. Implementing those functions in
packngo
would allow us to use it and we could in turn define IP addresses like this:Signed-off-by: Ondrej Vasko ondrej.vaskoo@gmail.com