diff --git a/charts/cni-metrics-helper/README.md b/charts/cni-metrics-helper/README.md index e2d137300b6..d5894fbd765 100644 --- a/charts/cni-metrics-helper/README.md +++ b/charts/cni-metrics-helper/README.md @@ -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 | {} | +| containerSecurityContext | 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: diff --git a/charts/cni-metrics-helper/templates/deployment.yaml b/charts/cni-metrics-helper/templates/deployment.yaml index fa3e872bdda..70f75d4e202 100644 --- a/charts/cni-metrics-helper/templates/deployment.yaml +++ b/charts/cni-metrics-helper/templates/deployment.yaml @@ -6,6 +6,7 @@ metadata: labels: k8s-app: cni-metrics-helper spec: + revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} selector: matchLabels: k8s-app: cni-metrics-helper @@ -22,7 +23,13 @@ spec: {{- end }} {{- if .Values.resources }} resources: {{ toYaml .Values.resources | nindent 10 }} +{{- end }} +{{- if .Values.containerSecurityContext }} + securityContext: {{ toYaml .Values.containerSecurityContext | 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 }} diff --git a/charts/cni-metrics-helper/values.yaml b/charts/cni-metrics-helper/values.yaml index adf8d6ba407..dde77e5e509 100644 --- a/charts/cni-metrics-helper/values.yaml +++ b/charts/cni-metrics-helper/values.yaml @@ -28,3 +28,9 @@ serviceAccount: # eks.amazonaws.com/role-arn: arn:aws:iam::AWS_ACCOUNT_ID:role/IAM_ROLE_NAME resources: {} + +revisionHistoryLimit: 10 + +podSecurityContext: {} + +containerSecurityContext: {}