@@ -47,9 +47,9 @@ import (
47
47
"k8s.io/klog"
48
48
oapi "k8s.io/kube-openapi/pkg/util/proto"
49
49
"k8s.io/kubectl/pkg/scheme"
50
+ "k8s.io/kubectl/pkg/util"
50
51
"k8s.io/kubectl/pkg/util/templates"
51
52
"k8s.io/kubectl/pkg/validation"
52
- "k8s.io/kubernetes/pkg/kubectl"
53
53
"k8s.io/kubernetes/pkg/kubectl/cmd/delete"
54
54
cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
55
55
"k8s.io/kubernetes/pkg/kubectl/cmd/util/openapi"
@@ -446,7 +446,7 @@ func (o *ApplyOptions) Run() error {
446
446
// Get the modified configuration of the object. Embed the result
447
447
// as an annotation in the modified configuration, so that it will appear
448
448
// in the patch sent to the server.
449
- modified , err := kubectl .GetModifiedConfiguration (info .Object , true , unstructured .UnstructuredJSONScheme )
449
+ modified , err := util .GetModifiedConfiguration (info .Object , true , unstructured .UnstructuredJSONScheme )
450
450
if err != nil {
451
451
return cmdutil .AddSourceToErr (fmt .Sprintf ("retrieving modified configuration from:\n %s\n for:" , info .String ()), info .Source , err )
452
452
}
@@ -461,7 +461,7 @@ func (o *ApplyOptions) Run() error {
461
461
462
462
// Create the resource if it doesn't exist
463
463
// First, update the annotation used by kubectl apply
464
- if err := kubectl .CreateApplyAnnotation (info .Object , unstructured .UnstructuredJSONScheme ); err != nil {
464
+ if err := util .CreateApplyAnnotation (info .Object , unstructured .UnstructuredJSONScheme ); err != nil {
465
465
return cmdutil .AddSourceToErr ("creating" , info .Source , err )
466
466
}
467
467
@@ -858,7 +858,7 @@ func (p *Patcher) patchSimple(obj runtime.Object, modified []byte, source, names
858
858
}
859
859
860
860
// Retrieve the original configuration of the object from the annotation.
861
- original , err := kubectl .GetOriginalConfiguration (obj )
861
+ original , err := util .GetOriginalConfiguration (obj )
862
862
if err != nil {
863
863
return nil , nil , cmdutil .AddSourceToErr (fmt .Sprintf ("retrieving original configuration from:\n %v\n for:" , obj ), source , err )
864
864
}
0 commit comments