Skip to content

Commit 5c82e66

Browse files
committed
Fix resource limits test (#151)
# Description Assert resource limits using Pod definitions
1 parent 38698ad commit 5c82e66

File tree

3 files changed

+37
-11
lines changed

3 files changed

+37
-11
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ All notable changes to this project will be documented in this file.
88

99
- Bumped image to `3.3.0-stackable0.2.0` in tests and docs ([#145])
1010
- BREAKING: use resource limit struct instead of passing spark configuration arguments ([#147])
11+
- Fixed resources test ([#151])
1112

1213
[#145]: https://github.com/stackabletech/spark-k8s-operator/pull/145
1314
[#147]: https://github.com/stackabletech/spark-k8s-operator/pull/147
15+
[#151]: https://github.com/stackabletech/spark-k8s-operator/pull/151
1416

1517
## [0.5.0] - 2022-09-06
1618

tests/templates/kuttl/resources/10-assert.yaml

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,44 @@ apiVersion: kuttl.dev/v1beta1
33
kind: TestAssert
44
timeout: 900
55
---
6-
# The Job starting the whole process
76
apiVersion: spark.stackable.tech/v1alpha1
87
kind: SparkApplication
98
metadata:
109
name: spark-resources
1110
status:
1211
phase: Succeeded
12+
---
13+
apiVersion: v1
14+
kind: Pod
15+
metadata:
16+
labels:
17+
spark-role: driver
18+
app.kubernetes.io/managed-by: spark-k8s-operator
19+
spec:
20+
containers:
21+
- name: spark-driver
22+
resources:
23+
limits:
24+
cpu: 1500m
25+
# N.B. spark adds memoryOverhead of 10% by default
26+
memory: 1408Mi
27+
requests:
28+
cpu: "1"
29+
memory: 1408Mi
30+
---
31+
apiVersion: v1
32+
kind: Pod
33+
metadata:
34+
labels:
35+
job-name: spark-resources
36+
app.kubernetes.io/managed-by: spark-k8s-operator
37+
spec:
38+
containers:
39+
- name: spark-submit
40+
resources:
41+
limits:
42+
cpu: 200m
43+
memory: 1Gi
44+
requests:
45+
cpu: 100m
46+
memory: 1Gi

tests/templates/kuttl/resources/13-assert.yaml

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)