Skip to content

Commit 511c51e

Browse files
committed
fix: Add parameters for tuning revisionHistory and securityContext
Signed-off-by: Matt Dainty <[email protected]>
1 parent 2ac9e0a commit 511c51e

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

charts/cni-metrics-helper/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ The following table lists the configurable parameters for this chart and their d
5959
| serviceAccount.name | The name of the ServiceAccount to use | nil |
6060
| serviceAccount.create | Specifies whether a ServiceAccount should be created | true |
6161
| serviceAccount.annotations | Specifies the annotations for ServiceAccount | {} |
62+
| revisionHistoryLimit | The number of revisions to keep | 10 |
63+
| podSecurityContext | SecurityContext to set on the pod | {} |
64+
| containerSecurityContext | SecurityContext to set on the container | {} |
6265

6366
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install` or provide a YAML file containing the values for the above parameters:
6467

charts/cni-metrics-helper/templates/deployment.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ metadata:
66
labels:
77
k8s-app: cni-metrics-helper
88
spec:
9+
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
910
selector:
1011
matchLabels:
1112
k8s-app: cni-metrics-helper
@@ -22,7 +23,13 @@ spec:
2223
{{- end }}
2324
{{- if .Values.resources }}
2425
resources: {{ toYaml .Values.resources | nindent 10 }}
26+
{{- end }}
27+
{{- if .Values.containerSecurityContext }}
28+
securityContext: {{ toYaml .Values.containerSecurityContext | nindent 10 }}
2529
{{- end }}
2630
name: cni-metrics-helper
2731
image: "{{- if .Values.image.override }}{{- .Values.image.override }}{{- else }}{{- .Values.image.account }}.dkr.ecr.{{- .Values.image.region }}.{{- .Values.image.domain }}/cni-metrics-helper:{{- .Values.image.tag }}{{- end}}"
2832
serviceAccountName: {{ template "cni-metrics-helper.serviceAccountName" . }}
33+
{{- if .Values.podSecurityContext }}
34+
securityContext: {{ toYaml .Values.podSecurityContext | nindent 8 }}
35+
{{- end }}

charts/cni-metrics-helper/values.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,9 @@ serviceAccount:
2828
# eks.amazonaws.com/role-arn: arn:aws:iam::AWS_ACCOUNT_ID:role/IAM_ROLE_NAME
2929

3030
resources: {}
31+
32+
revisionHistoryLimit: 10
33+
34+
podSecurityContext: {}
35+
36+
containerSecurityContext: {}

0 commit comments

Comments
 (0)