diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml index fa4e95c77..a7a665aa2 100644 --- a/.github/workflows/push.yaml +++ b/.github/workflows/push.yaml @@ -212,10 +212,10 @@ jobs: - name: Helm Template run: | helm template reloader deployments/kubernetes/chart/reloader/ \ - --set reloader.deployment.resources.limits.cpu=150m \ - --set reloader.deployment.resources.limits.memory=512Mi \ + --set-string reloader.deployment.resources.limits.cpu=1 \ + --set reloader.deployment.resources.limits.memory=128Mi \ --set reloader.deployment.resources.requests.cpu=10m \ - --set reloader.deployment.resources.requests.memory=512Mi > deployments/kubernetes/reloader.yaml + --set reloader.deployment.resources.requests.memory=128Mi > deployments/kubernetes/reloader.yaml helm template reloader deployments/kubernetes/chart/reloader/ --output-dir deployments/kubernetes/manifests && mv deployments/kubernetes/manifests/reloader/templates/* deployments/kubernetes/manifests/ && rm -r deployments/kubernetes/manifests/reloader diff --git a/deployments/kubernetes/chart/reloader/templates/deployment.yaml b/deployments/kubernetes/chart/reloader/templates/deployment.yaml index 7fcc3f9b7..d43bd872b 100644 --- a/deployments/kubernetes/chart/reloader/templates/deployment.yaml +++ b/deployments/kubernetes/chart/reloader/templates/deployment.yaml @@ -77,14 +77,22 @@ spec: imagePullPolicy: {{ .Values.reloader.deployment.image.pullPolicy }} name: {{ template "reloader-fullname" . }} env: - - name: GOMEMLIMIT + - name: GOMAXPROCS + {{- if .Values.reloader.deployment.gomaxprocsOverride }} + value: {{ .Values.reloader.deployment.gomaxprocsOverride | quote }} + {{- else }} valueFrom: resourceFieldRef: resource: limits.memory - - name: GOMAXPROCS + {{- end }} + - name: GOMEMLIMIT + {{- if .Values.reloader.deployment.gomemlimitOverride }} + value: {{ .Values.reloader.deployment.gomemlimitOverride | quote }} + {{- else }} valueFrom: resourceFieldRef: resource: limits.cpu + {{- end }} {{- range $name, $value := .Values.reloader.deployment.env.open }} {{- if not (empty $value) }} - name: {{ $name | quote }} @@ -140,7 +148,6 @@ spec: value: enabled {{- end }} {{- end }} - ports: - name: http containerPort: 9090 diff --git a/deployments/kubernetes/chart/reloader/values.yaml b/deployments/kubernetes/chart/reloader/values.yaml index 20f9c6687..8f658ffcf 100644 --- a/deployments/kubernetes/chart/reloader/values.yaml +++ b/deployments/kubernetes/chart/reloader/values.yaml @@ -147,6 +147,11 @@ reloader: # imagePullSecrets: # - name: myregistrykey + # Put "0" in either to have go runtime ignore the set value. + # Otherwise, see https://pkg.go.dev/runtime#hdr-Environment_Variables for GOMAXPROCS and GOMEMLIMIT + gomaxprocsOverride: "" + gomemlimitOverride: "" + service: {} # labels: {} # annotations: {}