Allow to change broker service account annotations (#22)

### Motivation

We need to be able to change annotation to inject AWS IAM role (EKS based deployment).
https://docs.aws.amazon.com/eks/latest/userguide/specify-service-account-role.html

With 2.6.0 and this annotation change we were able to use Tiered Storage with S3 and EKS/IAM(OIDC).

e.g : 
```
  annotations:
    eks.amazonaws.com/role-arn: arn:aws:iam::66666:role/my-iam-role-with-s3-access
```
values.yaml
```
broker:
  service_account:
    annotations:
      eks.amazonaws.com/role-arn: arn:aws:iam::66666:role/my-iam-role-with-s3-access
```
### Modifications

Added a value to allow to change annotations fro broker service account.
I've tried following style from other part of the code.

### Verifying this change

- [ ] Make sure that the change passes the CI checks.
This commit is contained in:
Julien Berard 2020-06-23 02:11:28 +01:00 committed by GitHub
parent d5a788e617
commit 6cddb81da1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

@ -26,4 +26,8 @@ metadata:
labels:
{{- include "pulsar.standardLabels" . | nindent 4 }}
component: {{ .Values.broker.component }}
{{- end }}
annotations:
{{- with .Values.broker.service_account.annotations }}
{{ toYaml . | indent 4 }}
{{- end }}
{{- end }}

View File

@ -592,6 +592,10 @@ broker:
pdb:
usePolicy: true
maxUnavailable: 1
### Broker service account
## templates/broker-service-account.yaml
service_account:
annotations: {}
## Pulsar: Functions Worker
## templates/function-worker-configmap.yaml