[bitnami/mongodb] Fix logic to add custom annotations to external-access service (#28883)

This commit is contained in:
Juan Ariza Toledano
2024-08-20 15:09:39 +02:00
committed by GitHub
parent 6cf09bebec
commit 785e59bccf
3 changed files with 12 additions and 5 deletions

View File

@@ -1,8 +1,12 @@
# Changelog
## 15.6.19 (2024-08-14)
## 15.6.20 (2024-08-19)
* [bitnami/mongodb] Release 15.6.19 ([#28889](https://github.com/bitnami/charts/pull/28889))
* [bitnami/mongodb] Fix logic to add custom annotations to external-access service ([#28883](https://github.com/bitnami/charts/pull/28883))
## <small>15.6.19 (2024-08-14)</small>
* [bitnami/mongodb] Release 15.6.19 (#28889) ([8b3cb57](https://github.com/bitnami/charts/commit/8b3cb57c221f0f035e020cecc70b44e26cfd8040)), closes [#28889](https://github.com/bitnami/charts/issues/28889)
## <small>15.6.18 (2024-08-07)</small>

View File

@@ -39,4 +39,4 @@ maintainers:
name: mongodb
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/mongodb
version: 15.6.19
version: 15.6.20

View File

@@ -19,8 +19,11 @@ metadata:
labels: {{- include "common.labels.standard" ( dict "customLabels" $root.Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: mongodb
pod: {{ $targetPod }}
{{- if or $root.Values.externalAccess.service.annotations $root.Values.commonAnnotations $root.Values.externalAccess.service.annotationsList}}
{{- $exclusiveAnnotations := ternary ( dict ) (index $root.Values.externalAccess.service.annotationsList $i) ( lt (len $root.Values.externalAccess.service.annotationsList ) $i ) }}
{{- if or $root.Values.externalAccess.service.annotations $root.Values.commonAnnotations $root.Values.externalAccess.service.annotationsList }}
{{- $exclusiveAnnotations := dict }}
{{- if gt (len $root.Values.externalAccess.service.annotationsList) $i }}
{{- $exclusiveAnnotations = index $root.Values.externalAccess.service.annotationsList $i }}
{{- end }}
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list $root.Values.externalAccess.service.annotations $root.Values.commonAnnotations $exclusiveAnnotations ) "context" $ ) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
{{- end }}