apiVersion: kubeadm.k8s.io/v1beta4
kind: InitConfiguration
localAPIEndpoint:
  advertiseAddress: {{ .Values.listenAddress }}
  bindPort: {{ .Values.api.listenPort }}
{{- with .Values.patches }}
patches:
  directory: {{ . }}
{{- end }}
nodeRegistration:
  criSocket: "unix:///run/containerd/containerd.sock"
  ignorePreflightErrors:
  - DirAvailable--var-lib-etcd
  - DirAvailable--etc-kubernetes-manifests
  - FileAvailable--etc-kubernetes-pki-ca.crt
  - FileAvailable--etc-kubernetes-manifests-etcd.yaml
  - Swap
  - KubeletVersion
  kubeletExtraArgs:
    - name: node-labels
      value: {{ .Values.nodeLabels | quote }}
    {{- with .Values.providerID }}
    - name: provider-id
      value: {{ . }}
    {{- end }}
    {{- if ne .Values.listenAddress "0.0.0.0" }}
    - name: node-ip
      value: {{ .Values.listenAddress }}
    {{- end }}
