Skip to content

Commit f4285e4

Browse files
Shofiqur-052ArnobKumarSaha
authored andcommitted
fix resource init and validation in vertical scaling ops (#1081)
* fix resource init and validation in vertical scaling ops Signed-off-by: shofiq <shofiq@appscode.com> * add missing fixes for kafka Signed-off-by: shofiq <shofiq@appscode.com> * fix reconfigure show labels for duel mode in singlestore Signed-off-by: shofiq <shofiq@appscode.com> --------- Signed-off-by: shofiq <shofiq@appscode.com>
1 parent f8f5ff7 commit f4285e4

58 files changed

Lines changed: 149 additions & 90 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

charts/opskubedbcom-cassandraopsrequest-editor/ui/create-ui.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ step:
152152
type: machine-compare
153153
validation:
154154
name: isMachineValid
155-
type: custom
155+
type: custom|required
156156
watcher:
157157
func: onMachineChange|node
158158
paths:

charts/opskubedbcom-cassandraopsrequest-editor/ui/functions.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -864,12 +864,14 @@ export const useFunc = (model) => {
864864

865865
const path = `/spec/verticalScaling/${type}/resources`
866866

867-
if (obj && Object.keys(obj).length)
867+
if (obj && Object.keys(obj).length) {
868868
commit('wizard/model$update', {
869869
path: path,
870870
value: obj,
871-
force: true,
872871
})
872+
} else {
873+
commit('wizard/model$delete', `/spec/verticalScaling/${type}`)
874+
}
873875

874876
// update metadata.annotations
875877
const annotations = getValue(model, '/metadata/annotations') || {}

charts/opskubedbcom-clickhouseopsrequest-editor/ui/create-ui.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ step:
152152
type: machine-compare
153153
validation:
154154
name: isMachineValid
155-
type: custom
155+
type: custom|required
156156
watcher:
157157
func: onMachineChange|node
158158
paths:

charts/opskubedbcom-clickhouseopsrequest-editor/ui/functions.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -876,12 +876,14 @@ export const useFunc = (model) => {
876876

877877
const path = `/spec/verticalScaling/${type}/resources`
878878

879-
if (obj && Object.keys(obj).length)
879+
if (obj && Object.keys(obj).length) {
880880
commit('wizard/model$update', {
881881
path: path,
882882
value: obj,
883-
force: true,
884883
})
884+
} else {
885+
commit('wizard/model$delete', `/spec/verticalScaling/${type}`)
886+
}
885887

886888
// update metadata.annotations
887889
const annotations = getValue(model, '/metadata/annotations') || {}

charts/opskubedbcom-documentdbopsrequest-editor/ui/create-ui.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ step:
152152
type: machine-compare
153153
validation:
154154
name: isMachineValid
155-
type: custom
155+
type: custom|required
156156
watcher:
157157
func: onMachineChange|documentdb
158158
paths:

charts/opskubedbcom-documentdbopsrequest-editor/ui/functions.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -875,12 +875,14 @@ export const useFunc = (model) => {
875875

876876
const path = `/spec/verticalScaling/${type}/resources`
877877

878-
if (obj && Object.keys(obj).length)
878+
if (obj && Object.keys(obj).length) {
879879
commit('wizard/model$update', {
880880
path: path,
881881
value: obj,
882-
force: true,
883882
})
883+
} else {
884+
commit('wizard/model$delete', `/spec/verticalScaling/${type}`)
885+
}
884886

885887
// update metadata.annotations
886888
const annotations = getValue(model, '/metadata/annotations') || {}

charts/opskubedbcom-druidopsrequest-editor/ui/functions.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -929,14 +929,16 @@ export const useFunc = (model) => {
929929
}
930930
}
931931

932-
const specPath = `/spec/verticalScaling/${type}/resources`
932+
const path = `/spec/verticalScaling/${type}/resources`
933933

934-
if (obj && Object.keys(obj).length)
934+
if (obj && Object.keys(obj).length) {
935935
commit('wizard/model$update', {
936-
path: specPath,
936+
path: path,
937937
value: obj,
938-
force: true,
939938
})
939+
} else {
940+
commit('wizard/model$delete', `/spec/verticalScaling/${type}`)
941+
}
940942

941943
// Update metadata.annotations
942944
const annotations = getValue(model, '/metadata/annotations') || {}

charts/opskubedbcom-elasticsearchopsrequest-editor/ui/create-ui.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ step:
221221
type: machine-compare
222222
validation:
223223
name: isMachineValid|node
224-
type: custom
224+
type: custom|required
225225
watcher:
226226
func: onMachineChange|node
227227
paths:

charts/opskubedbcom-elasticsearchopsrequest-editor/ui/functions.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,12 +1009,14 @@ export const useFunc = (model) => {
10091009

10101010
const path = `/spec/verticalScaling/${type}/resources`
10111011

1012-
if (obj && Object.keys(obj).length)
1012+
if (obj && Object.keys(obj).length) {
10131013
commit('wizard/model$update', {
10141014
path: path,
10151015
value: obj,
1016-
force: true,
10171016
})
1017+
} else {
1018+
commit('wizard/model$delete', `/spec/verticalScaling/${type}`)
1019+
}
10181020

10191021
// update metadata.annotations
10201022
const annotations = getValue(model, '/metadata/annotations') || {}

charts/opskubedbcom-hanadbopsrequest-editor/ui/create-ui.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ step:
9393
type: machine-compare
9494
validation:
9595
name: isMachineValid
96-
type: custom
96+
type: custom|required
9797
watcher:
9898
func: onMachineChange|node
9999
paths:

0 commit comments

Comments
 (0)