From f553780551712c77cb5d969fd0ee75eccc423023 Mon Sep 17 00:00:00 2001 From: sgayangi Date: Wed, 30 Oct 2024 14:07:08 +0530 Subject: [PATCH] Update default values for statsd image --- .../ratelimiter/ratelimiter-deployment.yaml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/helm-charts/templates/data-plane/ratelimiter/ratelimiter-deployment.yaml b/helm-charts/templates/data-plane/ratelimiter/ratelimiter-deployment.yaml index 5319e7d4a..4eba100cb 100644 --- a/helm-charts/templates/data-plane/ratelimiter/ratelimiter-deployment.yaml +++ b/helm-charts/templates/data-plane/ratelimiter/ratelimiter-deployment.yaml @@ -39,14 +39,22 @@ spec: automountServiceAccountToken: false serviceAccountName: {{ .Values.wso2.apk.auth.serviceAccountName }} containers: - {{if and .Values.wso2.apk.metrics.enabled .Values.wso2.apk.metrics.statsd }} + {{- if .Values.wso2.apk.metrics.enabled }} + {{- $statsd := .Values.wso2.apk.metrics.statsd | default (dict "image" (dict "repository" "prom/statsd-exporter" "tag" "v0.26.0") "imagePullPolicy" "IfNotPresent" "resources" (dict "limits" (dict "cpu" "2m" "memory" "128Mi") "requests" (dict "cpu" "0.1m" "memory" "64Mi"))) }} - name: statsd - image: {{ .Values.wso2.apk.metrics.statsd.image.repository }}:{{ .Values.wso2.apk.metrics.statsd.image.tag }} - imagePullPolicy: {{ .Values.wso2.apk.metrics.statsd.imagePullPolicy }} + image: "{{ $statsd.image.repository }}:{{ $statsd.image.tag }}" + imagePullPolicy: "{{ $statsd.imagePullPolicy }}" + resources: + limits: + memory: "{{ $statsd.resources.limits.memory }}" + cpu: "{{ $statsd.resources.limits.cpu }}" + requests: + memory: "{{ $statsd.resources.requests.memory }}" + cpu: "{{ $statsd.resources.requests.cpu }}" ports: - name: statsd-metrics containerPort: 9102 - {{ end }} + {{- end }} - name: ratelimiter image: {{ .Values.wso2.apk.dp.ratelimiter.deployment.image }} imagePullPolicy: {{ .Values.wso2.apk.dp.ratelimiter.deployment.imagePullPolicy }}