diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c7499d4..5538179b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ All notable changes to this project will be documented here. +### v2.1.17 +- feat: allow overriding revisionHistoryLimit [PR-257](https://github.com/stakater/application/pull/257) + + > Caution: This PR changes the default value for `revisionHistoryLimit` from 10 to 2. + ### v2.1.16 - fix: optional service account [PR-213](https://github.com/stakater/application/pull/213) diff --git a/README.md b/README.md index dd58e806..0b031e19 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,7 @@ To uninstall the chart: | deployment.env | Environment variables to be passed to the app container | `{}` | | deployment.volumes | Volumes to be added to the pod | `{}` | | deployment.volumeMounts | Mount path for Volumes | `{}` | +| deployment.revisionHistoryLimit | The number of old history to retain to allow rollback | `2` | | deployment.command | Command for primary container of deployment | `[]` | | deployment.args | Arg for primary container of deployment | `[]` | | deployment.tolerations | Taint tolerations for nodes | `[]` | diff --git a/application/templates/deployment.yaml b/application/templates/deployment.yaml index ee4fbe54..8e03b7dc 100644 --- a/application/templates/deployment.yaml +++ b/application/templates/deployment.yaml @@ -1,4 +1,4 @@ -{{- if (.Values.deployment).enabled }} +{{- if .Values.deployment.enabled }} apiVersion: apps/v1 kind: Deployment metadata: @@ -28,6 +28,9 @@ spec: {{- if .Values.deployment.strategy }} strategy: {{ toYaml .Values.deployment.strategy | indent 4 }} + {{- end }} + {{- if not (kindIs "invalid" .Values.deployment.revisionHistoryLimit) }} + revisionHistoryLimit: {{ .Values.deployment.revisionHistoryLimit }} {{- end }} template: metadata: diff --git a/application/values.yaml b/application/values.yaml index 639508a0..80d0fdf4 100644 --- a/application/values.yaml +++ b/application/values.yaml @@ -187,6 +187,9 @@ deployment: # values: # - ssd + # Number of ReplicaSet versions to retain + revisionHistoryLimit: 2 + # Image of the app container image: repository: repository/image-name