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 }}