# Copyright Red Hat

apiVersion: v1
kind: Secret
type: Opaque
metadata:
  name: "{{ .SecretName }}"
  namespace: "{{ .Namespace }}"
stringData:
  kubeconfig: |
    apiVersion: v1
    kind: Config
    clusters:
    - cluster:
        server: {{ .ApiURL }}
        certificate-authority-data: {{ .CABundle }}
      name: {{ .ClusterName }}
    contexts:
    - context:
        cluster: {{ .ClusterName }}
        user: {{ .ClusterName }}
      name: {{ .ClusterName }}
    current-context: {{ .ClusterName }}
    preferences: {}
    users:
    - name: {{ .ClusterName }}
      user:
        token: {{ .Token }}