Closed arunmk closed 10 months ago
pkg/ccm/vminfocache.go
line 139 at r1 (raw file):
I think this is also not needed. There should be query API to just get the VM record, given vmname and vAppname. No need to get the vApp record list.
The vAppName is not known because it also includes the nodepool name. The nodepool name is not available here.
However, as mentioned earlier, there is a regular-expression-based search that can be performed. That is covered by another ticket.
pkg/ccm/vminfocache.go
line 142 at r1 (raw file):
Can we not use the API http://vcd/api/query?type=vApp to retrieve all the VApps with the prefix?
This is handled by ticket https://jira.eng.vmware.com/browse/VKCI-283
pkg/ccm/instancesv2.go
line 132 at r1 (raw file):
Is it the responsibility of the user to update the configmap when OVDCs are renamed ? or will it be handled within CPI in a separate change set ?
It is the responsibility of CAPVCD. However that portion is not yet implemented.
pkg/ccm/vminfocache.go
line 107 at r1 (raw file):
Did we check if there exists simpler queryVM call in an org or ovdc? Like how we see in our UI. UI has vApp page and also VM page that only shows just VMs. It must be using some query API. If VM match found we can just check if its parent vapp matches our vapp name prefix
This will be handled by ticket https://jira.eng.vmware.com/browse/VKCI-283 and will not be handled in this commit.
pkg/ccm/vminfocache.go
line 125 at r1 (raw file):
+1
This is not clusterName. This is specifically vApp name which is clusterName
This can become vAppName, but then we lose the detail that this is related to the cluster.
pkg/ccm/vminfocache.go
line 125 at r1 (raw file):
This is not clusterName. This is specifically vApp name which is clusterName__ This can become vAppName, but then we lose the detail that this is related to the cluster.
clusterName_<OVDCID>_<nodePool>
pkg/ccm/vminfocache.go
line 139 at r1 (raw file):
The vAppName is not known because it also includes the nodepool name. The nodepool name is not available here. However, as mentioned earlier, there is a regular-expression-based search that can be performed. That is covered by another ticket.
isZoneEnabledCluster=true
will be set up by CSE backend, which is the one that installs CPI. CSE backend also configures the configmap into CPI.pkg/ccm/vminfocache.go
line 194 at r1 (raw file):
Reviewing the CPI code for the first time, excuse my lack of knowledge here. This call SearchVMsAcrossVdcs() - doesn't it need to be conditional, based on whether the cluster is MZ enabled?
Within the function, the zoneMap is used if it is not nil (which is set up only if the isZoneEnabledCluster
is set up). If the zoneMap is nil, the ovdcName is used (as specified earlier).
@sahithi I had some merge issues and have fixed them. Can you please take a look again.
This change brings in a the multiAZ aspect to the CPI. The CPI registers nodes, and the nodes are in multiple vApps. So the vApps need to be discovered in multiple OVDCs. The representation of OVDCs is in a configmap which has the following example format
To trigger usage of this zoneMap, and also to ensure backward compatibility, this feature is triggered by a flag in the CPI configmap variable
isZoneEnabledCluster
:In order to be able to add the label
topology.k8s.io/zones
, CPI needs theInstancesV2
interface to be implemented. That is part of this PR as well.This change is