Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions charts/opskubedbcom-druidopsrequest-editor/ui/create-ui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,30 @@ step:
- type: input
label: Value
schema: schema/properties/spec/properties/verticalScaling/properties/routers/properties/topology/properties/value
- type: block-layout
label: Exporter
showLabels: true
hideBlock: true
elements:
- type: horizontal-layout
showLabels: true
elements:
- init:
type: func
value: setExporter|cpu
type: input
label: CPU
schema: schema/properties/spec/properties/verticalScaling/properties/exporter/properties/resources/properties/requests/properties/cpu
- type: input
init:
type: func
value: setExporter|memory
label: Memory
schema: schema/properties/spec/properties/verticalScaling/properties/exporter/properties/resources/properties/limits/properties/memory
watcher:
func: onExporterResourceChange|memory
paths:
- schema/properties/spec/properties/verticalScaling/properties/exporter/properties/resources/properties/limits/properties/memory
# Volume Expansion
- type: block-layout
label: Volume Expansion Form
Expand Down
27 changes: 27 additions & 0 deletions charts/opskubedbcom-druidopsrequest-editor/ui/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -1654,6 +1654,31 @@ export const useFunc = (model) => {
}
}

function setExporter(type) {
let path = `/dbDetails/spec/monitor/prometheus/exporter/resources/limits/${type}`
const limitVal = getValue(discriminator, path)

if (!limitVal) {
path = `/dbDetails/spec/monitor/prometheus/exporter/resources/requests/${type}`
const reqVal = getValue(discriminator, path)

if (reqVal) return reqVal
}
return limitVal
}

function onExporterResourceChange(type) {
const commitPath = `/spec/verticalScaling/exporter/resources/requests/${type}`
const valPath = `/spec/verticalScaling/exporter/resources/limits/${type}`
const val = getValue(model, valPath)
if (val)
commit('wizard/model$update', {
path: commitPath,
value: val,
force: true,
})
}

