use of com.cloud.kubernetes.cluster.actionworkers.KubernetesClusterUpgradeWorker in project cloudstack by apache.
the class KubernetesClusterManagerImpl method upgradeKubernetesCluster.
@Override
public boolean upgradeKubernetesCluster(UpgradeKubernetesClusterCmd cmd) throws CloudRuntimeException {
if (!KubernetesServiceEnabled.value()) {
logAndThrow(Level.ERROR, "Kubernetes Service plugin is disabled");
}
validateKubernetesClusterUpgradeParameters(cmd);
KubernetesClusterVO kubernetesCluster = kubernetesClusterDao.findById(cmd.getId());
Account owner = accountService.getActiveAccountById(kubernetesCluster.getAccountId());
String[] keys = getServiceUserKeys(owner);
KubernetesClusterUpgradeWorker upgradeWorker = new KubernetesClusterUpgradeWorker(kubernetesClusterDao.findById(cmd.getId()), kubernetesSupportedVersionDao.findById(cmd.getKubernetesVersionId()), this, keys);
upgradeWorker = ComponentContext.inject(upgradeWorker);
return upgradeWorker.upgradeCluster();
}
Aggregations