Skip to content

Commit

Permalink
Merge pull request #5 from chainflip-io/fix/engine-resources
Browse files Browse the repository at this point in the history
  • Loading branch information
tomjohnburton authored Aug 14, 2023
2 parents 5645abc + d8eb747 commit f2ce093
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/node/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ maintainers:

type: application

version: 0.1.3
version: 0.1.4

appVersion: "0.8.7"
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 f2ce093

Please sign in to comment.