// ============================================================
// RETURN ALL EXPORTED FUNCTIONS
// ============================================================
Expand Down Expand Up @@ -1704,6 +1729,8 @@ export const useFunc = (model) => {

// Vertical scaling functions
isVerticalScaleTopologyRequired,
setExporter,
onExporterResourceChange,

// Volume expansion functions
checkVolume,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -860,34 +860,30 @@ step:
type: custom
name: isVerticalScaleTopologyRequired|dataWarm
schema: temp/topologyValue-dataWarm
- type: horizontal-layout
showLabels: true
- type: block-layout
label: Exporter
showLabels: true
hideBlock: true
elements:
- type: input
label: CPU Requests
schema: schema/properties/spec/properties/verticalScaling/properties/exporter/properties/resources/properties/requests/cpu
init:
type: func
value: setValueFromDbDetails|/spec/monitor/prometheus/exporter/resources/requests/cpu|/spec/verticalScaling/exporter/resources/requests/cpu
- type: input
label: CPU Limits
schema: schema/properties/spec/properties/verticalScaling/properties/exporter/properties/resources/properties/limits/cpu
init:
type: func
value: setValueFromDbDetails|/spec/monitor/prometheus/exporter/resources/limits/cpu|/spec/verticalScaling/exporter/resources/limits/cpu
- type: input
label: Memory Requests
schema: schema/properties/spec/properties/verticalScaling/properties/exporter/properties/resources/properties/requests/memory
init:
type: func
value: setValueFromDbDetails|/spec/monitor/prometheus/exporter/resources/requests/memory|/spec/verticalScaling/exporter/resources/requests/memory
- type: input
label: Memory Limits
schema: schema/properties/spec/properties/verticalScaling/properties/exporter/properties/resources/properties/limits/memory
init:
type: func
value: setValueFromDbDetails|/spec/monitor/prometheus/exporter/resources/limits/memory|/spec/verticalScaling/exporter/resources/limits/memory
- type: horizontal-layout
showLabels: true
elements:
- init:
type: func
value: setExporter|cpu
type: input
label: CPU
schema: schema/properties/spec/properties/verticalScaling/properties/exporter/properties/resources/properties/requests/properties/cpu
- type: input
init:
type: func
value: setExporter|memory
label: Memory
schema: schema/properties/spec/properties/verticalScaling/properties/exporter/properties/resources/properties/limits/properties/memory
watcher:
func: onExporterResourceChange|memory
paths:
- schema/properties/spec/properties/verticalScaling/properties/exporter/properties/resources/properties/limits/properties/memory
# Volume Expansion

- type: block-layout
Expand Down
27 changes: 27 additions & 0 deletions charts/opskubedbcom-elasticsearchopsrequest-editor/ui/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -1557,6 +1557,31 @@ export const useFunc = (model) => {
return !!topology[type]?.storage
}

function setExporter(type) {
let path = `/dbDetails/spec/monitor/prometheus/exporter/resources/limits/${type}`
const limitVal = getValue(discriminator, path)

if (!limitVal) {
path = `/dbDetails/spec/monitor/prometheus/exporter/resources/requests/${type}`
const reqVal = getValue(discriminator, path)

if (reqVal) return reqVal
}
return limitVal
}

function onExporterResourceChange(type) {
const commitPath = `/spec/verticalScaling/exporter/resources/requests/${type}`
const valPath = `/spec/verticalScaling/exporter/resources/limits/${type}`
const val = getValue(model, valPath)
if (val)
commit('wizard/model$update', {
path: commitPath,
value: val,
force: true,
})
}

// =====================================================
// Return all exported functions
// =====================================================
Expand Down Expand Up @@ -1616,6 +1641,8 @@ export const useFunc = (model) => {

// Vertical scaling functions
isVerticalScaleTopologyRequired,
setExporter,
onExporterResourceChange,

// Volume expansion functions
checkVolume,
Expand Down
24 changes: 24 additions & 0 deletions charts/opskubedbcom-ferretdbopsrequest-editor/ui/create-ui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,30 @@ step:
type: custom
name: isVerticalScaleTopologyRequired|secondary
schema: temp/topologyValue-secondary
- type: block-layout
label: Exporter
showLabels: true
hideBlock: true
elements:
- type: horizontal-layout
showLabels: true
elements:
- init:
type: func
value: setExporter|cpu
type: input
label: CPU
schema: schema/properties/spec/properties/verticalScaling/properties/exporter/properties/resources/properties/requests/properties/cpu
- type: input
init:
type: func
value: setExporter|memory
label: Memory
schema: schema/properties/spec/properties/verticalScaling/properties/exporter/properties/resources/properties/limits/properties/memory
watcher:
func: onExporterResourceChange|memory
paths:
- schema/properties/spec/properties/verticalScaling/properties/exporter/properties/resources/properties/limits/properties/memory
# Reconfigure TLS
- type: block-layout
label: TLS
Expand Down
27 changes: 27 additions & 0 deletions charts/opskubedbcom-ferretdbopsrequest-editor/ui/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -1192,7 +1192,34 @@ export const useFunc = (model) => {
return !!(model && model.alias)
}

function setExporter(type) {
let path = `/dbDetails/spec/monitor/prometheus/exporter/resources/limits/${type}`
const limitVal = getValue(discriminator, path)

if (!limitVal) {
path = `/dbDetails/spec/monitor/prometheus/exporter/resources/requests/${type}`
const reqVal = getValue(discriminator, path)

if (reqVal) return reqVal
}
return limitVal
}

function onExporterResourceChange(type) {
const commitPath = `/spec/verticalScaling/exporter/resources/requests/${type}`
const valPath = `/spec/verticalScaling/exporter/resources/limits/${type}`
const val = getValue(model, valPath)
if (val)
commit('wizard/model$update', {
path: commitPath,
value: val,
force: true,
})
}

return {
setExporter,
onExporterResourceChange,
fetchAliasOptions,
validateNewCertificates,
disableAlias,
Expand Down
24 changes: 24 additions & 0 deletions charts/opskubedbcom-kafkaopsrequest-editor/ui/create-ui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,30 @@ step:
type: custom
name: isVerticalScaleTopologyRequired|controller
schema: temp/topologyValue-controller
- type: block-layout
label: Exporter
showLabels: true
hideBlock: true
elements:
- type: horizontal-layout
showLabels: true
elements:
- init:
type: func
value: setExporter|cpu
type: input
label: CPU
schema: schema/properties/spec/properties/verticalScaling/properties/exporter/properties/resources/properties/requests/properties/cpu
- type: input
init:
type: func
value: setExporter|memory
label: Memory
schema: schema/properties/spec/properties/verticalScaling/properties/exporter/properties/resources/properties/limits/properties/memory
watcher:
func: onExporterResourceChange|memory
paths:
- schema/properties/spec/properties/verticalScaling/properties/exporter/properties/resources/properties/limits/properties/memory
# Volume Expansion
- type: block-layout
label: Volume Expansion Form
Expand Down
27 changes: 27 additions & 0 deletions charts/opskubedbcom-kafkaopsrequest-editor/ui/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -1362,7 +1362,34 @@ export const useFunc = (model) => {
return !!(model && model.alias)
}

function setExporter(type) {
let path = `/dbDetails/spec/monitor/prometheus/exporter/resources/limits/${type}`
const limitVal = getValue(discriminator, path)

if (!limitVal) {
path = `/dbDetails/spec/monitor/prometheus/exporter/resources/requests/${type}`
const reqVal = getValue(discriminator, path)

if (reqVal) return reqVal
}
return limitVal
}

function onExporterResourceChange(type) {
const commitPath = `/spec/verticalScaling/exporter/resources/requests/${type}`
const valPath = `/spec/verticalScaling/exporter/resources/limits/${type}`
const val = getValue(model, valPath)
if (val)
commit('wizard/model$update', {
path: commitPath,
value: val,
force: true,
})
}

return {
setExporter,
onExporterResourceChange,
fetchAliasOptions,
validateNewCertificates,
disableAlias,
Expand Down
48 changes: 22 additions & 26 deletions charts/opskubedbcom-mariadbopsrequest-editor/ui/create-ui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -191,34 +191,30 @@ step:
type: custom
name: isVerticalScaleTopologyRequired
schema: temp/topologyValue
- type: horizontal-layout
showLabels: true
- type: block-layout
label: Exporter
showLabels: true
hideBlock: true
elements:
- type: input
label: CPU Requests
schema: schema/properties/spec/properties/verticalScaling/properties/exporter/properties/resources/properties/requests/cpu
init:
type: func
value: setValueFromDbDetails|/spec/monitor/prometheus/exporter/resources/requests/cpu|/spec/verticalScaling/exporter/resources/requests/cpu
- type: input
label: CPU Limits
schema: schema/properties/spec/properties/verticalScaling/properties/exporter/properties/resources/properties/limits/cpu
init:
type: func
value: setValueFromDbDetails|/spec/monitor/prometheus/exporter/resources/limits/cpu|/spec/verticalScaling/exporter/resources/limits/cpu
- type: input
label: Memory Requests
schema: schema/properties/spec/properties/verticalScaling/properties/exporter/properties/resources/properties/requests/memory
init:
type: func
value: setValueFromDbDetails|/spec/monitor/prometheus/exporter/resources/requests/memory|/spec/verticalScaling/exporter/resources/requests/memory
- type: input
label: Memory Limits
schema: schema/properties/spec/properties/verticalScaling/properties/exporter/properties/resources/properties/limits/memory
init:
type: func
value: setValueFromDbDetails|/spec/monitor/prometheus/exporter/resources/limits/memory|/spec/verticalScaling/exporter/resources/limits/memory
- type: horizontal-layout
showLabels: true
elements:
- init:
type: func
value: setExporter|cpu
type: input
label: CPU
schema: schema/properties/spec/properties/verticalScaling/properties/exporter/properties/resources/properties/requests/properties/cpu
- type: input
init:
type: func
value: setExporter|memory
label: Memory
schema: schema/properties/spec/properties/verticalScaling/properties/exporter/properties/resources/properties/limits/properties/memory
watcher:
func: onExporterResourceChange|memory
paths:
- schema/properties/spec/properties/verticalScaling/properties/exporter/properties/resources/properties/limits/properties/memory
# Volume Expansion
- type: block-layout
label: Volume Expansion Form
Expand Down
27 changes: 27 additions & 0 deletions charts/opskubedbcom-mariadbopsrequest-editor/ui/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -1322,7 +1322,34 @@ export const useFunc = (model) => {
return data || 'No Data Found'
}

function setExporter(type) {
let path = `/dbDetails/spec/monitor/prometheus/exporter/resources/limits/${type}`
const limitVal = getValue(discriminator, path)

if (!limitVal) {
path = `/dbDetails/spec/monitor/prometheus/exporter/resources/requests/${type}`
const reqVal = getValue(discriminator, path)

if (reqVal) return reqVal
}
return limitVal
}

function onExporterResourceChange(type) {
const commitPath = `/spec/verticalScaling/exporter/resources/requests/${type}`
const valPath = `/spec/verticalScaling/exporter/resources/limits/${type}`
const val = getValue(model, valPath)
if (val)
commit('wizard/model$update', {
path: commitPath,
value: val,
force: true,
})
}

return {
setExporter,
onExporterResourceChange,
fetchAliasOptions,
validateNewCertificates,
disableAlias,
Expand Down
Loading
Loading