Move SuggestedPodTemplateResources from factory to set_resources

This commit is contained in:
Guoliang Wang
2018-05-22 15:21:24 +08:00
parent bebc5c1c4f
commit 3bc8b09e78
3 changed files with 3 additions and 23 deletions

View File

@@ -22,7 +22,6 @@ import (
"strings"
"k8s.io/apimachinery/pkg/api/meta"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/client-go/dynamic"
"k8s.io/client-go/kubernetes"
restclient "k8s.io/client-go/rest"
@@ -75,9 +74,6 @@ type ClientAccessFactory interface {
// and which implements the common patterns for CLI interactions with generic resources.
NewBuilder() *resource.Builder
// SuggestedPodTemplateResources returns a list of resource types that declare a pod template
SuggestedPodTemplateResources() []schema.GroupResource
// Returns the default namespace to use in cases where no
// other namespace is specified and whether the namespace was
// overridden.

View File

@@ -116,16 +116,6 @@ func (f *ring0Factory) RESTClient() (*restclient.RESTClient, error) {
return restclient.RESTClientFor(clientConfig)
}
func (f *ring0Factory) SuggestedPodTemplateResources() []schema.GroupResource {
return []schema.GroupResource{
{Resource: "replicationcontroller"},
{Resource: "deployment"},
{Resource: "daemonset"},
{Resource: "job"},
{Resource: "replicaset"},
}
}
func (f *ring0Factory) DefaultNamespace() (string, bool, error) {
return f.clientGetter.ToRawKubeConfigLoader().Namespace()
}