Skip to content

Commit

Permalink
chore: update sharding ops (#320)
Browse files Browse the repository at this point in the history
(cherry picked from commit 1aed43a)
  • Loading branch information
wangyelei committed Apr 24, 2024
1 parent f007724 commit 21a4bef
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions pkg/action/template/cluster_operations_template.cue
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -126,7 +127,8 @@ content: {
replicas: options.replicas
},
for _, sName in options.shardingNames {
shardingName: sName
componentName: sName
isSharding: true
replicas: options.replicas
}]
}
Expand All @@ -135,7 +137,8 @@ content: {
componentName: cName
},
for _, sName in options.shardingNames {
shardingName: sName
componentName: sName
isSharding: true
}]
}
if options.type == "VerticalScaling" {
Expand All @@ -159,7 +162,8 @@ content: {
}
},
for _, sName in options.shardingNames {
shardingName: sName
componentName: sName
isSharding: true
requests: {
if options.memory != "" {
memory: options.memory
Expand Down Expand Up @@ -225,7 +229,8 @@ content: {
}]
},
for _, sName in options.shardingNames {
shardName: sName
componentName: sName
isSharding: true
configurations: [ {
name: options.cfgTemplateName
if options.forceRestart {
Expand Down Expand Up @@ -266,7 +271,8 @@ content: {
}]
},
for _, sName in options.shardingNames {
shardName: sName
componentName: sName
isSharding: true
if options.exposeEnabled == "true" {
switch: "Enable"
}
Expand Down Expand Up @@ -305,7 +311,7 @@ content: {
if options.type == "Custom" {
customSpec: {
opsDefinitionRef: options.opsDefinitionName
items: [
components: [
{
componentName: options.component
parameters: options.params
Expand Down

0 comments on commit 21a4bef

Please sign in to comment.