Skip to content

Commit

Permalink
fix: Add parameters for tuning revisionHistory and securityContext
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Dainty <matt@bodgit-n-scarper.com>
  • Loading branch information
bodgit committed Nov 17, 2023
1 parent c17eea1 commit 3b73575
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions charts/cni-metrics-helper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ The following table lists the configurable parameters for this chart and their d
| serviceAccount.name | The name of the ServiceAccount to use | nil |
| serviceAccount.create | Specifies whether a ServiceAccount should be created | true |
| serviceAccount.annotations | Specifies the annotations for ServiceAccount | {} |
| revisionHistoryLimit | The number of revisions to keep | 10 |
| podSecurityContext | SecurityContext to set on the pod | {} |
| securityContext | SecurityContext to set on the container | {} |

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:

Expand Down
7 changes: 7 additions & 0 deletions charts/cni-metrics-helper/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ metadata:
labels:
k8s-app: cni-metrics-helper
spec:
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
selector:
matchLabels:
k8s-app: cni-metrics-helper
Expand All @@ -22,7 +23,13 @@ spec:
{{- end }}
{{- if .Values.resources }}
resources: {{ toYaml .Values.resources | nindent 10 }}
{{- end }}
{{- if .Values.securityContext }}
securityContext: {{ toYaml .Values.securityContext | nindent 10 }}
{{- end }}
name: cni-metrics-helper
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}}"
serviceAccountName: {{ template "cni-metrics-helper.serviceAccountName" . }}
{{- if .Values.podSecurityContext }}
securityContext: {{ toYaml .Values.podSecurityContext | nindent 8 }}
{{- end }}
6 changes: 6 additions & 0 deletions charts/cni-metrics-helper/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,9 @@ serviceAccount:
# eks.amazonaws.com/role-arn: arn:aws:iam::AWS_ACCOUNT_ID:role/IAM_ROLE_NAME

resources: {}

revisionHistoryLimit: 10

podSecurityContext: {}

securityContext: {}

0 comments on commit 3b73575

Please sign in to comment.