simpler append of subscriptions

This commit is contained in:
Noam Gal 2024-05-12 18:21:06 +03:00
parent 36ae990538
commit 6b60d78f5f
No known key found for this signature in database
2 changed files with 274 additions and 279 deletions

View file

@ -1,10 +1,4 @@
{{- if and .Values.notifications.enabled .Values.notifications.cm.create }} {{- if and .Values.notifications.enabled .Values.notifications.cm.create }}
{{- $subscriptions := slice }}
{{- range $key, $value := .Values.notifications.subscriptions }}
{{- $subscriptions = append $subscriptions $key }}
{{- end }}
{{- $subscriptions = append $subscriptions .Values.codefresh.promotions.notifications.subscriptions }}
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
@ -21,7 +15,7 @@ data:
{{- with $notifiers }} {{- with $notifiers }}
{{- toYaml . | nindent 2 }} {{- toYaml . | nindent 2 }}
{{- end }} {{- end }}
{{- with $subscriptions }} {{- with (append .Values.notifications.subscriptions .Values.codefresh.promotions.notifications.subscriptions) }}
subscriptions: | subscriptions: |
{{- toYaml . | nindent 4 }} {{- toYaml . | nindent 4 }}
{{- end }} {{- end }}

View file

@ -3543,7 +3543,7 @@ notifications:
# defaultTriggers: | # defaultTriggers: |
# - on-sync-status-unknown # - on-sync-status-unknown
codefresh:
eventReporter: eventReporter:
# Enabled we need to skip argo-cd chart tests for this component # Enabled we need to skip argo-cd chart tests for this component
enabled: true enabled: true
@ -3823,5 +3823,6 @@ codefresh:
# -- List of custom rules for the event reporter's ClusterRole resource # -- List of custom rules for the event reporter's ClusterRole resource
rules: [] rules: []
codefresh:
promotions: promotions:
notifications: {} notifications: {}