This is an automated email from the ASF dual-hosted git repository. pearl11594 pushed a commit to branch fr06-cks-template-register in repository https://gitbox.apache.org/repos/asf/cloudstack.git
commit 3ff64aaa9eb13520d5e44af7c37bcce43e3fe858 Merge: 8ac71ba183e 2cf8d674a83 Author: Pearl Dsilva <pearl1...@gmail.com> AuthorDate: Thu Feb 8 06:45:42 2024 -0500 Merge branch 'fr06-cks-improvements' of https://github.com/shapeblue/cloudstack-playtika into fr06-cks-template-register .../cluster/KubernetesClusterHelper.java | 8 + .../main/java/com/cloud/vm/VmDetailConstants.java | 2 + .../org/apache/cloudstack/api/ApiConstants.java | 8 + .../resources/META-INF/db/schema-41810to41900.sql | 9 + .../kubernetes/cluster/KubernetesCluster.java | 4 + .../cluster/KubernetesClusterHelperImpl.java | 80 +++++++ .../cluster/KubernetesClusterManagerImpl.java | 263 ++++++++++++++++----- .../kubernetes/cluster/KubernetesClusterVO.java | 44 ++++ .../KubernetesClusterActionWorker.java | 25 ++ ...ernetesClusterResourceModifierActionWorker.java | 3 +- .../KubernetesClusterScaleWorker.java | 4 + .../KubernetesClusterStartWorker.java | 6 +- .../cluster/CreateKubernetesClusterCmd.java | 25 +- .../cluster/ScaleKubernetesClusterCmd.java | 13 + .../api/response/KubernetesClusterResponse.java | 84 +++++++ .../cluster/KubernetesClusterHelperImplTest.java | 145 ++++++++++++ .../cluster/KubernetesClusterManagerImplTest.java | 122 ++++++++++ ui/public/locales/en.json | 8 + ui/src/components/view/InfoCard.vue | 33 +++ ui/src/views/compute/CreateKubernetesCluster.vue | 97 ++++++++ ui/src/views/compute/ScaleKubernetesCluster.vue | 130 ++++++++-- 21 files changed, 1036 insertions(+), 77 deletions(-) diff --cc engine/schema/src/main/resources/META-INF/db/schema-41810to41900.sql index 39b6b8865ef,9de5ef5e38a..6330974112d --- a/engine/schema/src/main/resources/META-INF/db/schema-41810to41900.sql +++ b/engine/schema/src/main/resources/META-INF/db/schema-41810to41900.sql @@@ -361,5 -361,11 +361,14 @@@ CALL `cloud`.`IDEMPOTENT_ADD_COLUMN`('c INSERT IGNORE INTO `cloud`.`hypervisor_capabilities` (uuid, hypervisor_type, hypervisor_version, max_guests_limit, security_group_enabled, max_data_volumes_limit, max_hosts_per_cluster, storage_motion_supported, vm_snapshot_enabled) values (UUID(), 'VMware', '8.0.0.2', 1024, 0, 59, 64, 1, 1); INSERT IGNORE INTO `cloud`.`hypervisor_capabilities` (uuid, hypervisor_type, hypervisor_version, max_guests_limit, security_group_enabled, max_data_volumes_limit, max_hosts_per_cluster, storage_motion_supported, vm_snapshot_enabled) values (UUID(), 'VMware', '8.0.0.3', 1024, 0, 59, 64, 1, 1); +-- Add for_cks column to the vm_template table +CALL `cloud`.`IDEMPOTENT_ADD_COLUMN`('cloud.vm_template','for_cks', 'int(1) unsigned DEFAULT "0" COMMENT "if true, the template can be used for CKS cluster deployment"'); ++ + -- Add support for different node types service offerings on CKS clusters + ALTER TABLE `cloud`.`kubernetes_cluster` ADD COLUMN `control_service_offering_id` bigint unsigned COMMENT 'service offering ID for Control Nodes'; + ALTER TABLE `cloud`.`kubernetes_cluster` ADD COLUMN `worker_service_offering_id` bigint unsigned COMMENT 'service offering ID for Worker Nodes'; + ALTER TABLE `cloud`.`kubernetes_cluster` ADD COLUMN `etcd_service_offering_id` bigint unsigned COMMENT 'service offering ID for etcd Nodes'; + ALTER TABLE `cloud`.`kubernetes_cluster` ADD COLUMN `etcd_node_count` bigint COMMENT 'the number of the etcd Nodes deployed for this Kubernetes cluster'; + ALTER TABLE `cloud`.`kubernetes_cluster` ADD CONSTRAINT `fk_cluster__control_service_offering_id` FOREIGN KEY `fk_cluster__control_service_offering_id`(`control_service_offering_id`) REFERENCES `service_offering`(`id`) ON DELETE CASCADE; + ALTER TABLE `cloud`.`kubernetes_cluster` ADD CONSTRAINT `fk_cluster__worker_service_offering_id` FOREIGN KEY `fk_cluster__worker_service_offering_id`(`worker_service_offering_id`) REFERENCES `service_offering`(`id`) ON DELETE CASCADE; + ALTER TABLE `cloud`.`kubernetes_cluster` ADD CONSTRAINT `fk_cluster__etcd_service_offering_id` FOREIGN KEY `fk_cluster__etcd_service_offering_id`(`etcd_service_offering_id`) REFERENCES `service_offering`(`id`) ON DELETE CASCADE;