diff --git a/stable/awsebscsiprovisioner/ci/annotations-kube2iam-usage.yaml b/stable/awsebscsiprovisioner/ci/annotations-kube2iam-usage.yaml new file mode 100644 index 0000000000..1dbcadd755 --- /dev/null +++ b/stable/awsebscsiprovisioner/ci/annotations-kube2iam-usage.yaml @@ -0,0 +1,4 @@ +# Check that statefulSet.podAnnoations is rendered +statefulSet: + podAnnotations: + iam.amazonaws.com/role: ebs-csi-driver-role diff --git a/stable/awsebscsiprovisioner/templates/statefulset.yaml b/stable/awsebscsiprovisioner/templates/statefulset.yaml index ec36b0cccc..aaf2300967 100644 --- a/stable/awsebscsiprovisioner/templates/statefulset.yaml +++ b/stable/awsebscsiprovisioner/templates/statefulset.yaml @@ -12,6 +12,12 @@ spec: app: ebs-csi-controller template: metadata: + {{- if .Values.statefulSet.podAnnotations }} + annotations: + {{- range $key, $value := .Values.statefulSet.podAnnotations }} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- end }} labels: app: ebs-csi-controller app.kubernetes.io/name: {{ include "aws-ebs-csi-driver.name" . }} diff --git a/stable/awsebscsiprovisioner/values.yaml b/stable/awsebscsiprovisioner/values.yaml index c898613231..ef2412ee3b 100644 --- a/stable/awsebscsiprovisioner/values.yaml +++ b/stable/awsebscsiprovisioner/values.yaml @@ -19,6 +19,9 @@ tolerations: operator: Exists env: {} +statefulSet: + # if you want to use kube2iam or kiam roles define it here as podAnnotation for the controller (statefulSet) + podAnnotations: {} registrar: node: