Skip to content

Commit

Permalink
chore: add resources & tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tomjohnburton committed Aug 14, 2023
1 parent 5645abc commit fb81124
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 2 deletions.
4 changes: 4 additions & 0 deletions charts/node/templates/engine-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ spec:
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 3
{{- with .Values.engine.resources }}
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
volumeMounts:
- name: data
mountPath: {{ .Values.common.basePath }}
Expand Down
21 changes: 20 additions & 1 deletion charts/node/tests/engine_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,23 @@ tests:
engine.persistence.existingClaim: "test"
asserts:
- notExists:
path: spec.volumeClaimTemplates
path: spec.volumeClaimTemplates
- it: should add resources if set
set:
engine.resources:
limits:
cpu: 100m
memory: 100Mi
requests:
cpu: 100m
memory: 100Mi
asserts:
- equal:
path: spec.template.spec.containers[0].resources
value:
limits:
cpu: 100m
memory: 100Mi
requests:
cpu: 100m
memory: 100Mi
21 changes: 20 additions & 1 deletion charts/node/tests/node_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,23 @@ tests:
node.persistence.existingClaim: "test"
asserts:
- notExists:
path: spec.volumeClaimTemplates
path: spec.volumeClaimTemplates
- it: should add resources if set
set:
node.resources:
limits:
cpu: 100m
memory: 100Mi
requests:
cpu: 100m
memory: 100Mi
asserts:
- equal:
path: spec.template.spec.containers[0].resources
value:
limits:
cpu: 100m
memory: 100Mi
requests:
cpu: 100m
memory: 100Mi

0 comments on commit fb81124

Please sign in to comment.