-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow AWS IAM roles to be connected to service accounts (#46)
### Public-Facing Changes This PR will allow the user to create service accounts on request, and then set custom annotations so that pods can assume IAM roles through their associated service accounts. For the `inbox-listener`, `stream-service` and `garbage-collector` services, we introduce here a new configuration in `values.yaml`: ``` serviceAccounts: enabled: true annotations: eks.amazonaws.com/role-arn: arn:aws:iam::xxxxxxxxxxxx:role/foxglove-inbox-listener-sa-role ``` Works in tandem with foxglove/terraform-examples#9 Documentation changes in: foxglove/website#1041 **Open question**: what do we do with Edge sites? We don't have Terraform example for a Kubernetes cluster that runs a single Edge site, and creating IAM roles that the deployments can assume requires an EKS OIDC identity provider, using the same EKS cluster that runs the pod. Probably easy enough for users to figure this out based on the primary site example, but we could also add a fully working EKS example for edge sites. Co-authored-by: Richard Dancsi <[email protected]>
- Loading branch information
Showing
7 changed files
with
74 additions
and
0 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
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
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
12 changes: 12 additions & 0 deletions
12
charts/primary-site/templates/serviceaccounts/garbage-collector.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,12 @@ | ||
{{- with .Values.garbageCollector.deployment.serviceAccount }} | ||
{{- if .enabled }} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: garbage-collector | ||
annotations: | ||
{{- range $key, $value := .annotations }} | ||
{{ $key }}: {{ $value | quote }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} |
12 changes: 12 additions & 0 deletions
12
charts/primary-site/templates/serviceaccounts/inbox-listener.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,12 @@ | ||
{{- with .Values.inboxListener.deployment.serviceAccount }} | ||
{{- if .enabled }} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: inbox-listener | ||
annotations: | ||
{{- range $key, $value := .annotations }} | ||
{{ $key }}: {{ $value | quote }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} |
12 changes: 12 additions & 0 deletions
12
charts/primary-site/templates/serviceaccounts/stream-service.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,12 @@ | ||
{{- with .Values.streamService.deployment.serviceAccount }} | ||
{{- if .enabled }} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: stream-service | ||
annotations: | ||
{{- range $key, $value := .annotations }} | ||
{{ $key }}: {{ $value | quote }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} |
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