From a0b6bb6023682e5d632f1373e3d3ba2f564666f1 Mon Sep 17 00:00:00 2001 From: Aaron Reynoza Date: Thu, 12 Sep 2024 01:35:09 -0600 Subject: [PATCH] feat: add cache labels for sims --- mojaloop-simulator/templates/deployment.yaml | 6 ++++++ mojaloop-simulator/values.yaml | 1 + mojaloop/values.yaml | 2 ++ 3 files changed, 9 insertions(+) diff --git a/mojaloop-simulator/templates/deployment.yaml b/mojaloop-simulator/templates/deployment.yaml index 66356ecd3..778928da9 100644 --- a/mojaloop-simulator/templates/deployment.yaml +++ b/mojaloop-simulator/templates/deployment.yaml @@ -283,6 +283,12 @@ spec: labels: app.kubernetes.io/name: sim-{{ $name }}-cache {{- include "mojaloop-simulator.common-labels" $ | nindent 8 }} + # Custom Pod Labels + {{- if $config.config.cacheLabels }} + {{- range $key, $value := $config.config.cacheLabels }} + {{ $key }}: {{ tpl $value $ | quote }} + {{- end }} + {{- end }} spec: initContainers: {{ include "mojaloop-simulator.prependDictToContainerEnv" (dict "containers" $config.config.cache.initContainers "dict" $initContainerEnv) | indent 6 }} diff --git a/mojaloop-simulator/values.yaml b/mojaloop-simulator/values.yaml index 6b94f0f37..8304ae5e1 100644 --- a/mojaloop-simulator/values.yaml +++ b/mojaloop-simulator/values.yaml @@ -187,6 +187,7 @@ defaults: ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ ## podLabels: {} + cacheLabels: {} ## @param podAnnotations Additional custom annotations for pod(s) ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ diff --git a/mojaloop/values.yaml b/mojaloop/values.yaml index d2b219861..f230fde9d 100644 --- a/mojaloop/values.yaml +++ b/mojaloop/values.yaml @@ -9832,6 +9832,8 @@ mojaloop-simulator: # Changes to this object in the parent chart, for example 'mojaloop-simulator.defaults' will be # applied to all simulators deployed by this child chart. config: + cacheLabels: + sidecar.istio.io/inject: 'false' # Config for init containers initContainers: waitForCache: