fix(deployment): set resourceFieldRef.divisor
All checks were successful
Release / publish-chart (push) Successful in 28s
All checks were successful
Release / publish-chart (push) Successful in 28s
This commit is contained in:
parent
3ea3f94429
commit
ad69f02f8f
@ -14,7 +14,7 @@
|
||||
{{- define "prometheus-postgres-exporter.deployment.env" -}}
|
||||
{{- $env := dict "env" (.Values.deployment.postgresExporter.env | default (list) ) }}
|
||||
{{- if and (hasKey .Values.deployment.postgresExporter.resources "limits") (hasKey .Values.deployment.postgresExporter.resources.limits "cpu") }}
|
||||
{{- $env = merge $env (dict "env" (list (dict "name" "GOMAXPROCS" "valueFrom" (dict "resourceFieldRef" (dict "resource" "limits.cpu"))))) }}
|
||||
{{- $env = merge $env (dict "env" (list (dict "name" "GOMAXPROCS" "valueFrom" (dict "resourceFieldRef" (dict "divisor" "1" "resource" "limits.cpu"))))) }}
|
||||
{{- end }}
|
||||
{{ toYaml $env }}
|
||||
{{- end -}}
|
||||
|
@ -233,6 +233,7 @@ tests:
|
||||
- name: GOMAXPROCS
|
||||
valueFrom:
|
||||
resourceFieldRef:
|
||||
divisor: "1"
|
||||
resource: limits.cpu
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].resources
|
||||
|
Loading…
Reference in New Issue
Block a user