[SPLAT-594] vSphere: add zonal spec to infrastructure object#1199
[SPLAT-594] vSphere: add zonal spec to infrastructure object#1199jcpowermac wants to merge 5 commits intoopenshift:masterfrom
Conversation
|
See enhancement: openshift/enhancements#918 |
8cadeb1 to
48f263b
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: jcpowermac The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
b1d51ae to
cfbf5bd
Compare
|
/test verify |
| // networks is the list of port group network names within this failure domain. | ||
| // Currently, we only support a single interface per RHCOS virtual machine. |
There was a problem hiding this comment.
What is an expected value here?
There was a problem hiding this comment.
port group name
@rvanderp3 @bostrt do you think this should be a path?
There was a problem hiding this comment.
i don't think a path is required here. the network is looked up relative to the associated datacenter and cluster.
There was a problem hiding this comment.
An example of an expected value is useful for godocs
| - op: add | ||
| path: /spec/versions/name=v1/schema/openAPIV3Schema/properties/spec/properties/platformSpec/properties/vsphere/properties/nodeNetworking/properties/external/properties/excludeNetworkSubnetCidr/items/format | ||
| value: cidr | ||
| - op: add | ||
| path: /spec/versions/name=v1/schema/openAPIV3Schema/properties/spec/properties/platformSpec/properties/vsphere/properties/nodeNetworking/properties/external/properties/networkSubnetCidr/items/format | ||
| value: cidr | ||
| - op: add | ||
| path: /spec/versions/name=v1/schema/openAPIV3Schema/properties/spec/properties/platformSpec/properties/vsphere/properties/nodeNetworking/properties/internal/properties/excludeNetworkSubnetCidr/items/format | ||
| value: cidr | ||
| - op: add | ||
| path: /spec/versions/name=v1/schema/openAPIV3Schema/properties/spec/properties/platformSpec/properties/vsphere/properties/nodeNetworking/properties/internal/properties/networkSubnetCidr/items/format | ||
| value: cidr |
There was a problem hiding this comment.
If you only have one format, can this not be kubebuilder:validation:Format:=cidr?
There was a problem hiding this comment.
For some reason kubebuilder adds the format not under items.
Unsure its a bug or a me problem.
cfbf5bd to
4544e36
Compare
4544e36 to
9113afe
Compare
9113afe to
e5ee9d5
Compare
e5ee9d5 to
a9c50d0
Compare
|
/test verify |
a9c50d0 to
514d253
Compare
This PR adds additional fields for the vSphere spec to provide zonal information for operators such as storage, machine and cloud controller.
514d253 to
2285e5f
Compare
| // +kubebuilder:validation:MaxLength=80 | ||
| Datacenter string `json:"datacenter"` | ||
|
|
||
| // computeCluster as the failure domain |
There was a problem hiding this comment.
What does this mean?
Is this option only valid when type is ComputeCluster?
Does this need to be a discrminated unionhttps://github.com/openshift/enhancements/blob/master/dev-guide/api-conventions.md#discriminated-unions?
There was a problem hiding this comment.
Changed text since we removed HostGroup as a topology option.
|
|
||
| // Topology describes a given failure domain using vSphere constructs | ||
| // +kubebuilder:validation:Required | ||
| Topology VSpherePlatformTopology `json:"topology"` |
There was a problem hiding this comment.
I'm getting the impression that the topology should be a discrminated union
topology:
type: Datacenter
datacenter:
name: ...
Why is the type in the region/zone failure domain rather than the topology?
There was a problem hiding this comment.
With the removal of HostGroup as a zone not sure this still applies.
Topology defines the vCenter-based objects that a region-zone pair includes.
| // +kubebuilder:validation:MaxLength=2048 | ||
| // +kubebuilder:validation:Pattern=`^/.*?/host/.*?/Resources.*` | ||
| // +optional | ||
| ResourcePool string `json:"resourcePool,omitempty"` |
There was a problem hiding this comment.
So this was something that is not configurable before and now it is. Can the values here conflict with folder optional below? If unspecified - the system picks a default ?
There was a problem hiding this comment.
ResourcePool is configurable
https://github.com/openshift/installer/blob/release-4.11/pkg/types/vsphere/platform.go#L42-L44
| // +kubebuilder:validation:Required | ||
| // +kubebuilder:validation:MinLength=1 | ||
| // +kubebuilder:validation:MaxLength=80 | ||
| TagCategory string `json:"tagCategory"` |
There was a problem hiding this comment.
One of the concerns @jsafrane raised was - since we are not enforcing anything on these tag category names, what happens if customers names them inconsistently? Such as say:
FailureDomain A- tag is "regionA", category is" k8s-region", for zone - tag is "zoneA", category is "k8s-zone"FailureDomain B- for region (tag isregionBand category is "k8s-region"), for zone (tag is "zoneB" and category is "locationZone")
In this case, categories of zones isn't matching and could create problems in determining topology of storage/nodes. I have not tested the behavior of CSI driver if categories are named inconsistently. In a ideal case, for failureDomain B - a reasonable person would name category of the zone to be k8s-zone (basically same as category name in failureDomainA).
So question is - should we enforce some kind of restriction on these names? Is allowing any random string for a domain is too broad and will cause problems?
There was a problem hiding this comment.
Basically I think that - if user is using tag category - "k8s-region" for region, then they should use same tag category for all the regions in the cluster. Values can be different but category names should be the same. Allowing different "ways" of naming tag categories opens us up for various kind of corner cases.
I was also thinking of picking a convention for these categories and sticking with it. So basically, you can't call your region category anything other than k8s-region, so on and so forth. What do you think?
There was a problem hiding this comment.
Updated removing the ability to set the tag category.
The Region and Zone are now just strings for the tag name.
There was a problem hiding this comment.
Is the category name now openshift-zone and openshift-region hardcoded values? Any other values are not accepted?
There was a problem hiding this comment.
Going to create a PR for the installer now to hardset the cloud-config labels to openshift-region, openshift-zone.
Will also update the enhancement
It won't be definable so not sure how other values would be accepted.
There was a problem hiding this comment.
There was a problem hiding this comment.
Thank you. much neater. If need be we can relax this later.
|
Here is an example of the yaml: |
|
@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. |
|
/close |
|
@jcpowermac: PR needs rebase. 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. |
|
@jcpowermac: Closed this PR. DetailsIn 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. |
No description provided.