2021-12-01 12:33:11 +00:00
|
|
|
{{- if .Values.api.awsIamAuth.enabled }}
|
2021-02-12 11:04:16 +00:00
|
|
|
apiVersion: v1
|
|
|
|
kind: Config
|
|
|
|
clusters:
|
|
|
|
- cluster:
|
2021-05-28 15:16:36 +00:00
|
|
|
server: https://{{ .Values.api.endpoint }}
|
2021-02-12 11:04:16 +00:00
|
|
|
name: {{ .Values.clusterName }}
|
|
|
|
contexts:
|
|
|
|
- context:
|
|
|
|
cluster: {{ .Values.clusterName }}
|
|
|
|
user: kubernetes-admin
|
|
|
|
name: kubernetes-admin@{{ .Values.clusterName }}
|
|
|
|
current-context: kubernetes-admin@{{ .Values.clusterName }}
|
|
|
|
preferences: {}
|
|
|
|
users:
|
|
|
|
- name: kubernetes-admin
|
|
|
|
user:
|
|
|
|
exec:
|
2022-07-31 22:52:00 +00:00
|
|
|
apiVersion: client.authentication.k8s.io/v1beta1
|
2021-02-12 11:04:16 +00:00
|
|
|
command: aws-iam-authenticator
|
|
|
|
args:
|
|
|
|
- "token"
|
|
|
|
- "-i"
|
|
|
|
- "{{ .Values.clusterName }}"
|
|
|
|
- "-r"
|
2021-12-01 12:33:11 +00:00
|
|
|
- "{{ .Values.api.awsIamAuth.kubeAdminRole }}"
|
2021-02-22 13:41:32 +00:00
|
|
|
{{- end }}
|