Unverified Commit c281fde3 authored by julienmancuso's avatar julienmancuso Committed by GitHub
Browse files

fix: check for resource in pipeline helm chart (#687)

parent 643659c6
...@@ -48,9 +48,12 @@ spec: ...@@ -48,9 +48,12 @@ spec:
command: command:
- sh - sh
- -c - -c
{{ if .config.resources }}
resources: resources:
requests: requests:
{{ if .config.resources.cpu }}
cpu: "{{ .config.resources.cpu }}" cpu: "{{ .config.resources.cpu }}"
{{ end }}
{{ if .config.resources.memory }} {{ if .config.resources.memory }}
memory: "{{ .config.resources.memory }}" memory: "{{ .config.resources.memory }}"
{{ end }} {{ end }}
...@@ -58,13 +61,16 @@ spec: ...@@ -58,13 +61,16 @@ spec:
nvidia.com/gpu: "{{ .config.resources.gpu }}" nvidia.com/gpu: "{{ .config.resources.gpu }}"
{{ end }} {{ end }}
limits: limits:
{{ if .config.resources.cpu }}
cpu: "{{ .config.resources.cpu }}" cpu: "{{ .config.resources.cpu }}"
{{ end }}
{{ if .config.resources.memory }} {{ if .config.resources.memory }}
memory: "{{ .config.resources.memory }}" memory: "{{ .config.resources.memory }}"
{{ end }} {{ end }}
{{ if .config.resources.gpu }} {{ if .config.resources.gpu }}
nvidia.com/gpu: "{{ .config.resources.gpu }}" nvidia.com/gpu: "{{ .config.resources.gpu }}"
{{ end }} {{ end }}
{{ end }}
env: env:
- name: TRAFFIC_TIMEOUT - name: TRAFFIC_TIMEOUT
value: "{{ .config.traffic.timeout }}" value: "{{ .config.traffic.timeout }}"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment