common: scale down workloads based on middleware provided metadata

This commit is contained in:
Stavros kois
2023-11-01 17:24:20 +02:00
committed by Stavros Kois
parent aa295ecea1
commit f004903659
8 changed files with 185 additions and 3 deletions

View File

@@ -94,3 +94,43 @@ tests:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 0
- it: should set replicas to 0 on ixChartContext - isStopped (true)
set:
global:
ixChartContext:
storageClassName: some-storage-class
isStopped: true
workload:
workload-name:
enabled: true
primary: true
type: Deployment
replicas: 2
podSpec: {}
asserts:
- documentIndex: *deploymentDoc
isSubset:
path: spec
content:
replicas: 0
- it: should not set replicas to 0 on ixChartContext - isStopped (false)
set:
global:
ixChartContext:
storageClassName: some-storage-class
isStopped: false
workload:
workload-name:
enabled: true
primary: true
type: Deployment
replicas: 2
podSpec: {}
asserts:
- documentIndex: *deploymentDoc
isSubset:
path: spec
content:
replicas: 2