-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update kubeadm api version from v1beta1 to v1beta2 #6150
Changes from 2 commits
0ce6a03
3bedd60
716abbb
c7ded84
805f117
ebecf33
5fd6bea
453fb9f
f1557f2
e2c254f
eef0e52
c3bb380
076d855
31fd6d9
e8e3a6f
aaff160
b365692
975f720
34bb09c
7f17203
7e22609
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -151,6 +151,56 @@ evictionHard: | |
imagefs.available: "0%" | ||
`)) | ||
|
||
// KubeAdmConfigTmplV1Beta2 is for Kubernetes v1.17+ | ||
var KubeAdmConfigTmplV1Beta2 = template.Must(template.New("configTmpl-v1beta2").Funcs(template.FuncMap{ | ||
"printMapInOrder": printMapInOrder, | ||
}).Parse(`apiVersion: kubeadm.k8s.io/v1beta2 | ||
bootstrapTokens: | ||
- groups: | ||
- system:bootstrappers:kubeadm:default-node-token | ||
ttl: 24h0m0s | ||
usages: | ||
- signing | ||
- authentication | ||
kind: InitConfiguration | ||
localAPIEndpoint: | ||
advertiseAddress: {{.AdvertiseAddress}} | ||
bindPort: {{.APIServerPort}} | ||
nodeRegistration: | ||
criSocket: {{if .CRISocket}}{{.CRISocket}}{{else}}/var/run/dockershim.sock{{end}} | ||
name: {{.NodeName}} | ||
taints: [] | ||
--- | ||
{{ if .ImageRepository}}imageRepository: {{.ImageRepository}} | ||
{{end}}{{range .ExtraArgs}}{{.Component}}: | ||
extraArgs: | ||
{{- range $i, $val := printMapInOrder .Options ": " }} | ||
{{$val}} | ||
{{- end}} | ||
{{end -}} | ||
{{if .FeatureArgs}}featureGates: | ||
{{range $i, $val := .FeatureArgs}}{{$i}}: {{$val}} | ||
{{end -}}{{end -}} | ||
timeoutForControlPlane: 4m0s | ||
apiVersion: kubeadm.k8s.io/v1beta2 | ||
certificatesDir: {{.CertDir}} | ||
clusterName: kubernetes | ||
controlPlaneEndpoint: localhost:{{.APIServerPort}} | ||
controllerManager: {} | ||
dns: | ||
type: CoreDNS | ||
etcd: | ||
local: | ||
dataDir: {{.EtcdDataDir}} | ||
imageRepository: k8s.gcr.io | ||
kind: ClusterConfiguration | ||
kubernetesVersion: {{.KubernetesVersion}} | ||
networking: | ||
dnsDomain: {{if .DNSDomain}}{{.DNSDomain}}{{else}}cluster.local{{end}} | ||
serviceSubnet: {{.ServiceCIDR}} | ||
scheduler: {} | ||
`)) | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @atoato88 I was reviewing a little more detail and found that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @RubenBaez |
||
// printMapInOrder sorts the keys and prints the map in order, combining key | ||
// value pairs with the separator character | ||
// | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment for this PR and the comments in the linked issue say that v1beta2 should be used for v1.17 and higher, so this should parse
1.17.0
instead of1.18.0-alpha.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@priyawadhwa I made the change, thank you.