bernardodemarco commented on code in PR #9102:
URL: https://github.com/apache/cloudstack/pull/9102#discussion_r1876689595
##########
plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/KubernetesClusterManagerImpl.java:
##########
@@ -846,6 +1005,37 @@ private void
validateManagedKubernetesClusterCreateParameters(final CreateKubern
}
}
+ protected void validateServiceOfferingsForNodeTypes(Map<String, Long> map,
+ Long
defaultServiceOfferingId,
+ Long etcdNodes,
+
KubernetesSupportedVersion clusterKubernetesVersion) {
+ for (String key : CLUSTER_NODES_TYPES_LIST) {
+ validateServiceOfferingForNode(map, defaultServiceOfferingId, key,
etcdNodes, clusterKubernetesVersion);
+ }
+ }
Review Comment:
When creating a k8s cluster without specifying any compute offerings, for
example:
```bash
create kubernetescluster name="k8s-cluster" zoneid="<zone-id>"
kubernetesversionid="<k8s-version-id>" size="1" noderootdisksize="8"
```
The following error is returned:
```bash
🙈 Error: (HTTP 530, error code 9999) No service offering found with ID: null
```
The same situation seems to be happening when only the `control` or `worker`
plane compute offerings are specified (without `serviceofferingid`). What do
you think about validating these scenarios? A message similar to this could be
returned to the user:
```
When serviceofferingid is not specified, service offerings for each node
type must be specified in the nodeofferings parameter.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]