@@ -21,8 +21,7 @@ import (
2121 "fmt"
2222 "sort"
2323 "strings"
24-
25- "github.com/google/safetext/yamltemplate"
24+ "text/template"
2625
2726 "sigs.k8s.io/kind/pkg/errors"
2827
@@ -192,7 +191,7 @@ kubernetesVersion: {{.KubernetesVersion}}
192191clusterName: "{{.ClusterName}}"
193192{{ if .KubeadmFeatureGates}}featureGates:
194193{{ range $key, $value := .KubeadmFeatureGates }}
195- "{{ (StructuralData $key) }}": {{ $value }}
194+ "{{ $key }}": {{ $value }}
196195{{end}}{{end}}
197196controlPlaneEndpoint: "{{ .ControlPlaneEndpoint }}"
198197# on docker for mac we have to expose the api server via port forward,
@@ -292,7 +291,7 @@ evictionHard:
292291 imagefs.available: "0%"
293292{{if .FeatureGates}}featureGates:
294293{{ range $index, $gate := .SortedFeatureGates }}
295- "{{ (StructuralData $gate.Name) }}": {{ $gate.Value }}
294+ "{{ $gate.Name }}": {{ $gate.Value }}
296295{{end}}{{end}}
297296{{if ne .KubeProxyMode "none"}}
298297---
@@ -303,7 +302,7 @@ metadata:
303302mode: "{{ .KubeProxyMode }}"
304303{{if .FeatureGates}}featureGates:
305304{{ range $index, $gate := .SortedFeatureGates }}
306- "{{ (StructuralData $gate.Name) }}": {{ $gate.Value }}
305+ "{{ $gate.Name }}": {{ $gate.Value }}
307306{{end}}{{end}}
308307iptables:
309308 minSyncPeriod: 1s
@@ -335,7 +334,7 @@ kubernetesVersion: {{.KubernetesVersion}}
335334clusterName: "{{.ClusterName}}"
336335{{ if .KubeadmFeatureGates}}featureGates:
337336{{ range $key, $value := .KubeadmFeatureGates }}
338- "{{ (StructuralData $key) }}": {{ $value }}
337+ "{{ $key }}": {{ $value }}
339338{{end}}{{end}}
340339controlPlaneEndpoint: "{{ .ControlPlaneEndpoint }}"
341340# on docker for mac we have to expose the api server via port forward,
@@ -447,7 +446,7 @@ evictionHard:
447446 imagefs.available: "0%"
448447{{if .FeatureGates}}featureGates:
449448{{ range $index, $gate := .SortedFeatureGates }}
450- "{{ (StructuralData $gate.Name) }}": {{ $gate.Value }}
449+ "{{ $gate.Name }}": {{ $gate.Value }}
451450{{end}}{{end}}
452451{{if ne .KubeProxyMode "none"}}
453452---
@@ -458,7 +457,7 @@ metadata:
458457mode: "{{ .KubeProxyMode }}"
459458{{if .FeatureGates}}featureGates:
460459{{ range $index, $gate := .SortedFeatureGates }}
461- "{{ (StructuralData $gate.Name) }}": {{ $gate.Value }}
460+ "{{ $gate.Name }}": {{ $gate.Value }}
462461{{end}}{{end}}
463462iptables:
464463 minSyncPeriod: 1s
@@ -508,7 +507,7 @@ func Config(data ConfigData) (config string, err error) {
508507 templateSource = ConfigTemplateBetaV2
509508 }
510509
511- t , err := yamltemplate .New ("kubeadm-config" ).Parse (templateSource )
510+ t , err := template .New ("kubeadm-config" ).Parse (templateSource )
512511 if err != nil {
513512 return "" , errors .Wrap (err , "failed to parse config template" )
514513 }
0 commit comments