Skip to content

Commit 87f021c

Browse files
authored
Allow configuration of update strategy for deployments and statefulsets (#104)
* Allow configuration of update strategy for deployments and statefulsets * Update readme/changelog/chart.yaml
1 parent f007f82 commit 87f021c

7 files changed

Lines changed: 30 additions & 10 deletions

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ numbering uses [semantic versioning](http://semver.org).
55

66
NOTE: The change log until version `v0.2.4` is auto-generated.
77

8+
## [v5.16.0](https://github.com/puppetlabs/puppetserver-helm-chart/tree/v5.16.0) (2022-04-05)
9+
10+
- feat: make update strategy configurable
11+
812
## [v5.15.0](https://github.com/puppetlabs/puppetserver-helm-chart/tree/v5.15.0) (2022-04-20)
913

1014
- feat: use k8s secrets instead of configmaps for eyaml secrets

Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v1
22
name: puppetserver
3-
version: 5.15.0
3+
version: 5.16.0
44
appVersion: 7.4.2
55
description: Puppet automates the delivery and operation of software.
66
keywords: ["puppet", "puppetserver", "automation", "iac", "infrastructure", "cm", "ci", "cd"]

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ The following table lists the configurable parameters of the Puppetserver chart
131131
| `puppetserver.pullPolicy` | puppetserver img pull policy | `IfNotPresent`|
132132
| `puppetserver.masters.resources` | puppetserver masters resource limits | ``|
133133
| `puppetserver.masters.extraEnv` | puppetserver masters additional container env vars |``|
134+
| `puppetserver.masters.updateStrategy` | puppetserver masters update strategy |`RollingUpdate`|
134135
| `puppetserver.masters.readinessProbeInitialDelay` | the initial delay for the puppetserver masters readiness probe | `180`|
135136
| `puppetserver.masters.readinessProbePeriodSeconds` | how often (in seconds) to perform the puppetserver masters readiness probe | `60`|
136137
| `puppetserver.masters.readinessProbeTimeout` | the timeout for the puppetserver masters readiness probe | `20`|
@@ -170,6 +171,7 @@ The following table lists the configurable parameters of the Puppetserver chart
170171
| `puppetserver.compilers.podAntiAffinity` | puppetserver compilers pod affinity constraints |`false`|
171172
| `puppetserver.compilers.annotations`| puppetserver compilers statefulset annotations |``|
172173
| `puppetserver.compilers.extraEnv` | puppetserver compilers additional container env vars |``|
174+
| `puppetserver.compilers.updateStrategy` | puppetserver compilers update strategy |`RollingUpdate`|
173175
| `puppetserver.compilers.readinessProbeInitialDelay` | the initial delay for the puppetserver masters readiness probe | `180`|
174176
| `puppetserver.compilers.readinessProbePeriodSeconds` | how often (in seconds) to perform the puppetserver masters readiness probe | `60`|
175177
| `puppetserver.compilers.readinessProbeTimeout` | the timeout for the puppetserver masters readiness probe | `20`|
@@ -240,6 +242,7 @@ The following table lists the configurable parameters of the Puppetserver chart
240242
| `puppetdb.pullPolicy` | puppetdb img pull policy | `IfNotPresent`|
241243
| `puppetdb.resources` | puppetdb resource limits |``|
242244
| `puppetdb.extraEnv` | puppetdb additional container env vars |``|
245+
| `puppetdb.updateStrategy` | puppetdb update strategy |`Recreate`|
243246
| `puppetdb.metrics.enabled` | puppetdb metrics enable/disable flag |`false`|
244247
| `puppetdb.customPersistentVolumeClaim.storage.enable`| If true, use custom PVC for storage |``|
245248
| `puppetdb.customPersistentVolumeClaim.storage.config`| Configuration for custom PVC for storage |``|
@@ -348,3 +351,4 @@ kill %[job_numbers_above]
348351
* [Erlon Pinheiro](https://github.com/erlonpinheiro), Contributor
349352
* [Reinier Schoof](https://github.com/skoef), Contributor
350353
* [Manasseh MMadu](https://github.com/mensaah), Contributor
354+
* [Aidan](https://github.com/artificial-aidan), Contributor

templates/puppetdb-deployment.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ spec:
88
selector:
99
matchLabels:
1010
{{- include "puppetserver.puppetdb.matchLabels" . | nindent 6 }}
11-
strategy:
12-
type: Recreate
11+
{{- if .Values.puppetdb.updateStrategy }}
12+
strategy: {{- toYaml .Values.puppetdb.updateStrategy | nindent 4 }}
13+
{{- end }}
1314
template:
1415
metadata:
1516
labels:

templates/puppetserver-deployment-masters.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,9 @@ spec:
1313
selector:
1414
matchLabels:
1515
{{- include "puppetserver.puppetserver.matchLabels" . | nindent 6 }}
16-
strategy:
17-
type: RollingUpdate
18-
rollingUpdate:
19-
maxSurge: 20%
20-
maxUnavailable: 0%
16+
{{- if .Values.puppetserver.masters.updateStrategy }}
17+
strategy: {{- toYaml .Values.puppetserver.masters.updateStrategy | nindent 4 }}
18+
{{- end }}
2119
template:
2220
metadata:
2321
labels:

templates/puppetserver-statefulset-compilers.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ spec:
1818
replicas: {{ .Values.puppetserver.compilers.manualScaling.compilers }}
1919
{{- end }}
2020
podManagementPolicy: {{ .Values.puppetserver.compilers.podManagementPolicy }}
21-
updateStrategy:
22-
type: RollingUpdate
21+
{{- if .Values.puppetserver.compilers.updateStrategy }}
22+
updateStrategy: {{- toYaml .Values.puppetserver.compilers.updateStrategy | nindent 4 }}
23+
{{- end }}
2324
template:
2425
metadata:
2526
labels:

values.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ puppetserver:
2727
##
2828
extraEnv: {}
2929

30+
updateStrategy:
31+
type: RollingUpdate
32+
rollingUpdate:
33+
maxSurge: 20%
34+
maxUnavailable: 0%
35+
3036
## Puppet Server Master readiness and liveness probe initial delays and timeouts
3137
## Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
3238
##
@@ -168,6 +174,9 @@ puppetserver:
168174
##
169175
extraEnv: {}
170176

177+
updateStrategy:
178+
type: RollingUpdate
179+
171180
## Puppet Server Compiler readiness and liveness probe initial delays and timeouts
172181
## Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
173182
##
@@ -392,6 +401,9 @@ puppetdb:
392401
## Additional puppetdb container environment variables
393402
extraEnv: {}
394403

404+
updateStrategy:
405+
type: Recreate
406+
395407
## Service for PuppetDB
396408
service:
397409
## The LB type (network protocol) for some cloud providers must be set here.

0 commit comments

Comments
 (0)