-
Notifications
You must be signed in to change notification settings - Fork 252
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 design doc for OpenStackServer #2021
🌱 Add design doc for OpenStackServer #2021
Conversation
✅ Deploy Preview for kubernetes-sigs-cluster-api-openstack ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
54cc388
to
703fff8
Compare
@lentzi90 Meta point: I recall you doing something similar before, but I can't find it to re-use it. I'm thinking of writing 2-4 of these in fairly quick succession, so it might be an opportunity to try to make something stick. If we have a better process already I'll switch to that instead. Hoping to write them for:
The latter likely has tentacles and may turn in to more than one (e.g. separate doc for failure domains). My thoughts on this are:
Purposes:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the great summary, it's really helpful
just one minor question
|
||
|
||
```go | ||
type OpenStackServerSpec struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there anything we need to do for existing customer to move to here? transparent or need define those ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a great point. I should make it clear in the doc that this change will happen automatically and the end user does not need to take any action. I'll update the doc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've just pushed a small change which adds:
- The upgrade is automatic and will not recreate existing OpenStack resources
- The new API will be in v1alpha1
703fff8
to
9b05e94
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall. I have no objections 🙂
* A Volume specified with `from: Machine` will use the value of `AvailabilityZone` instead of `Machine.FailureDomain`. | ||
|
||
It will set the following `Conditions`: | ||
* `Ready`: `True` when the server is fully provisioned. Once set to `True` will never be subsequently set to `False`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It sounds strange to me to never change it back, even though we could have Failed=True
. Is that intentional?
So we could have Ready=True
and Failed=True
at the same time 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about 3 Conditions:
Provisioned
: a latch which is never set to false after the server has been provisionedReady
: an ephemeral 'readiness' state. Can be false due to transient errors.Failed
: permanent failure. No further reconciliation. Never set to false after being set to true.
The previous thing I did is not merged so that's probably why you didn't find it 😄 |
Awesome proposal 👍 |
if server spec does not match bastion.Spec { | ||
deleteOpenStackServer(bastion) | ||
return | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we need to modify the OpenStackCluster here too to force an event?
ServerGroup *ServerGroupParam | ||
IdentityRef *OpenStackIdentityReference | ||
FloatingIPPoolRef *corev1.TypedLocalObjectReference | ||
UserDataRef *corev1.TypedLocalObjectReference |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so you want a new object for this one? Any reason why not passing a string anymore?
* ProviderID is not present: this is a Machine property | ||
* UserDataRef is added. If present it must exist. | ||
* AvailabilityZone is added, and refers explicitly | ||
* It is an error for Ports to be empty. Defaulting the cluster network must be done by the controller creating the object. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for ports in the OpenStackServerSpec? Do we want the same API as OpenStackMachineSpec
?
/lgtm |
I'm a bit late to the party however think the proposal sounds good 👍 |
I'm going to move this around to conform to the pattern set by #1565 |
Do we want to include a paragraph or two about if/how this could be used for MachinePool support in CAPO? From my understanding we would "just" need to add one higher level "pool" object to handle OpenStackServers in order to achieve that. |
What would this look like? I think MachinePool is for when the cloud has some efficiently-implemented native concept of a scalable set of machines. I don't think we have that in OpenStack? |
Good point. I think it would be doable, but we would end up with all the logic in CAPO to manage the pool, which is not ideal. Forget that I mentioned it 😅 |
In the same way that OpenStackMachine currently has an 'adoption' phase where it will adopt existing resources, OpenStackServer should adopt matching resources which it would have created. On upgrade to a new version of CAPO which manages the bastion with an OpenStackServer object, I would expect the flow to be: | ||
|
||
* Cluster controller creates OpenStackServer and waits for it to report Ready | ||
* OpenStackServer controller looks for existing resources matching its given spec |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part is a bit tricky, we'll need to compare every field out of instanceStatus, I started to play with it and it became messy.
Not against this idea, just making sure we really want to go down that path.
The risk of not doing that is that an instance would be adopted by OpenStackServer that wouldn't be matching 100% the spec if the instance would have been created by the OpenStackServer controller.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking the adoption behaviour would be identical to what we currently do in the OpenStackMachine controller. Literally the same code. We're basically just adopting by name.
/hold cancel |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: EmilienM 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 |
I'm expediting this but that doesn't mean we can't iterate on the design document that was initially proposed. |
Design proposal for #2020
/hold