Skip to content

Commit

Permalink
Add the ability to set up notify annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
VyacheslavSemin committed May 2, 2024
1 parent 567f057 commit dc8eab6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
12 changes: 7 additions & 5 deletions templates/applications/notify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ metadata:
{{- if .Values.commonLabels }}
{{- include "docspace.labels.commonLabels" . | trim | nindent 4 }}
{{- end }}
{{- if or .Values.commonAnnotations .Values.notify.annotations }}
{{- $dictValue := default .Values.commonAnnotations .Values.notify.annotations }}
annotations: {{- include "docspace.annotations" ( dict "keyName" $dictValue "context" $ ) | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.notify.replicaCount }}
selector:
Expand Down Expand Up @@ -37,11 +41,9 @@ spec:
{{- if .Values.commonLabels }}
{{- include "docspace.labels.commonLabels" . | trim | nindent 8 }}
{{- end }}
{{- if .Values.podAnnotations }}
annotations:
{{- range $key, $value := .Values.podAnnotations }}
{{ $key }}: {{ tpl $value $ }}
{{- end }}
{{- if or .Values.podAnnotations .Values.notify.podAnnotations }}
{{- $dictValue := default .Values.podAnnotations .Values.notify.podAnnotations }}
annotations: {{- include "docspace.annotations" ( dict "keyName" $dictValue "context" $ ) | nindent 8 }}
{{- end }}
spec:
serviceAccountName: {{ include "docspace.serviceAccountName" . }}
Expand Down
6 changes: 6 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2372,6 +2372,10 @@ notify:
# notify.kind The controller used for deploy
# Possible values are `Deployment` (default) or `StatefulSet`
kind: Deployment
# notify.annotations Defines annotations that will be additionally added to Notify deploy
# If set to, it takes priority over the `commonAnnotations`
# You can also use `tpl` as the value for the key
annotations: {}
# notify.replicaCount Number of Notify replicas to deploy
replicaCount: 2
# Update strategy used to replace old Pods by new ones
Expand All @@ -2389,6 +2393,8 @@ notify:
# Used if `notify.kind` is set to `StatefulSet`
# ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-management-policies
podManagementPolicy: OrderedReady
# notify.podAnnotations Map of annotations to add to the Notify pods
podAnnotations: {}
# Configure a Security Context for the Notify Pods
# If set to, it takes priority over the `podSecurityContext`
podSecurityContext:
Expand Down

0 comments on commit dc8eab6

Please sign in to comment.