diff --git a/.gitignore b/.gitignore index c27caed..3639c7d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ *.tgz *.zip +.devcontainer/ +egid.values.yaml diff --git a/CHANGELOG.md b/CHANGELOG.md index 982c397..5d3df87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - Added test pods supporting `helm test` command - There are multiple test pods, some of which run based on what is possible to test in the selected chart configuration - Added support for tenant management API (ingress) +- Deployment revisionHistoryLimit and updateStrategy are configurable via values ### Changed - Bumped version of `sf-tenant-management` subchart diff --git a/README.md b/README.md index bf53fb5..a223018 100644 --- a/README.md +++ b/README.md @@ -512,6 +512,7 @@ metadata: | readonlyApi.nodeSelector | object | `{}` | | | readonlyApi.proxyContainer.resources | object | `{}` | | | readonlyApi.tolerations | list | `[]` | | +| revisionHistoryLimit | string | `nil` | Common revisionHistoryLimit for all deployments | | serviceAccount.annotations | object | `{}` | Annotations for the service account | | serviceAccount.automountServiceAccountToken | bool | `true` | Set this toggle to false to opt out of automounting API credentials for the service account | | serviceAccount.create | bool | `true` | Specifies whether a ServiceAccount should be created | @@ -574,6 +575,7 @@ metadata: | tests.podAnnotations | object | `{}` | Annotations for test pods | | tests.podLabels | object | `{}` | Additional labels for test pods | | tests.tolerations | list | `[]` | | +| updateStrategy | object | `{}` | Common updateStrategy for all deployments | | wlStreamPopulationJob.enabled | bool | `false` | | | wlStreamPopulationJob.image.digest | string | `nil` | Overrides the image tag with an image digest | | wlStreamPopulationJob.image.pullPolicy | string | `"IfNotPresent"` | Docker image pull policy | diff --git a/templates/_matcher.tpl b/templates/_matcher.tpl index 6743784..0b813ba 100644 --- a/templates/_matcher.tpl +++ b/templates/_matcher.tpl @@ -20,6 +20,12 @@ metadata: {{- end }} spec: replicas: {{ .Values.matcher.replicas }} + {{- if .Values.revisionHistoryLimit }} + revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} + {{- end }} + {{- if .Values.updateStrategy }} + strategy: {{- toYaml .Values.updateStrategy | nindent 4 }} + {{- end }} selector: matchLabels: {{- $selectorLabels | nindent 6 }} diff --git a/templates/api-deployment.yaml b/templates/api-deployment.yaml index be62b43..a88fb19 100644 --- a/templates/api-deployment.yaml +++ b/templates/api-deployment.yaml @@ -16,6 +16,12 @@ metadata: {{- end }} spec: replicas: {{ .Values.api.replicas }} + {{- if .Values.revisionHistoryLimit }} + revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} + {{- end }} + {{- if .Values.updateStrategy }} + strategy: {{- toYaml .Values.updateStrategy | nindent 4 }} + {{- end }} selector: matchLabels: {{- $selectorLabels | nindent 6 }} diff --git a/templates/auth-api-deployment.yaml b/templates/auth-api-deployment.yaml index 7d3fa24..a9045e2 100644 --- a/templates/auth-api-deployment.yaml +++ b/templates/auth-api-deployment.yaml @@ -18,6 +18,12 @@ spec: {{- if not (and (or .Values.autoscaling.cron.enabled .Values.autoscaling.rmq.enabled) .Values.autoscaling.api.enabled ) }} replicas: {{ .Values.authApi.replicas }} {{- end }} + {{- if .Values.revisionHistoryLimit }} + revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} + {{- end }} + {{- if .Values.updateStrategy }} + strategy: {{- toYaml .Values.updateStrategy | nindent 4 }} + {{- end }} selector: matchLabels: {{- $selectorLabels | nindent 6 }} diff --git a/templates/countly-publisher-deployment.yaml b/templates/countly-publisher-deployment.yaml index af40ce4..e5cbf09 100644 --- a/templates/countly-publisher-deployment.yaml +++ b/templates/countly-publisher-deployment.yaml @@ -16,6 +16,12 @@ metadata: {{- end }} spec: replicas: 1 + {{- if .Values.revisionHistoryLimit }} + revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} + {{- end }} + {{- if .Values.updateStrategy }} + strategy: {{- toYaml .Values.updateStrategy | nindent 4 }} + {{- end }} selector: matchLabels: {{- $selectorLabels | nindent 6 }} diff --git a/templates/db-synchronization-leader-deployment.yaml b/templates/db-synchronization-leader-deployment.yaml index 871fea9..826035d 100644 --- a/templates/db-synchronization-leader-deployment.yaml +++ b/templates/db-synchronization-leader-deployment.yaml @@ -16,6 +16,12 @@ metadata: {{- end }} spec: replicas: {{ .Values.dbSynchronizationLeader.replicas }} + {{- if .Values.revisionHistoryLimit }} + revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} + {{- end }} + {{- if .Values.updateStrategy }} + strategy: {{- toYaml .Values.updateStrategy | nindent 4 }} + {{- end }} selector: matchLabels: {{- $selectorLabels | nindent 6 }} diff --git a/templates/detector-deployment.yaml b/templates/detector-deployment.yaml index faf06f8..9cf7015 100644 --- a/templates/detector-deployment.yaml +++ b/templates/detector-deployment.yaml @@ -17,6 +17,12 @@ spec: {{- if not (and (or .Values.autoscaling.cron.enabled .Values.autoscaling.rmq.enabled) .Values.autoscaling.detector.enabled ) }} replicas: {{ .Values.detector.replicas }} {{- end }} + {{- if .Values.revisionHistoryLimit }} + revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} + {{- end }} + {{- if .Values.updateStrategy }} + strategy: {{- toYaml .Values.updateStrategy | nindent 4 }} + {{- end }} selector: matchLabels: {{- $selectorLabels | nindent 6 }} diff --git a/templates/edge-streams/access-controller-deployment.yaml b/templates/edge-streams/access-controller-deployment.yaml index cb2d5bd..8fb1eb7 100644 --- a/templates/edge-streams/access-controller-deployment.yaml +++ b/templates/edge-streams/access-controller-deployment.yaml @@ -16,6 +16,12 @@ metadata: {{- end }} spec: replicas: 1 + {{- if .Values.revisionHistoryLimit }} + revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} + {{- end }} + {{- if .Values.updateStrategy }} + strategy: {{- toYaml .Values.updateStrategy | nindent 4 }} + {{- end }} selector: matchLabels: {{- $selectorLabels | nindent 6 }} diff --git a/templates/edge-streams/base-deployment.yaml b/templates/edge-streams/base-deployment.yaml index 1ddeb7b..aa22917 100644 --- a/templates/edge-streams/base-deployment.yaml +++ b/templates/edge-streams/base-deployment.yaml @@ -16,6 +16,12 @@ metadata: {{- end }} spec: replicas: 1 + {{- if .Values.revisionHistoryLimit }} + revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} + {{- end }} + {{- if .Values.updateStrategy }} + strategy: {{- toYaml .Values.updateStrategy | nindent 4 }} + {{- end }} selector: matchLabels: {{- $selectorLabels | nindent 6 }} diff --git a/templates/edge-streams/edge-stream-processor-deployment.yaml b/templates/edge-streams/edge-stream-processor-deployment.yaml index 9d39abd..873da08 100644 --- a/templates/edge-streams/edge-stream-processor-deployment.yaml +++ b/templates/edge-streams/edge-stream-processor-deployment.yaml @@ -16,6 +16,12 @@ metadata: {{- end }} spec: replicas: {{ .Values.edgeStreamProcessor.replicas }} + {{- if .Values.revisionHistoryLimit }} + revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} + {{- end }} + {{- if .Values.updateStrategy }} + strategy: {{- toYaml .Values.updateStrategy | nindent 4 }} + {{- end }} selector: matchLabels: {{- $selectorLabels | nindent 6 }} diff --git a/templates/edge-streams/edge-streams-state-sync-deployment.yaml b/templates/edge-streams/edge-streams-state-sync-deployment.yaml index de6a023..d609fd1 100644 --- a/templates/edge-streams/edge-streams-state-sync-deployment.yaml +++ b/templates/edge-streams/edge-streams-state-sync-deployment.yaml @@ -16,6 +16,12 @@ metadata: {{- end }} spec: replicas: 1 + {{- if .Values.revisionHistoryLimit }} + revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} + {{- end }} + {{- if .Values.updateStrategy }} + strategy: {{- toYaml .Values.updateStrategy | nindent 4 }} + {{- end }} selector: matchLabels: {{- $selectorLabels | nindent 6 }} diff --git a/templates/edge-streams/face-matcher-deployment.yaml b/templates/edge-streams/face-matcher-deployment.yaml index 0bc61a3..a8f5d5b 100644 --- a/templates/edge-streams/face-matcher-deployment.yaml +++ b/templates/edge-streams/face-matcher-deployment.yaml @@ -16,6 +16,12 @@ metadata: {{- end }} spec: replicas: {{ .Values.faceMatcher.replicas }} + {{- if .Values.revisionHistoryLimit }} + revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} + {{- end }} + {{- if .Values.updateStrategy }} + strategy: {{- toYaml .Values.updateStrategy | nindent 4 }} + {{- end }} selector: matchLabels: {{- $selectorLabels | nindent 6 }} diff --git a/templates/edge-streams/stream-data-db-worker-deployment.yaml b/templates/edge-streams/stream-data-db-worker-deployment.yaml index d713a86..36dd69c 100644 --- a/templates/edge-streams/stream-data-db-worker-deployment.yaml +++ b/templates/edge-streams/stream-data-db-worker-deployment.yaml @@ -16,6 +16,12 @@ metadata: {{- end }} spec: replicas: {{ .Values.streamDataDbWorker.replicas }} + {{- if .Values.revisionHistoryLimit }} + revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} + {{- end }} + {{- if .Values.updateStrategy }} + strategy: {{- toYaml .Values.updateStrategy | nindent 4 }} + {{- end }} selector: matchLabels: {{- $selectorLabels | nindent 6 }} diff --git a/templates/extractor-deployment.yaml b/templates/extractor-deployment.yaml index 1763b6f..f831fc9 100644 --- a/templates/extractor-deployment.yaml +++ b/templates/extractor-deployment.yaml @@ -17,6 +17,12 @@ spec: {{- if not (and (or .Values.autoscaling.cron.enabled .Values.autoscaling.rmq.enabled) .Values.autoscaling.extractor.enabled ) }} replicas: {{ .Values.extractor.replicas }} {{- end }} + {{- if .Values.revisionHistoryLimit }} + revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} + {{- end }} + {{- if .Values.updateStrategy }} + strategy: {{- toYaml .Values.updateStrategy | nindent 4 }} + {{- end }} selector: matchLabels: {{- $selectorLabels | nindent 6 }} diff --git a/templates/graphql-deployment.yaml b/templates/graphql-deployment.yaml index 652b98d..314cd70 100644 --- a/templates/graphql-deployment.yaml +++ b/templates/graphql-deployment.yaml @@ -16,6 +16,12 @@ metadata: {{- end }} spec: replicas: {{ .Values.graphqlApi.replicas }} + {{- if .Values.revisionHistoryLimit }} + revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} + {{- end }} + {{- if .Values.updateStrategy }} + strategy: {{- toYaml .Values.updateStrategy | nindent 4 }} + {{- end }} selector: matchLabels: {{- $selectorLabels | nindent 6 }} diff --git a/templates/liveness-deployment.yaml b/templates/liveness-deployment.yaml index 9941c00..a5362b4 100644 --- a/templates/liveness-deployment.yaml +++ b/templates/liveness-deployment.yaml @@ -15,6 +15,12 @@ metadata: {{- end }} spec: replicas: {{ .Values.liveness.replicas }} + {{- if .Values.revisionHistoryLimit }} + revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} + {{- end }} + {{- if .Values.updateStrategy }} + strategy: {{- toYaml .Values.updateStrategy | nindent 4 }} + {{- end }} selector: matchLabels: {{- $selectorLabels | nindent 6 }} diff --git a/templates/readonly-api/api-nginx-deployment.yaml b/templates/readonly-api/api-nginx-deployment.yaml index a99966e..ad13fce 100644 --- a/templates/readonly-api/api-nginx-deployment.yaml +++ b/templates/readonly-api/api-nginx-deployment.yaml @@ -4,6 +4,12 @@ kind: Deployment metadata: name: {{ .Values.readonlyApi.noAuthName | quote }} spec: + {{- if .Values.revisionHistoryLimit }} + revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} + {{- end }} + {{- if .Values.updateStrategy }} + strategy: {{- toYaml .Values.updateStrategy | nindent 4 }} + {{- end }} selector: matchLabels: app: {{ .Values.readonlyApi.noAuthName | quote }} diff --git a/templates/readonly-api/auth-api-nginx-deployment.yaml b/templates/readonly-api/auth-api-nginx-deployment.yaml index dd27e71..bb9d154 100644 --- a/templates/readonly-api/auth-api-nginx-deployment.yaml +++ b/templates/readonly-api/auth-api-nginx-deployment.yaml @@ -4,6 +4,12 @@ kind: Deployment metadata: name: {{ .Values.readonlyApi.authName | quote }} spec: + {{- if .Values.revisionHistoryLimit }} + revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} + {{- end }} + {{- if .Values.updateStrategy }} + strategy: {{- toYaml .Values.updateStrategy | nindent 4 }} + {{- end }} selector: matchLabels: app: {{ .Values.readonlyApi.authName | quote }} diff --git a/templates/station-deployment.yaml b/templates/station-deployment.yaml index c667acb..220c2a7 100644 --- a/templates/station-deployment.yaml +++ b/templates/station-deployment.yaml @@ -16,6 +16,12 @@ metadata: {{- end }} spec: replicas: 1 + {{- if .Values.revisionHistoryLimit }} + revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} + {{- end }} + {{- if .Values.updateStrategy }} + strategy: {{- toYaml .Values.updateStrategy | nindent 4 }} + {{- end }} selector: matchLabels: {{- $selectorLabels | nindent 6 }} diff --git a/values.yaml b/values.yaml index 2a99ceb..add8ff9 100644 --- a/values.yaml +++ b/values.yaml @@ -19,6 +19,10 @@ podLabels: {} serviceAnnotations: {} # -- Common labels for all services serviceLabels: {} +# -- Common revisionHistoryLimit for all deployments +revisionHistoryLimit: +# -- Common updateStrategy for all deployments +updateStrategy: {} # -- docker secrets used to pull images with imagePullSecrets: