Skip to content

Commit 70556eb

Browse files
SMAR-2708 update configuration to be more flexible and relly and standart default values
1 parent 075d0dc commit 70556eb

19 files changed

+59
-39
lines changed

templates/_matcher.tpl

+3-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ metadata:
2121
spec:
2222
replicas: {{ .Values.matcher.replicas }}
2323
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
24-
strategy:
25-
type: {{ .Values.updateStrategy.type }}
24+
{{- if .Values.updateStrategy }}
25+
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
26+
{{- end }}
2627
selector:
2728
matchLabels:
2829
{{- $selectorLabels | nindent 6 }}

templates/api-deployment.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ metadata:
1717
spec:
1818
replicas: {{ .Values.api.replicas }}
1919
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
20-
strategy:
21-
type: {{ .Values.updateStrategy.type }}
20+
{{- if .Values.updateStrategy }}
21+
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
22+
{{- end }}
2223
selector:
2324
matchLabels:
2425
{{- $selectorLabels | nindent 6 }}

templates/auth-api-deployment.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ spec:
1919
replicas: {{ .Values.authApi.replicas }}
2020
{{- end }}
2121
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
22-
strategy:
23-
type: {{ .Values.updateStrategy.type }}
22+
{{- if .Values.updateStrategy }}
23+
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
24+
{{- end }}
2425
selector:
2526
matchLabels:
2627
{{- $selectorLabels | nindent 6 }}

templates/countly-publisher-deployment.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ metadata:
1717
spec:
1818
replicas: 1
1919
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
20-
strategy:
21-
type: {{ .Values.updateStrategy.type }}
20+
{{- if .Values.updateStrategy }}
21+
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
22+
{{- end }}
2223
selector:
2324
matchLabels:
2425
{{- $selectorLabels | nindent 6 }}

templates/db-synchronization-leader-deployment.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ metadata:
1717
spec:
1818
replicas: {{ .Values.dbSynchronizationLeader.replicas }}
1919
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
20-
strategy:
21-
type: {{ .Values.updateStrategy.type }}
20+
{{- if .Values.updateStrategy }}
21+
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
22+
{{- end }}
2223
selector:
2324
matchLabels:
2425
{{- $selectorLabels | nindent 6 }}

templates/detector-deployment.yaml

+6-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ metadata:
66
name: {{ $name | quote }}
77
labels:
88
{{- include "smartface.detector.labels" . | nindent 4 }}
9+
{{- if .Values.updateStrategy }}
10+
debug: "ano"
11+
{{- end }}
912
annotations:
1013
{{- with .Values.annotations }}
1114
{{- toYaml . | nindent 4 }}
@@ -18,8 +21,9 @@ spec:
1821
replicas: {{ .Values.detector.replicas }}
1922
{{- end }}
2023
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
21-
strategy:
22-
type: {{ .Values.updateStrategy.type }}
24+
{{- if .Values.updateStrategy }}
25+
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
26+
{{- end }}
2327
selector:
2428
matchLabels:
2529
{{- $selectorLabels | nindent 6 }}

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

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ metadata:
1717
spec:
1818
replicas: 1
1919
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
20-
strategy:
21-
type: {{ .Values.updateStrategy.type }}
20+
{{- if .Values.updateStrategy }}
21+
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
22+
{{- end }}
2223
selector:
2324
matchLabels:
2425
{{- $selectorLabels | nindent 6 }}

