davidjumani commented on a change in pull request #5254:
URL: https://github.com/apache/cloudstack/pull/5254#discussion_r681452589
##########
File path:
plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/KubernetesClusterManagerImpl.java
##########
@@ -1093,13 +1111,39 @@ public boolean startKubernetesCluster(long
kubernetesClusterId, boolean onCreate
startWorker = ComponentContext.inject(startWorker);
if (onCreate) {
// Start for Kubernetes cluster in 'Created' state
+ Account owner =
accountService.getActiveAccountById(kubernetesCluster.getAccountId());
+ String[] keys = getServiceUserKeys(owner);
+ startWorker.setKeys(keys);
return startWorker.startKubernetesClusterOnCreate();
} else {
// Start for Kubernetes cluster in 'Stopped' state. Resources are
already provisioned, just need to be started
return startWorker.startStoppedKubernetesCluster();
}
}
+ private String[] getServiceUserKeys(Account owner) {
+ if (owner == null) {
+ owner = CallContext.current().getCallingAccount();
+ }
+ String username = owner.getAccountName() + "-" +
KUBEADMIN_ACCOUNT_NAME;
Review comment:
Per account basis just for kube
##########
File path: test/integration/smoke/test_kubernetes_clusters.py
##########
@@ -75,8 +75,12 @@ def setUpClass(cls):
cls.kubernetes_version_ids = []
if cls.hypervisorNotSupported == False:
- cls.initial_configuration_cks_enabled =
Configurations.list(cls.apiclient,
-
name="cloud.kubernetes.service.enabled")[0].value
+ cls.endpoint_url = Configurations.list(cls.apiclient,
name="endpointe.url")[0].value
+ if "localhost" in cls.endpoint_url:
+ endpoint_url = "http://%s:%d/client/api "
%(cls.mgtSvrDetails["mgtSvrIp"], cls.mgtSvrDetails["port"])
+ cls.debug("Setting endpointe.url to %s" %(endpoint_url))
Review comment:
Nope, it's a global variable
--
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]