Skip to content

Commit 6786823

Browse files
Merge pull request #18 from innovatrics/feature/SMAR-2708-add-additional-configuration-for-deployments-in-helm
Feature/smar-2708 add additional configuration for deployments in helm
2 parents 456315f + febb112 commit 6786823

22 files changed

+117
-0
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
*.tgz
22
*.zip
3+
.devcontainer/
4+
egid.values.yaml

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- Added test pods supporting `helm test` command
88
- There are multiple test pods, some of which run based on what is possible to test in the selected chart configuration
99
- Added support for tenant management API (ingress)
10+
- Deployment revisionHistoryLimit and updateStrategy are configurable via values
1011

1112
### Changed
1213
- Bumped version of `sf-tenant-management` subchart

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,7 @@ metadata:
512512
| readonlyApi.nodeSelector | object | `{}` | |
513513
| readonlyApi.proxyContainer.resources | object | `{}` | |
514514
| readonlyApi.tolerations | list | `[]` | |
515+
| revisionHistoryLimit | string | `nil` | Common revisionHistoryLimit for all deployments |
515516
| serviceAccount.annotations | object | `{}` | Annotations for the service account |
516517
| serviceAccount.automountServiceAccountToken | bool | `true` | Set this toggle to false to opt out of automounting API credentials for the service account |
517518
| serviceAccount.create | bool | `true` | Specifies whether a ServiceAccount should be created |
@@ -574,6 +575,7 @@ metadata:
574575
| tests.podAnnotations | object | `{}` | Annotations for test pods |
575576
| tests.podLabels | object | `{}` | Additional labels for test pods |
576577
| tests.tolerations | list | `[]` | |
578+
| updateStrategy | object | `{}` | Common updateStrategy for all deployments |
577579
| wlStreamPopulationJob.enabled | bool | `false` | |
578580
| wlStreamPopulationJob.image.digest | string | `nil` | Overrides the image tag with an image digest |
579581
| wlStreamPopulationJob.image.pullPolicy | string | `"IfNotPresent"` | Docker image pull policy |

templates/_matcher.tpl

+6
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ metadata:
2020
{{- end }}
2121
spec:
2222
replicas: {{ .Values.matcher.replicas }}
23+
{{- if .Values.revisionHistoryLimit }}
24+
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
25+
{{- end }}
26+
{{- if .Values.updateStrategy }}
27+
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
28+
{{- end }}
2329
selector:
2430
matchLabels:
2531
{{- $selectorLabels | nindent 6 }}

templates/api-deployment.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ metadata:
1616
{{- end }}
1717
spec:
1818
replicas: {{ .Values.api.replicas }}
19+
{{- if .Values.revisionHistoryLimit }}
20+
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
21+
{{- end }}
22+
{{- if .Values.updateStrategy }}
23+
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
24+
{{- end }}
1925
selector:
2026
matchLabels:
2127
{{- $selectorLabels | nindent 6 }}

templates/auth-api-deployment.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ spec:
1818
{{- if not (and (or .Values.autoscaling.cron.enabled .Values.autoscaling.rmq.enabled) .Values.autoscaling.api.enabled ) }}
1919
replicas: {{ .Values.authApi.replicas }}
2020
{{- end }}
21+
{{- if .Values.revisionHistoryLimit }}
22+
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
23+
{{- end }}
24+
{{- if .Values.updateStrategy }}
25+
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
26+
{{- end }}
2127
selector:
2228
matchLabels:
2329
{{- $selectorLabels | nindent 6 }}

templates/countly-publisher-deployment.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ metadata:
1616
{{- end }}
1717
spec:
1818
replicas: 1
19+
{{- if .Values.revisionHistoryLimit }}
20+
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
21+
{{- end }}
22+
{{- if .Values.updateStrategy }}
23+
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
24+
{{- end }}
1925
selector:
2026
matchLabels:
2127
{{- $selectorLabels | nindent 6 }}

templates/db-synchronization-leader-deployment.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ metadata:
1616
{{- end }}
1717
spec:
1818
replicas: {{ .Values.dbSynchronizationLeader.replicas }}
19+
{{- if .Values.revisionHistoryLimit }}
20+
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
21+
{{- end }}
22+
{{- if .Values.updateStrategy }}
23+
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
24+
{{- end }}
1925
selector:
2026
matchLabels:
2127
{{- $selectorLabels | nindent 6 }}

templates/detector-deployment.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ spec:
1717
{{- if not (and (or .Values.autoscaling.cron.enabled .Values.autoscaling.rmq.enabled) .Values.autoscaling.detector.enabled ) }}
1818
replicas: {{ .Values.detector.replicas }}
1919
{{- end }}
20+
{{- if .Values.revisionHistoryLimit }}
21+
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
22+
{{- end }}
23+
{{- if .Values.updateStrategy }}
24+
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
25+
{{- end }}
2026
selector:
2127
matchLabels:
2228
{{- $selectorLabels | nindent 6 }}

templates/edge-streams/access-controller-deployment.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ metadata:
1616
{{- end }}
1717
spec:
1818
replicas: 1
19+
{{- if .Values.revisionHistoryLimit }}
20+
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
21+
{{- end }}
22+
{{- if .Values.updateStrategy }}
23+
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
24+
{{- end }}
1925
selector:
2026
matchLabels:
2127
{{- $selectorLabels | nindent 6 }}

templates/edge-streams/base-deployment.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ metadata:
1616
{{- end }}
1717
spec:
1818
replicas: 1
19+
{{- if .Values.revisionHistoryLimit }}
20+
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
21+
{{- end }}
22+
{{- if .Values.updateStrategy }}
23+
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
24+
{{- end }}
1925
selector:
2026
matchLabels:
2127
{{- $selectorLabels | nindent 6 }}

templates/edge-streams/edge-stream-processor-deployment.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ metadata:
1616
{{- end }}
1717
spec:
1818
replicas: {{ .Values.edgeStreamProcessor.replicas }}
19+
{{- if .Values.revisionHistoryLimit }}
20+
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
21+
{{- end }}
22+
{{- if .Values.updateStrategy }}
23+
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
24+
{{- end }}
1925
selector:
2026
matchLabels:
2127
{{- $selectorLabels | nindent 6 }}

templates/edge-streams/edge-streams-state-sync-deployment.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ metadata:
1616
{{- end }}
1717
spec:
1818
replicas: 1
19+
{{- if .Values.revisionHistoryLimit }}
20+
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
21+
{{- end }}
22+
{{- if .Values.updateStrategy }}
23+
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
24+
{{- end }}
1925
selector:
2026
matchLabels:
2127
{{- $selectorLabels | nindent 6 }}

templates/edge-streams/face-matcher-deployment.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ metadata:
1616
{{- end }}
1717
spec:
1818
replicas: {{ .Values.faceMatcher.replicas }}
19+
{{- if .Values.revisionHistoryLimit }}
20+
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
21+
{{- end }}
22+
{{- if .Values.updateStrategy }}
23+
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
24+
{{- end }}
1925
selector:
2026
matchLabels:
2127
{{- $selectorLabels | nindent 6 }}

templates/edge-streams/stream-data-db-worker-deployment.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ metadata:
1616
{{- end }}
1717
spec:
1818
replicas: {{ .Values.streamDataDbWorker.replicas }}
19+
{{- if .Values.revisionHistoryLimit }}
20+
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
21+
{{- end }}
22+
{{- if .Values.updateStrategy }}
23+
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
24+
{{- end }}
1925
selector:
2026
matchLabels:
2127
{{- $selectorLabels | nindent 6 }}

templates/extractor-deployment.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ spec:
1717
{{- if not (and (or .Values.autoscaling.cron.enabled .Values.autoscaling.rmq.enabled) .Values.autoscaling.extractor.enabled ) }}
1818
replicas: {{ .Values.extractor.replicas }}
1919
{{- end }}
20+
{{- if .Values.revisionHistoryLimit }}
21+
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
22+
{{- end }}
23+
{{- if .Values.updateStrategy }}
24+
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
25+
{{- end }}
2026
selector:
2127
matchLabels:
2228
{{- $selectorLabels | nindent 6 }}

templates/graphql-deployment.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ metadata:
1616
{{- end }}
1717
spec:
1818
replicas: {{ .Values.graphqlApi.replicas }}
19+
{{- if .Values.revisionHistoryLimit }}
20+
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
21+
{{- end }}
22+
{{- if .Values.updateStrategy }}
23+
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
24+
{{- end }}
1925
selector:
2026
matchLabels:
2127
{{- $selectorLabels | nindent 6 }}

templates/liveness-deployment.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ metadata:
1515
{{- end }}
1616
spec:
1717
replicas: {{ .Values.liveness.replicas }}
18+
{{- if .Values.revisionHistoryLimit }}
19+
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
20+
{{- end }}
21+
{{- if .Values.updateStrategy }}
22+
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
23+
{{- end }}
1824
selector:
1925
matchLabels:
2026
{{- $selectorLabels | nindent 6 }}

templates/readonly-api/api-nginx-deployment.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ kind: Deployment
44
metadata:
55
name: {{ .Values.readonlyApi.noAuthName | quote }}
66
spec:
7+
{{- if .Values.revisionHistoryLimit }}
8+
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
9+
{{- end }}
10+
{{- if .Values.updateStrategy }}
11+
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
12+
{{- end }}
713
selector:
814
matchLabels:
915
app: {{ .Values.readonlyApi.noAuthName | quote }}

templates/readonly-api/auth-api-nginx-deployment.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ kind: Deployment
44
metadata:
55
name: {{ .Values.readonlyApi.authName | quote }}
66
spec:
7+
{{- if .Values.revisionHistoryLimit }}
8+
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
9+
{{- end }}
10+
{{- if .Values.updateStrategy }}
11+
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
12+
{{- end }}
713
selector:
814
matchLabels:
915
app: {{ .Values.readonlyApi.authName | quote }}

templates/station-deployment.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ metadata:
1616
{{- end }}
1717
spec:
1818
replicas: 1
19+
{{- if .Values.revisionHistoryLimit }}
20+
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
21+
{{- end }}
22+
{{- if .Values.updateStrategy }}
23+
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
24+
{{- end }}
1925
selector:
2026
matchLabels:
2127
{{- $selectorLabels | nindent 6 }}

values.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ podLabels: {}
1919
serviceAnnotations: {}
2020
# -- Common labels for all services
2121
serviceLabels: {}
22+
# -- Common revisionHistoryLimit for all deployments
23+
revisionHistoryLimit:
24+
# -- Common updateStrategy for all deployments
25+
updateStrategy: {}
2226

2327
# -- docker secrets used to pull images with
2428
imagePullSecrets:

0 commit comments

Comments
 (0)