-
Notifications
You must be signed in to change notification settings - Fork 41
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
Add support for reservation IDs with MachineDeployment #136
Comments
Here is a typical template, taken from the apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
kind: PacketMachineTemplate
metadata:
name: ${CLUSTER_NAME}-worker-a
spec:
template:
spec:
OS: "${NODE_OS}"
facility:
- "${FACILITY}"
billingCycle: hourly
machineType: "${WORKER_NODE_TYPE}"
sshKeys:
- "${SSH_KEY}"
tags: [] Some possibilities:
# using strategy
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
kind: PacketMachineTemplate
metadata:
name: ${CLUSTER_NAME}-worker-a
spec:
template:
spec:
OS: "${NODE_OS}"
facility:
- "${FACILITY}"
billingCycle: hourly
machineType: "${WORKER_NODE_TYPE}"
sshKeys:
- "${SSH_KEY}"
strategy: reserved
tags: []
---
# using 'hardwareReservationIDs'
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
kind: PacketMachineTemplate
metadata:
name: ${CLUSTER_NAME}-worker-a
spec:
template:
spec:
OS: "${NODE_OS}"
facility:
- "${FACILITY}"
billingCycle: hourly
machineType: "${WORKER_NODE_TYPE}"
sshKeys:
- "${SSH_KEY}"
hardwareReservationIDs:
- abcd
- abce
- 12ff
tags: [] |
I like the idea to have a specific list and we can make it not mandatory: If the strategy=reserved and hardwareReservationIDs are set the procedure takes one from there, if hardwareReservationIDs are not set take a random one, if there are no resID available in the list of free-from API, fail or create demand. We can even have the
The way you wrote the YAML assumes that the Do you see the list as part of the PacketMachine?! Because if that's the case we should use that to close #134 |
This is the default
This is how I understood "reserved"
Oh, so you can specify a fallback. I like this. We just do it yaml-style: strategy:
- reserved
- ondemand
What would the yaml look like? |
The YAML will look like this: # using 'hardwareReservationIDs'
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
kind: PacketMachineTemplate
metadata:
name: ${CLUSTER_NAME}-worker-a
spec:
template:
hardwareReservationIDs:
- abcd
- abce
- 12ff
spec:
OS: "${NODE_OS}"
facility:
- "${FACILITY}"
billingCycle: hourly
machineType: "${WORKER_NODE_TYPE}"
sshKeys:
- "${SSH_KEY}"
tags: [] but I am not sure I can read that field from the machine reconciliation loop |
I like that a lot better than what I first drew up. If we can do that, we should. If not, then in the spec itself. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
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/test-infra repository. |
/reopen |
@cprivitere: Reopened this issue. In response to this:
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/test-infra repository. |
/lifecycle frozen |
This appears to have been solved at some point, perhaps in the updates for CAPI 1.X. But now you can add reserved hardware UUIDs or "next-available" to the packetmachinetemplate and it will provision them properly. Here's a quick example block: apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: PacketMachineTemplate
metadata:
name: my-cluster-control-plane
namespace: default
spec:
template:
spec:
billingCycle: hourly
machineType: c3.small.x86
os: ubuntu_18_04
sshKeys:
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDvMgVEubPLztrvVKgNPnRe9sZSjAqaYj9nmCkgr4PdK username@computer
tags: []
#If you want to specify the exact machines to use, provide a comma separated list of UUIDs
hardwareReservationID: "b537c5aa-2ef3-11ed-a261-0242ac120002,b537c5aa-2ef3-11ed-a261-0242ac120002"
#Or let the controller pick from available reserved hardware in the project that matches machineType and facility with `next-available`
#hardwareReservationID: "next-available" |
#409 fixes the docs for this. |
Issue #133 and related PR #134 reflect the request to deploy a single
Machine
with its attendantHardwareReservationID
.However, usually machines are deployed with a
MachineDeployment
, which has aPacketMachineTemplate
.This issue is to track what that would look like, eventually leading to a PR.
The text was updated successfully, but these errors were encountered: