[SPLAT-594] vSphere: add zonal spec to infrastructure object#1278
Conversation
|
Hello @jcpowermac! Some important instructions when contributing to openshift/api: For merging purposes, this repository follows the no-Feature-Freeze process which means that in addition to the standard
OR
Who should apply these qe/docs/px labels?
|
9dad12a to
c991dea
Compare
|
@JoelSpeed @gnufied @rvanderp3 @bostrt |
|
I think this is easier to comprehend that the previous iteration with the deployment zones, are you happier with this iteration? |
It will certainly be easier for our users to interact with. Shouldn't be bad for us to work with either so I am good with it. Should I go ahead and fix this PR up and close the other one? wdyt? |
c991dea to
a1ec5ad
Compare
a1ec5ad to
650359d
Compare
|
mostly lgtm from storage POV. |
650359d to
55d3460
Compare
|
/lgtm |
JoelSpeed
left a comment
There was a problem hiding this comment.
This is looking a lot better than before and I'm finding it much easier to follow! Mostly nits from this point on
| type VSpherePlatformFailureDomainSpec struct { | ||
| // name defines the name of the VSpherePlatformFailureDomainSpec | ||
| // This name is arbitrary but will be used | ||
| // in VSpherePlatformDeploymentZone for association. |
There was a problem hiding this comment.
Will it?
Probably worth noting that the names should be globally unique.
Do we want to limit this to a certain set of characters? Eg [a-z._-]*?
There was a problem hiding this comment.
Nope I missed that with the changes will fix.
| Topology VSpherePlatformTopology `json:"topology"` | ||
|
|
||
| // ControlPlane determines if this failure domain is suitable for use by control plane machines. | ||
| // There is three valid options: Allowed and Disallowed. |
There was a problem hiding this comment.
| // There is three valid options: Allowed and Disallowed. | |
| // Valid options are Allowed and Disallowed. | |
| // When Allowed, control plane machines may be scheduled to this failure domain. | |
| // When Disallowed, control plane machines may not be scheduled to this failure domain. |
Why do we have this option? It seems odd not to have a partner here that determines if workers should be scheduled here
There was a problem hiding this comment.
After chatting with @rvanderp3 we are going to remove it. In the case of the installer the user can define in the machinepool which zones are used for node type.
0fbc9b8 to
711a040
Compare
JoelSpeed
left a comment
There was a problem hiding this comment.
Structure looks good, some additional detail in the godoc would be helpful, added comments. Please think about what happens when optional fields aren't specified. And note that the validations are not generated into docs, so we should tell users the formats we expect in the godocs
| // +kubebuilder:validation:Required | ||
| // +kubebuilder:validation:MinLength=1 | ||
| // +kubebuilder:validation:MaxLength=80 | ||
| // +kubebuilder:validation:Pattern=`^.*?` |
There was a problem hiding this comment.
What is this pattern doing?
There was a problem hiding this comment.
Not sure what validation to put here. This can be any string up to 80 characters. vCenter encodes the name simlar to a URI path string. tbh I think the only validation we can do is string length.
There was a problem hiding this comment.
Ok in that case lets drop this and make sure the comment on here explains the name is up to 80 chars in length
| Datacenter string `json:"datacenter"` | ||
|
|
||
| // computeCluster is the vCenter cluster in which virtual machine will be located. | ||
| // This value is required to be a path. |
There was a problem hiding this comment.
Can you include an example of the format in the godoc please
| // +kubebuilder:validation:MinItems=1 | ||
| Networks []string `json:"networks"` | ||
|
|
||
| // datastore is the name or inventory path of the datastore in which the |
There was a problem hiding this comment.
Please include an example of the correct format in the godoc
| // +optional | ||
| ResourcePool string `json:"resourcePool,omitempty"` | ||
|
|
||
| // folder is the name or inventory path of the folder in which the |
There was a problem hiding this comment.
Please include an example of the correct format in the godoc
|
|
||
| // folder is the name or inventory path of the folder in which the | ||
| // virtual machine is created/located. | ||
| // +kubebuilder:validation:MinLength=1 |
There was a problem hiding this comment.
Does minLength work with optional? Have you tested this?
There was a problem hiding this comment.
Should we just remove MinLength since it doesn't make much sense in this context? I think we would be more concerned if the string was too long or didn't validate.
There was a problem hiding this comment.
Yep happy to remove minlength
| // for the external and internal node networking. | ||
| type VSpherePlatformNodeNetworkingSpec struct { | ||
| // networkSubnetCidr IP address on VirtualMachine's network interfaces included in the fields' CIDRs | ||
| // that will be used in respective status.addresses fields. |
There was a problem hiding this comment.
What happens when this field is omitted
There was a problem hiding this comment.
I will add text regarding this.
These fields are for the CCM, if unused it reverts to previous method of setting the external and internal interfaces.
| // external represents the network configuration of the node that is externally routable. | ||
| // +optional | ||
| External VSpherePlatformNodeNetworkingSpec `json:"external"` | ||
| // internal represents the network configuration of the node that is routable only within the cluster. | ||
| // +optional | ||
| Internal VSpherePlatformNodeNetworkingSpec `json:"internal"` |
There was a problem hiding this comment.
Please include in the godoc what happens when these aren't configured
| // Currently, only a single vCenter is supported. | ||
| // --- | ||
| // + If VCenters is not defined use the existing cloud-config configmap defined | ||
| // in openshift-config. |
There was a problem hiding this comment.
This line needs a plus too
| // in openshift-config. | |
| // + in openshift-config. |
| - op: add | ||
| path: /spec/versions/name=v1/schema/openAPIV3Schema/properties/spec/properties/platformSpec/properties/vsphere/properties/vcenters/items/properties/server/anyOf | ||
| value: | ||
| - format: ipv4 |
There was a problem hiding this comment.
@Miciah you've spent a lot of time in regexes and kubebuilder "validation". Do these work?
| Internal VSpherePlatformNodeNetworkingSpec `json:"internal"` | ||
| } | ||
|
|
||
| // VSpherePlatformSpec holds the desired state of the vSphere infrastructure provider. |
There was a problem hiding this comment.
Will any operator be making this state real or is this information used by another component to decide how to act, but we needed a way for the cluster-admin to evolve the config over time?
There was a problem hiding this comment.
The installer will initially create it. The goal would be for the 3CMO and CSI operator to read and make changes to their configurations based on the cluster-admin changing this config.
|
@JoelSpeed @jcpowermac Given this is techpreview in 4.12, it should include the techpreview tags from #1294 (the proof is running) and then we can merge, though you may need openshift/installer#6336 in order to make use of it. |
abe6b2a to
ef9a6f9
Compare
|
@deads2k @JoelSpeed is there anything I need to fixup with this pr? |
JoelSpeed
left a comment
There was a problem hiding this comment.
Changes LGTM, thanks for working with me on this one
/lgtm
This PR implements the required fields necessary to add zonal topology for vSphere-based OpenShift clusters as a Tech Preview feature. It defines the vCenter based objects: datacenter, cluster, network, datastore, resource pool, folder and tag names that are required to provision and manage the arbitrary nature of vSphere and region and zone topology.
ef9a6f9 to
1c01e1e
Compare
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gnufied, jcpowermac, JoelSpeed The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/label qe-approved SPLAT is following FF since the majority of the changes involved was within the installer repo. |
|
@jcpowermac: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. I understand the commands that are listed here. |
This PR implements the required fields necessary to add zonal topology for vSphere-based OpenShift clusters.
It defines the vCenter based objects:
that is required to provision and manage the arbitrary nature of vSphere and region and zone topology.