talos/pkg/userdata/generate/controlplane.go
Andrew Rynhard c44f7669e5 feat: allow Kubernetes version to be configured
This allows for users to specifify which version of Kubernetes to use.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-09-27 17:12:27 -07:00

44 lines
1.2 KiB
Go

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package generate
const controlPlaneTempl = `#!talos
version: ""
kubernetesVersion: {{ .KubernetesVersion }}
security:
os:
ca:
crt: "{{ .Certs.OsCert }}"
key: "{{ .Certs.OsKey }}"
kubernetes:
ca:
crt: "{{ .Certs.K8sCert }}"
key: "{{ .Certs.K8sKey }}"
aescbcEncryptionSecret: "{{ .KubeadmTokens.AESCBCEncryptionSecret }}"
services:
init:
cni: flannel
kubeadm:
configuration: |
apiVersion: kubeadm.k8s.io/v1beta2
kind: JoinConfiguration
controlPlane: {}
discovery:
bootstrapToken:
token: '{{ .KubeadmTokens.BootstrapToken }}'
unsafeSkipCAVerification: true
apiServerEndpoint: "{{ .GetAPIServerEndpoint "6443" }}"
certificateKey: {{ .KubeadmTokens.CertificateKey }}
nodeRegistration:
taints: []
kubeletExtraArgs:
node-labels: ""
feature-gates: ""
trustd:
token: '{{ .TrustdInfo.Token }}'
endpoints: [ {{ .Endpoints }} ]
certSANs: [ "{{ .IP }}" ]
`