fix EOF, DefaultMaxReplicas set to 3, extended user guide about hpa, more tests

add warning in situations like:
- maxreplicas < minreplicas
- value from label < 0
- validate percentage in cpu, memory metrics
This commit is contained in:
jose luis
2024-04-04 20:21:00 +02:00
parent 516930ccee
commit 8ff0f334eb
7 changed files with 368 additions and 90 deletions
+1 -1
View File
@@ -343,4 +343,4 @@ convert::expect_success "$os_cmd" "$os_output" || exit 1
# Test HPA
k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/hpa/compose.yaml convert --stdout --with-kompose-annotation=false"
k8s_output="$KOMPOSE_ROOT/script/test/fixtures/hpa/output-k8s.yaml"
convert::expect_success "$k8s_cmd" "$k8s_output" || exit 1
convert::expect_success "$k8s_cmd" "$k8s_output" || exit 1
+4 -3
View File
@@ -4,6 +4,7 @@ services:
image: nginx
labels:
kompose.hpa.cpu: 50
kompose.hap.memory: 70
kompose.hap.replicas.min: 1
kompose.hap.replicas.max: 10
kompose.hpa.memory: 70
kompose.hpa.replicas.min: 1
kompose.hpa.replicas.max: 10
+2 -1
View File
@@ -45,4 +45,5 @@ spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: web
name: web