Skip to content

Commit

Permalink
Add the ability to set up people server annotations (#185)
Browse files Browse the repository at this point in the history
  • Loading branch information
VyacheslavSemin authored May 2, 2024
1 parent f2a232b commit ba26d70
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 19 deletions.
9 changes: 5 additions & 4 deletions templates/applications/opensearch.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.opensearch.annotations }}
{{- $dictValue := default .Values.commonAnnotations .Values.opensearch.annotations }}
annotations: {{- include "docspace.annotations" ( dict "keyName" $dictValue "context" $ ) | nindent 4 }}
{{- end }}
spec:
replicas: 1
selector:
Expand All @@ -29,10 +33,7 @@ spec:
{{- include "docspace.labels.commonLabels" . | trim | nindent 8 }}
{{- end }}
{{- if .Values.opensearch.podAnnotations }}
annotations:
{{- range $key, $value := .Values.opensearch.podAnnotations }}
{{ $key }}: {{ tpl $value $ }}
{{- end }}
annotations: {{- include "docspace.annotations" ( dict "keyName" .Values.opensearch.podAnnotations "context" $ ) | nindent 8 }}
{{- end }}
spec:
serviceAccountName: {{ include "docspace.serviceAccountName" . }}
Expand Down
12 changes: 7 additions & 5 deletions templates/applications/people-server.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.peopleServer.annotations }}
{{- $dictValue := default .Values.commonAnnotations .Values.peopleServer.annotations }}
annotations: {{- include "docspace.annotations" ( dict "keyName" $dictValue "context" $ ) | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.peopleServer.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.peopleServer.podAnnotations }}
{{- $dictValue := default .Values.podAnnotations .Values.peopleServer.podAnnotations }}
annotations: {{- include "docspace.annotations" ( dict "keyName" $dictValue "context" $ ) | nindent 8 }}
{{- end }}
spec:
serviceAccountName: {{ include "docspace.serviceAccountName" . }}
Expand Down
9 changes: 5 additions & 4 deletions templates/applications/proxy-frontend.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.proxyFrontend.annotations }}
{{- $dictValue := default .Values.commonAnnotations .Values.proxyFrontend.annotations }}
annotations: {{- include "docspace.annotations" ( dict "keyName" $dictValue "context" $ ) | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.proxyFrontend.replicaCount }}
selector:
Expand Down Expand Up @@ -38,10 +42,7 @@ spec:
{{- include "docspace.labels.commonLabels" . | trim | nindent 8 }}
{{- end }}
{{- if .Values.proxyFrontend.podAnnotations }}
annotations:
{{- range $key, $value := .Values.proxyFrontend.podAnnotations }}
{{ $key }}: {{ tpl $value $ }}
{{- end }}
annotations: {{- include "docspace.annotations" ( dict "keyName" .Values.proxyFrontend.podAnnotations "context" $ ) | nindent 8 }}
{{- end }}
spec:
serviceAccountName: {{ include "docspace.serviceAccountName" . }}
Expand Down
12 changes: 7 additions & 5 deletions templates/applications/router.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.router.annotations }}
{{- $dictValue := default .Values.commonAnnotations .Values.router.annotations }}
annotations: {{- include "docspace.annotations" ( dict "keyName" $dictValue "context" $ ) | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.router.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.router.podAnnotations }}
{{- $dictValue := default .Values.podAnnotations .Values.router.podAnnotations }}
annotations: {{- include "docspace.annotations" ( dict "keyName" $dictValue "context" $ ) | nindent 8 }}
{{- end }}
spec:
serviceAccountName: {{ include "docspace.serviceAccountName" . }}
Expand Down
22 changes: 21 additions & 1 deletion values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,10 @@ peopleServer:
# peopleServer.kind The controller used for deploy
# Possible values are `Deployment` (default) or `StatefulSet`
kind: Deployment
# peopleServer.annotations Defines annotations that will be additionally added to People Server deploy
# If set to, it takes priority over the `commonAnnotations`
# You can also use `tpl` as the value for the key
annotations: {}
# peopleServer.replicaCount Number of People Server replicas to deploy
replicaCount: 2
# Update strategy used to replace old Pods by new ones
Expand All @@ -577,6 +581,8 @@ peopleServer:
# Used if `peopleServer.kind` is set to `StatefulSet`
# ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-management-policies
podManagementPolicy: OrderedReady
# peopleServer.podAnnotations Map of annotations to add to the People Server pods
podAnnotations: {}
# Configure a Security Context for the People Server Pods
# If set to, it takes priority over the `podSecurityContext`
podSecurityContext:
Expand Down Expand Up @@ -709,6 +715,10 @@ router:
# router.kind The controller used for deploy
# Possible values are `Deployment` (default) or `StatefulSet`
kind: Deployment
# router.annotations Defines annotations that will be additionally added to Router deploy
# If set to, it takes priority over the `commonAnnotations`
# You can also use `tpl` as the value for the key
annotations: {}
# router.replicaCount Number of Router replicas to deploy
replicaCount: 2
# Update strategy used to replace old Pods by new ones
Expand All @@ -726,6 +736,8 @@ router:
# Used if `router.kind` is set to `StatefulSet`
# ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-management-policies
podManagementPolicy: OrderedReady
# router.podAnnotations Map of annotations to add to the Router pods
podAnnotations: {}
# Configure a Security Context for the Router Pods
# If set to, it takes priority over the `podSecurityContext`
podSecurityContext:
Expand Down Expand Up @@ -3136,6 +3148,10 @@ proxyFrontend:
# proxyFrontend.kind The controller used for deploy
# Possible values are `Deployment` (default) or `StatefulSet`
kind: Deployment
# proxyFrontend.annotations Defines annotations that will be additionally added to Proxy Frontend deploy
# If set to, it takes priority over the `commonAnnotations`
# You can also use `tpl` as the value for the key
annotations: {}
# proxyFrontend.replicaCount Number of Proxy Frontend replicas to deploy
replicaCount: 2
# Update strategy used to replace old Pods by new ones
Expand Down Expand Up @@ -3683,7 +3699,11 @@ upgrade:
opensearch:
# opensearch.enabled Enables Opensearch installation
enabled: true
# Update strategy used to replace old Pods by new ones
# opensearch.annotations Defines annotations that will be additionally added to Opensearch deploy
# If set to, it takes priority over the `commonAnnotations`
# You can also use `tpl` as the value for the key
annotations: {}
# Update strategy used to replace old Pod by new ones
updateStrategy:
# opensearch.updateStrategy.type Opensearch update strategy type
# Allowed values: `RollingUpdate` or `OnDelete`
Expand Down

0 comments on commit ba26d70

Please sign in to comment.