Skip to content

Commit

Permalink
feat: allow changing the default revisionHistoryLimit (#2920)
Browse files Browse the repository at this point in the history
Co-authored-by: Sertaç Özercan <[email protected]>
  • Loading branch information
tberreis and sozercan authored Aug 2, 2023
1 parent 8d72e8d commit db4f346
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/build/helmify/kustomize-for-helm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ metadata:
namespace: gatekeeper-system
spec:
replicas: HELMSUBST_DEPLOYMENT_REPLICAS
revisionHistoryLimit: HELMSUBST_DEPLOYMENT_REVISION_HISTORY_LIMIT
strategy:
type: HELMSUBST_DEPLOYMENT_CONTROLLER_MANAGER_STRATEGY_TYPE
template:
Expand Down Expand Up @@ -147,6 +148,7 @@ metadata:
name: gatekeeper-audit
namespace: gatekeeper-system
spec:
revisionHistoryLimit: HELMSUBST_DEPLOYMENT_REVISION_HISTORY_LIMIT
template:
metadata:
annotations:
Expand Down
2 changes: 2 additions & 0 deletions cmd/build/helmify/replacements.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ var replacements = map[string]string{

"HELMSUBST_DEPLOYMENT_REPLICAS": `{{ .Values.replicas }}`,

"HELMSUBST_DEPLOYMENT_REVISION_HISTORY_LIMIT": `{{ .Values.revisionHistoryLimit }}`,

`HELMSUBST_ANNOTATIONS: ""`: `{{- if .Values.podAnnotations }}
{{- toYaml .Values.podAnnotations | trim | nindent 8 }}
{{- end }}`,
Expand Down
1 change: 1 addition & 0 deletions cmd/build/helmify/static/values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
replicas: 3
revisionHistoryLimit: 10
auditInterval: 60
metricsBackends: ["prometheus"]
auditMatchKindOnly: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ metadata:
namespace: '{{ .Release.Namespace }}'
spec:
replicas: 1
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
selector:
matchLabels:
app: '{{ template "gatekeeper.name" . }}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ metadata:
namespace: '{{ .Release.Namespace }}'
spec:
replicas: {{ .Values.replicas }}
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
selector:
matchLabels:
app: '{{ template "gatekeeper.name" . }}'
Expand Down
1 change: 1 addition & 0 deletions manifest_staging/charts/gatekeeper/values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
replicas: 3
revisionHistoryLimit: 10
auditInterval: 60
metricsBackends: ["prometheus"]
auditMatchKindOnly: false
Expand Down

0 comments on commit db4f346

Please sign in to comment.