Merge pull request #64113 from juanvallejo/jvallejo/remove-uneeded-factory-methods
Automatic merge from submit-queue (batch tested with PRs 63151, 63795, 63553, 64068, 64113). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. remove LabelsForObject and ResolveImage from factory **Release note**: ```release-note NONE ``` Removes the `ResolveImage` and `LabelsForObject` methods from factory_client_access, which are not needed. cc @soltysh
This commit is contained in:
@@ -96,7 +96,6 @@ type ExposeServiceOptions struct {
|
||||
MapBasedSelectorForObject func(runtime.Object) (string, error)
|
||||
PortsForObject func(runtime.Object) ([]string, error)
|
||||
ProtocolsForObject func(runtime.Object) (map[string]string, error)
|
||||
LabelsForObject func(runtime.Object) (map[string]string, error)
|
||||
|
||||
Namespace string
|
||||
Mapper meta.RESTMapper
|
||||
@@ -200,7 +199,6 @@ func (o *ExposeServiceOptions) Complete(f cmdutil.Factory, cmd *cobra.Command) e
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
o.LabelsForObject = f.LabelsForObject
|
||||
|
||||
o.Namespace, o.EnforceNamespace, err = f.DefaultNamespace()
|
||||
if err != nil {
|
||||
@@ -294,7 +292,7 @@ func (o *ExposeServiceOptions) RunExpose(cmd *cobra.Command, args []string) erro
|
||||
}
|
||||
|
||||
if kubectl.IsZero(params["labels"]) {
|
||||
labels, err := o.LabelsForObject(info.Object)
|
||||
labels, err := meta.NewAccessor().Labels(info.Object)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user