Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow overriding revisionHistoryLimit #257

Merged
merged 12 commits into from
Jul 6, 2023
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 | `[]` |
Expand Down
5 changes: 4 additions & 1 deletion application/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if (.Values.deployment).enabled }}
{{- if .Values.deployment.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions application/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@ deployment:
# values:
# - ssd

# Number of ReplicaSet versions to retain
revisionHistoryLimit: 2
d3adb5 marked this conversation as resolved.
Show resolved Hide resolved

# Image of the app container
image:
repository: repository/image-name
Expand Down
Loading