rancher-charts/charts/rancher-csp-adapter/1.0.0/templates/serviceAccount.yaml

18 lines
612 B
YAML
Raw Normal View History

2022-08-16 16:04:37 +00:00
{{- if eq (include "csp-adapter.csp" . ) "aws" -}}
{{- if eq (include "csp-adapter.awsValuesSet" .) "true" -}}
{{- else -}}
{{- fail "If the aws provider is enabled, account number and role name must be provided" -}}
{{- end -}}
{{- else -}}
{{- fail "One cloud provider must be enabled" -}}
{{- end -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ .Chart.Name }}
namespace: cattle-csp-adapter-system
{{- if eq (include "csp-adapter.csp" . ) "aws" }}
annotations:
eks.amazonaws.com/role-arn: arn:aws:iam::{{ .Values.aws.accountNumber }}:role/{{ .Values.aws.roleName }}
{{- end }}