From 21a4befa6892cfa9a629d548f24ba108b6d7c352 Mon Sep 17 00:00:00 2001 From: wangyelei Date: Wed, 24 Apr 2024 15:22:23 +0800 Subject: [PATCH] chore: update sharding ops (#320) (cherry picked from commit 1aed43afc7fd2e1dfc9ee65e2898fc26681632ad) --- .../template/cluster_operations_template.cue | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/pkg/action/template/cluster_operations_template.cue b/pkg/action/template/cluster_operations_template.cue index e3e7d3137..d9494e4ea 100644 --- a/pkg/action/template/cluster_operations_template.cue +++ b/pkg/action/template/cluster_operations_template.cue @@ -113,7 +113,8 @@ content: { }] }, for _, sName in options.shardingNames { - shardingName: sName + componentName: sName + isSharding: true volumeClaimTemplates: [ for _, vctName in options.vctNames { name: vctName storage: options.storage @@ -126,7 +127,8 @@ content: { replicas: options.replicas }, for _, sName in options.shardingNames { - shardingName: sName + componentName: sName + isSharding: true replicas: options.replicas }] } @@ -135,7 +137,8 @@ content: { componentName: cName }, for _, sName in options.shardingNames { - shardingName: sName + componentName: sName + isSharding: true }] } if options.type == "VerticalScaling" { @@ -159,7 +162,8 @@ content: { } }, for _, sName in options.shardingNames { - shardingName: sName + componentName: sName + isSharding: true requests: { if options.memory != "" { memory: options.memory @@ -225,7 +229,8 @@ content: { }] }, for _, sName in options.shardingNames { - shardName: sName + componentName: sName + isSharding: true configurations: [ { name: options.cfgTemplateName if options.forceRestart { @@ -266,7 +271,8 @@ content: { }] }, for _, sName in options.shardingNames { - shardName: sName + componentName: sName + isSharding: true if options.exposeEnabled == "true" { switch: "Enable" } @@ -305,7 +311,7 @@ content: { if options.type == "Custom" { customSpec: { opsDefinitionRef: options.opsDefinitionName - items: [ + components: [ { componentName: options.component parameters: options.params