Skip to content

Commit 81d89f3

Browse files
eolivelliSteNicholas
authored andcommitted
[CELEBORN-2256] Helm chart: add support for setting annotations on the service account (to support eks.amazonaws.com/role-arn)
### What changes were proposed in this pull request? Adding support for setting "annotations" on the Celeborn Service Account. Patch originally contributed by Filip Darmanovic Dzeri96 ### Why are the changes needed? This is needed to support AWS IAM roles in k8s EKS ### Does this PR resolve a correctness bug? No ### Does this PR introduce _any_ user-facing change? Yes, you can now configure the annotations. ### How was this patch tested? Manual testing + unit tests Closes apache#3595 from eolivelli/CELEBORN-2256. Authored-by: Enrico Olivelli <eolivelli@gmail.com> Signed-off-by: SteNicholas <programgeek@163.com>
1 parent b659439 commit 81d89f3

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

charts/celeborn/templates/serviceaccount.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,9 @@ metadata:
2323
namespace: {{ .Release.Namespace }}
2424
labels:
2525
{{- include "celeborn.labels" . | nindent 4 }}
26+
annotations:
27+
{{- with .Values.serviceAccount.annotations }}
28+
{{- toYaml . | nindent 4 }}
29+
{{- end }}
2630
{{- end }}
2731

charts/celeborn/tests/serviceaccount_test.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,17 @@ tests:
5555
kind: ServiceAccount
5656
name: test-service-account
5757
namespace: celeborn
58+
59+
- it: Should create service account with the specified annotations
60+
set:
61+
serviceAccount:
62+
create: true
63+
name: test-service-account
64+
annotations:
65+
eks.amazonaws.com/role-arn: arn:aws:iam::000000:role/Foo
66+
asserts:
67+
- equal:
68+
path: metadata.annotations
69+
value:
70+
eks.amazonaws.com/role-arn: arn:aws:iam::000000:role/Foo
71+
template: serviceaccount.yaml

charts/celeborn/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,8 @@ serviceAccount:
405405
create: false
406406
# -- (Optional) Name of the Celeborn service account.
407407
name: ""
408+
# -- (Optional) Additional annotations, example: eks.amazonaws.com/role-arn: arn:aws:iam::0000000000:role/XXXXXXX
409+
annotations: {}
408410

409411
rbac:
410412
create: true

0 commit comments

Comments
 (0)