-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #526 from boozallen/502-add-irsa-support-for-spark…
…-infrastructure #502 add irsa (IAM roles service account) support for spark-infrastructure
- Loading branch information
Showing
12 changed files
with
309 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
102 changes: 65 additions & 37 deletions
102
...lm/extensions-helm-spark-infrastructure/aissemble-spark-history-chart/README.md
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
...ons-helm-spark-infrastructure/aissemble-spark-history-chart/templates/serviceaccount.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{{ if and .Values.serviceAccount.create }} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: {{ .Values.serviceAccount.name | default .Chart.Name }} | ||
{{ $otherdata := omit .Values.serviceAccount.metadata "name" "annotations" }} | ||
{{- range $key, $value := $otherdata }} | ||
{{ $key }}: {{ $value }} | ||
{{- end }} | ||
{{- with .Values.serviceAccount.metadata.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{ end }} |
54 changes: 54 additions & 0 deletions
54
...ns-helm-spark-infrastructure/aissemble-spark-history-chart/tests/serviceaccount_test.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
suite: Spark History Service Account Test | ||
templates: | ||
- serviceaccount.yaml | ||
tests: | ||
- it: ServiceAccount does not exist by default | ||
asserts: | ||
- hasDocuments: | ||
count: 0 | ||
- it: ServiceAccount should include appropriate default values if created | ||
set: | ||
serviceAccount: | ||
create: true | ||
asserts: | ||
- containsDocument: | ||
kind: ServiceAccount | ||
apiVersion: v1 | ||
- equal: | ||
path: metadata.name | ||
value: aissemble-spark-history-chart-sa | ||
- notExists: | ||
path: metadata.annotations | ||
|
||
- it: Should set values appropriately for the service account | ||
set: | ||
serviceAccount: | ||
create: true | ||
name: test | ||
metadata: | ||
namespace: unit-test | ||
annotations: | ||
eks.amazonaws.com/role-arn: arn:aws:iam::111222333444:role/test-access-role | ||
|
||
asserts: | ||
- equal: | ||
path: metadata.name | ||
value: test | ||
- equal: | ||
path: metadata.namespace | ||
value: unit-test | ||
- equal: | ||
path: metadata.annotations["eks.amazonaws.com/role-arn"] | ||
value: arn:aws:iam::111222333444:role/test-access-role | ||
|
||
- it: Service account name uses Chart name if not set | ||
set: | ||
serviceAccount: | ||
create: true | ||
name: "" | ||
|
||
asserts: | ||
- equal: | ||
path: metadata.name | ||
value: aissemble-spark-history-chart | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.