templates/edge-streams/base-deployment.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ metadata:
1717
spec:
1818
replicas: 1
1919
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
20-
strategy:
21-
type: {{ .Values.updateStrategy.type }}
20+
{{- if .Values.updateStrategy }}
21+
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
22+
{{- end }}
2223
selector:
2324
matchLabels:
2425
{{- $selectorLabels | nindent 6 }}

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

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ metadata:
1717
spec:
1818
replicas: {{ .Values.edgeStreamProcessor.replicas }}
1919
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
20-
strategy:
21-
type: {{ .Values.updateStrategy.type }}
20+
{{- if .Values.updateStrategy }}
21+
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
22+
{{- end }}
2223
selector:
2324
matchLabels:
2425
{{- $selectorLabels | nindent 6 }}

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

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ metadata:
1717
spec:
1818
replicas: 1
1919
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
20-
strategy:
21-
type: {{ .Values.updateStrategy.type }}
20+
{{- if .Values.updateStrategy }}
21+
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
22+
{{- end }}
2223
selector:
2324
matchLabels:
2425
{{- $selectorLabels | nindent 6 }}

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

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ metadata:
1717
spec:
1818
replicas: {{ .Values.faceMatcher.replicas }}
1919
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
20-
strategy:
21-
type: {{ .Values.updateStrategy.type }}
20+
{{- if .Values.updateStrategy }}
21+
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
22+
{{- end }}
2223
selector:
2324
matchLabels:
2425
{{- $selectorLabels | nindent 6 }}

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

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ metadata:
1717
spec:
1818
replicas: {{ .Values.streamDataDbWorker.replicas }}
1919
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
20-
strategy:
21-
type: {{ .Values.updateStrategy.type }}
20+
{{- if .Values.updateStrategy }}
21+
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
22+
{{- end }}
2223
selector:
2324
matchLabels:
2425
{{- $selectorLabels | nindent 6 }}

templates/extractor-deployment.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ spec:
1818
replicas: {{ .Values.extractor.replicas }}
1919
{{- end }}
2020
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
21-
strategy:
22-
type: {{ .Values.updateStrategy.type }}
21+
{{- if .Values.updateStrategy }}
22+
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
23+
{{- end }}
2324
selector:
2425
matchLabels:
2526
{{- $selectorLabels | nindent 6 }}

templates/graphql-deployment.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ metadata:
1717
spec:
1818
replicas: {{ .Values.graphqlApi.replicas }}
1919
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
20-
strategy:
21-
type: {{ .Values.updateStrategy.type }}
20+
{{- if .Values.updateStrategy }}
21+
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
22+
{{- end }}
2223
selector:
2324
matchLabels:
2425
{{- $selectorLabels | nindent 6 }}

templates/liveness-deployment.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ metadata:
1616
spec:
1717
replicas: {{ .Values.liveness.replicas }}
1818
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
19-
strategy:
20-
type: {{ .Values.updateStrategy.type }}
19+
{{- if .Values.updateStrategy }}
20+
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
21+
{{- end }}
2122
selector:
2223
matchLabels:
2324
{{- $selectorLabels | nindent 6 }}

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

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ metadata:
55
name: {{ .Values.readonlyApi.noAuthName | quote }}
66
spec:
77
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
8-
strategy:
9-
type: {{ .Values.updateStrategy.type }}
8+
{{- if .Values.updateStrategy }}
9+
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
10+
{{- end }}
1011
selector:
1112
matchLabels:
1213
app: {{ .Values.readonlyApi.noAuthName | quote }}

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

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ metadata:
55
name: {{ .Values.readonlyApi.authName | quote }}
66
spec:
77
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
8-
strategy:
9-
type: {{ .Values.updateStrategy.type }}
8+
{{- if .Values.updateStrategy }}
9+
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
10+
{{- end }}
1011
selector:
1112
matchLabels:
1213
app: {{ .Values.readonlyApi.authName | quote }}

templates/station-deployment.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ metadata:
1717
spec:
1818
replicas: 1
1919
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
20-
strategy:
21-
type: {{ .Values.updateStrategy.type }}
20+
{{- if .Values.updateStrategy }}
21+
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
22+
{{- end }}
2223
selector:
2324
matchLabels:
2425
{{- $selectorLabels | nindent 6 }}

values.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ serviceAnnotations: {}
2020
# -- Common labels for all services
2121
serviceLabels: {}
2222
# -- Common revisionHistoryLimit for all deployments
23-
revisionHistoryLimit: 10
23+
revisionHistoryLimit:
2424
# -- Common updateStrategy for all deployments
2525
## e.g:
2626
## updateStrategy:
@@ -29,8 +29,7 @@ revisionHistoryLimit: 10
2929
## maxSurge: 25%
3030
## maxUnavailable: 25%
3131
##
32-
updateStrategy:
33-
type: "RollingUpdate"
32+
updateStrategy: {}
3433

3534
# -- docker secrets used to pull images with
3635
imagePullSecrets:

0 commit comments

Comments
 (0)