@@ -33,7 +33,7 @@ import (
33
33
"k8s.io/apimachinery/pkg/util/intstr"
34
34
kubeadmapi "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm"
35
35
kubeadmconstants "k8s.io/kubernetes/cmd/kubeadm/app/constants"
36
- "k8s.io/kubernetes/cmd/kubeadm/app/util"
36
+ kubeadmutil "k8s.io/kubernetes/cmd/kubeadm/app/util"
37
37
"k8s.io/kubernetes/cmd/kubeadm/app/util/kustomize"
38
38
)
39
39
@@ -148,7 +148,7 @@ func GetExtraParameters(overrides map[string]string, defaults map[string]string)
148
148
// KustomizeStaticPod applies patches defined in kustomizeDir to a static Pod manifest
149
149
func KustomizeStaticPod (pod * v1.Pod , kustomizeDir string ) (* v1.Pod , error ) {
150
150
// marshal the pod manifest into yaml
151
- serialized , err := util .MarshalToYaml (pod , v1 .SchemeGroupVersion )
151
+ serialized , err := kubeadmutil .MarshalToYaml (pod , v1 .SchemeGroupVersion )
152
152
if err != nil {
153
153
return pod , errors .Wrapf (err , "failed to marshal manifest to YAML" )
154
154
}
@@ -164,7 +164,7 @@ func KustomizeStaticPod(pod *v1.Pod, kustomizeDir string) (*v1.Pod, error) {
164
164
}
165
165
166
166
// unmarshal kustomized yaml back into a pod manifest
167
- obj , err := util .UnmarshalFromYaml (kustomized , v1 .SchemeGroupVersion )
167
+ obj , err := kubeadmutil .UnmarshalFromYaml (kustomized , v1 .SchemeGroupVersion )
168
168
if err != nil {
169
169
return pod , errors .Wrap (err , "failed to unmarshal kustomize manifest from YAML" )
170
170
}
@@ -186,7 +186,7 @@ func WriteStaticPodToDisk(componentName, manifestDir string, pod v1.Pod) error {
186
186
}
187
187
188
188
// writes the pod to disk
189
- serialized , err := util .MarshalToYaml (& pod , v1 .SchemeGroupVersion )
189
+ serialized , err := kubeadmutil .MarshalToYaml (& pod , v1 .SchemeGroupVersion )
190
190
if err != nil {
191
191
return errors .Wrapf (err , "failed to marshal manifest for %q to YAML" , componentName )
192
192
}
@@ -207,7 +207,7 @@ func ReadStaticPodFromDisk(manifestPath string) (*v1.Pod, error) {
207
207
return & v1.Pod {}, errors .Wrapf (err , "failed to read manifest for %q" , manifestPath )
208
208
}
209
209
210
- obj , err := util .UnmarshalFromYaml (buf , v1 .SchemeGroupVersion )
210
+ obj , err := kubeadmutil .UnmarshalFromYaml (buf , v1 .SchemeGroupVersion )
211
211
if err != nil {
212
212
return & v1.Pod {}, errors .Errorf ("failed to unmarshal manifest for %q from YAML: %v" , manifestPath , err )
213
213
}
@@ -298,7 +298,7 @@ func GetEtcdProbeEndpoint(cfg *kubeadmapi.Etcd, isIPv6 bool) (string, int, v1.UR
298
298
port := kubeadmconstants .EtcdMetricsPort
299
299
portStr := parsedURL .Port ()
300
300
if len (portStr ) != 0 {
301
- p , err := util .ParsePort (portStr )
301
+ p , err := kubeadmutil .ParsePort (portStr )
302
302
if err == nil {
303
303
port = p
304
304
}
0 commit comments