apiVersion: v1
kind: Secret
metadata:
  name: kubelet-bootstrap
  namespace: "{{ .Release.Namespace }}"
stringData:
  kubeconfig-bootstrap: |
    apiVersion: v1
    kind: Config
    current-context: "{{ .Release.Namespace }}"
    clusters:
    - name: "{{ .Release.Namespace }}"
      cluster:
        server: "https://kube-apiserver.{{ .Release.Namespace }}"
        certificate-authority-data: "{{ .Values.auth.caCert | b64enc }}"
    contexts:
    - name: "{{ .Release.Namespace }}"
      context:
        cluster: "{{ .Release.Namespace }}"
        user: kubelet-bootstrap
    users:
    - name: kubelet-bootstrap
      user:
        token: "{{ .Values.auth.bootstrapToken }}"
