infrastructure/modules/cluster/kubeconfig.tftpl

27 lines
583 B
Text
Raw Normal View History

2024-07-13 22:17:47 +00:00
apiVersion: v1
kind: Config
clusters:
- name: ${cluster.name}
cluster:
server: ${cluster.endpoint}
certificate-authority-data: ${cluster.ca}
contexts:
- name: oidc@${cluster.name}
context:
cluster: ${cluster.name}
namespace: default
user: oidc
current-context: oidc@${cluster.name}
users:
- name: oidc
user:
exec:
apiVersion: client.authentication.k8s.io/v1beta1
command: kubectl
args:
- oidc-login
- get-token
- --oidc-issuer-url=${oidc.issuer}
- --oidc-client-id=${oidc.id}
- --oidc-extra-scope=profile