mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 05:03:09 +00:00
update
This commit is contained in:
parent
947a558320
commit
0c730f4ea7
@ -1,7 +1,6 @@
|
|||||||
{% set cluster_name = "" -%}
|
{% set cluster_name = "" -%}
|
||||||
{% set cluster_cidr = "" -%}
|
{% set cluster_cidr = "" -%}
|
||||||
{% set allocate_node_cidrs = "" -%}
|
{% set allocate_node_cidrs = "" -%}
|
||||||
{% set enable_experimental = "" -%}
|
|
||||||
|
|
||||||
{% if pillar['instance_prefix'] is defined -%}
|
{% if pillar['instance_prefix'] is defined -%}
|
||||||
{% set cluster_name = "--cluster-name=" + pillar['instance_prefix'] -%}
|
{% set cluster_name = "--cluster-name=" + pillar['instance_prefix'] -%}
|
||||||
@ -12,9 +11,6 @@
|
|||||||
{% if pillar['allocate_node_cidrs'] is defined -%}
|
{% if pillar['allocate_node_cidrs'] is defined -%}
|
||||||
{% set allocate_node_cidrs = "--allocate-node-cidrs=" + pillar['allocate_node_cidrs'] -%}
|
{% set allocate_node_cidrs = "--allocate-node-cidrs=" + pillar['allocate_node_cidrs'] -%}
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
{% if pillar['enable_experimental_api'] is defined -%}
|
|
||||||
{% set enable_experimental = "--enable-experimental=" + pillar['enable_experimental_api'] -%}
|
|
||||||
{% endif -%}
|
|
||||||
|
|
||||||
{% set cloud_provider = "" -%}
|
{% set cloud_provider = "" -%}
|
||||||
{% set cloud_config = "" -%}
|
{% set cloud_config = "" -%}
|
||||||
@ -38,7 +34,7 @@
|
|||||||
{% set root_ca_file = "--root-ca-file=/srv/kubernetes/ca.crt" -%}
|
{% set root_ca_file = "--root-ca-file=/srv/kubernetes/ca.crt" -%}
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
|
|
||||||
{% set params = "--master=127.0.0.1:8080" + " " + cluster_name + " " + cluster_cidr + " " + allocate_node_cidrs + " " + enable_experimental + " " + cloud_provider + " " + cloud_config + service_account_key + pillar['log_level'] + " " + root_ca_file -%}
|
{% set params = "--master=127.0.0.1:8080" + " " + cluster_name + " " + cluster_cidr + " " + allocate_node_cidrs + " " + cloud_provider + " " + cloud_config + service_account_key + pillar['log_level'] + " " + root_ca_file -%}
|
||||||
|
|
||||||
# test_args has to be kept at the end, so they'll overwrite any prior configuration
|
# test_args has to be kept at the end, so they'll overwrite any prior configuration
|
||||||
{% if pillar['controller_manager_test_args'] is defined -%}
|
{% if pillar['controller_manager_test_args'] is defined -%}
|
||||||
|
@ -32,7 +32,7 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"k8s.io/kubernetes/pkg/api"
|
"k8s.io/kubernetes/pkg/api/unversioned"
|
||||||
client "k8s.io/kubernetes/pkg/client/unversioned"
|
client "k8s.io/kubernetes/pkg/client/unversioned"
|
||||||
"k8s.io/kubernetes/pkg/client/unversioned/clientcmd"
|
"k8s.io/kubernetes/pkg/client/unversioned/clientcmd"
|
||||||
clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api"
|
clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api"
|
||||||
@ -290,9 +290,9 @@ func (s *CMServer) Run(_ []string) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
glog.Fatalf("Failed to get api versions from server: %v", err)
|
glog.Fatalf("Failed to get api versions from server: %v", err)
|
||||||
}
|
}
|
||||||
versions := &api.APIVersions{Versions: versionStrings}
|
versions := &unversioned.APIVersions{Versions: versionStrings}
|
||||||
|
|
||||||
resourceMap, err := kubeClient.SupportedResources()
|
resourceMap, err := client.SupportedResources(kubeClient, kubeconfig)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.Fatalf("Failed to get supported resources from server: %v", err)
|
glog.Fatalf("Failed to get supported resources from server: %v", err)
|
||||||
}
|
}
|
||||||
@ -375,7 +375,7 @@ func (s *CMServer) Run(_ []string) error {
|
|||||||
select {}
|
select {}
|
||||||
}
|
}
|
||||||
|
|
||||||
func containsVersion(versions *api.APIVersions, version string) bool {
|
func containsVersion(versions *unversioned.APIVersions, version string) bool {
|
||||||
for ix := range versions.Versions {
|
for ix := range versions.Versions {
|
||||||
if versions.Versions[ix] == version {
|
if versions.Versions[ix] == version {
|
||||||
return true
|
return true
|
||||||
@ -384,7 +384,7 @@ func containsVersion(versions *api.APIVersions, version string) bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
func containsResource(resources *api.APIResourceList, resourceName string) bool {
|
func containsResource(resources *unversioned.APIResourceList, resourceName string) bool {
|
||||||
for ix := range resources.APIResources {
|
for ix := range resources.APIResources {
|
||||||
resource := resources.APIResources[ix]
|
resource := resources.APIResources[ix]
|
||||||
if resource.Name == resourceName {
|
if resource.Name == resourceName {
|
||||||
|
@ -26,6 +26,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"k8s.io/kubernetes/cmd/kube-controller-manager/app"
|
"k8s.io/kubernetes/cmd/kube-controller-manager/app"
|
||||||
|
"k8s.io/kubernetes/pkg/api/unversioned"
|
||||||
client "k8s.io/kubernetes/pkg/client/unversioned"
|
client "k8s.io/kubernetes/pkg/client/unversioned"
|
||||||
"k8s.io/kubernetes/pkg/client/unversioned/clientcmd"
|
"k8s.io/kubernetes/pkg/client/unversioned/clientcmd"
|
||||||
clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api"
|
clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api"
|
||||||
@ -156,7 +157,7 @@ func (s *CMServer) Run(_ []string) error {
|
|||||||
resourceQuotaController := resourcequotacontroller.NewResourceQuotaController(kubeClient)
|
resourceQuotaController := resourcequotacontroller.NewResourceQuotaController(kubeClient)
|
||||||
resourceQuotaController.Run(s.ResourceQuotaSyncPeriod)
|
resourceQuotaController.Run(s.ResourceQuotaSyncPeriod)
|
||||||
|
|
||||||
namespaceController := namespacecontroller.NewNamespaceController(kubeClient, false, s.NamespaceSyncPeriod)
|
namespaceController := namespacecontroller.NewNamespaceController(kubeClient, &unversioned.APIVersions{}, s.NamespaceSyncPeriod)
|
||||||
namespaceController.Run()
|
namespaceController.Run()
|
||||||
|
|
||||||
pvclaimBinder := persistentvolumecontroller.NewPersistentVolumeClaimBinder(kubeClient, s.PVClaimBinderSyncPeriod)
|
pvclaimBinder := persistentvolumecontroller.NewPersistentVolumeClaimBinder(kubeClient, s.PVClaimBinderSyncPeriod)
|
||||||
|
@ -122,8 +122,7 @@ type VersionInterface interface {
|
|||||||
|
|
||||||
// ResourcesInterface has methods for obtaining supported resources on the API server
|
// ResourcesInterface has methods for obtaining supported resources on the API server
|
||||||
type ResourcesInterface interface {
|
type ResourcesInterface interface {
|
||||||
SupportedResourcesForGroupVersion(groupVersion string) (*api.APIResourceList, error)
|
SupportedResourcesForGroupVersion(groupVersion string) (*unversioned.APIResourceList, error)
|
||||||
SupportedResources() (map[string]*api.APIResourceList, error)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// APIStatus is exposed by errors that can be converted to an api.Status object
|
// APIStatus is exposed by errors that can be converted to an api.Status object
|
||||||
@ -153,7 +152,7 @@ func (c *Client) ServerVersion() (*version.Info, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// SupportedResourcesForGroupVersion retrieves the list of resources supported by the API server for a group version.
|
// SupportedResourcesForGroupVersion retrieves the list of resources supported by the API server for a group version.
|
||||||
func (c *Client) SupportedResourcesForGroupVersion(groupVersion string) (*api.APIResourceList, error) {
|
func (c *Client) SupportedResourcesForGroupVersion(groupVersion string) (*unversioned.APIResourceList, error) {
|
||||||
var prefix string
|
var prefix string
|
||||||
if groupVersion == "v1" {
|
if groupVersion == "v1" {
|
||||||
prefix = "/api"
|
prefix = "/api"
|
||||||
@ -164,7 +163,7 @@ func (c *Client) SupportedResourcesForGroupVersion(groupVersion string) (*api.AP
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
resources := api.APIResourceList{}
|
resources := unversioned.APIResourceList{}
|
||||||
if err := json.Unmarshal(body, &resources); err != nil {
|
if err := json.Unmarshal(body, &resources); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -172,13 +171,13 @@ func (c *Client) SupportedResourcesForGroupVersion(groupVersion string) (*api.AP
|
|||||||
}
|
}
|
||||||
|
|
||||||
// SupportedResources gets all supported resources for all group versions. The key in the map is an API groupVersion.
|
// SupportedResources gets all supported resources for all group versions. The key in the map is an API groupVersion.
|
||||||
func (c *Client) SupportedResources() (map[string]*api.APIResourceList, error) {
|
func SupportedResources(c Interface, cfg *Config) (map[string]*unversioned.APIResourceList, error) {
|
||||||
apis, err := c.ServerAPIVersions()
|
apis, err := ServerAPIVersions(cfg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
result := map[string]*api.APIResourceList{}
|
result := map[string]*unversioned.APIResourceList{}
|
||||||
for _, groupVersion := range apis.Versions {
|
for _, groupVersion := range apis {
|
||||||
resources, err := c.SupportedResourcesForGroupVersion(groupVersion)
|
resources, err := c.SupportedResourcesForGroupVersion(groupVersion)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
@ -272,24 +272,24 @@ func TestGetServerVersion(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestGetServerResources(t *testing.T) {
|
func TestGetServerResources(t *testing.T) {
|
||||||
stable := api.APIResourceList{
|
stable := unversioned.APIResourceList{
|
||||||
GroupVersion: "v1",
|
GroupVersion: "v1",
|
||||||
APIResources: []api.APIResource{
|
APIResources: []unversioned.APIResource{
|
||||||
{"pods", true},
|
{"pods", true},
|
||||||
{"services", true},
|
{"services", true},
|
||||||
{"namespaces", false},
|
{"namespaces", false},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
beta := api.APIResourceList{
|
beta := unversioned.APIResourceList{
|
||||||
GroupVersion: "extensions/v1",
|
GroupVersion: "extensions/v1",
|
||||||
APIResources: []api.APIResource{
|
APIResources: []unversioned.APIResource{
|
||||||
{"deployments", true},
|
{"deployments", true},
|
||||||
{"ingress", true},
|
{"ingress", true},
|
||||||
{"jobs", true},
|
{"jobs", true},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
resourcesList *api.APIResourceList
|
resourcesList *unversioned.APIResourceList
|
||||||
path string
|
path string
|
||||||
request string
|
request string
|
||||||
expectErr bool
|
expectErr bool
|
||||||
@ -321,10 +321,19 @@ func TestGetServerResources(t *testing.T) {
|
|||||||
case "/apis/extensions/v1beta1":
|
case "/apis/extensions/v1beta1":
|
||||||
list = &beta
|
list = &beta
|
||||||
case "/api":
|
case "/api":
|
||||||
list = &api.APIVersions{
|
list = &unversioned.APIVersions{
|
||||||
Versions: []string{
|
Versions: []string{
|
||||||
"v1",
|
"v1",
|
||||||
"extensions/v1beta1",
|
},
|
||||||
|
}
|
||||||
|
case "/apis":
|
||||||
|
list = &unversioned.APIGroupList{
|
||||||
|
Groups: []unversioned.APIGroup{
|
||||||
|
{
|
||||||
|
Versions: []unversioned.GroupVersion{
|
||||||
|
{GroupVersion: "extensions/v1beta1"},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
@ -359,7 +368,7 @@ func TestGetServerResources(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
resourceMap, err := client.SupportedResources()
|
resourceMap, err := SupportedResources(client, &Config{Host: server.URL})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Errorf("unexpected error: %v", err)
|
t.Errorf("unexpected error: %v", err)
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ type Fake struct {
|
|||||||
// ProxyReactionChain is the list of proxy reactors that will be attempted for every request in the order they are tried
|
// ProxyReactionChain is the list of proxy reactors that will be attempted for every request in the order they are tried
|
||||||
ProxyReactionChain []ProxyReactor
|
ProxyReactionChain []ProxyReactor
|
||||||
|
|
||||||
Resources []api.APIResourceList
|
Resources []unversioned.APIResourceList
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reactor is an interface to allow the composition of reaction functions.
|
// Reactor is an interface to allow the composition of reaction functions.
|
||||||
@ -274,22 +274,7 @@ func (c *Fake) Extensions() client.ExtensionsInterface {
|
|||||||
return &FakeExperimental{c}
|
return &FakeExperimental{c}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Fake) SupportedResources() (map[string]*api.APIResourceList, error) {
|
func (c *Fake) SupportedResourcesForGroupVersion(version string) (*unversioned.APIResourceList, error) {
|
||||||
action := ActionImpl{
|
|
||||||
Verb: "get",
|
|
||||||
Resource: "resources",
|
|
||||||
}
|
|
||||||
c.Invokes(action, nil)
|
|
||||||
result := map[string]*api.APIResourceList{}
|
|
||||||
for _, resource := range c.Resources {
|
|
||||||
result[resource.GroupVersion] = &api.APIResourceList{
|
|
||||||
APIResources: resource.APIResources,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *Fake) SupportedResourcesForGroupVersion(version string) (*api.APIResourceList, error) {
|
|
||||||
action := ActionImpl{
|
action := ActionImpl{
|
||||||
Verb: "get",
|
Verb: "get",
|
||||||
Resource: "resource",
|
Resource: "resource",
|
||||||
|
@ -43,7 +43,7 @@ type NamespaceController struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// NewNamespaceController creates a new NamespaceController
|
// NewNamespaceController creates a new NamespaceController
|
||||||
func NewNamespaceController(kubeClient client.Interface, versions *api.APIVersions, resyncPeriod time.Duration) *NamespaceController {
|
func NewNamespaceController(kubeClient client.Interface, versions *unversioned.APIVersions, resyncPeriod time.Duration) *NamespaceController {
|
||||||
var controller *framework.Controller
|
var controller *framework.Controller
|
||||||
_, controller = framework.NewInformer(
|
_, controller = framework.NewInformer(
|
||||||
&cache.ListWatch{
|
&cache.ListWatch{
|
||||||
@ -155,7 +155,7 @@ func (e *contentRemainingError) Error() string {
|
|||||||
// deleteAllContent will delete all content known to the system in a namespace. It returns an estimate
|
// deleteAllContent will delete all content known to the system in a namespace. It returns an estimate
|
||||||
// of the time remaining before the remaining resources are deleted. If estimate > 0 not all resources
|
// of the time remaining before the remaining resources are deleted. If estimate > 0 not all resources
|
||||||
// are guaranteed to be gone.
|
// are guaranteed to be gone.
|
||||||
func deleteAllContent(kubeClient client.Interface, versions *api.APIVersions, namespace string, before unversioned.Time) (estimate int64, err error) {
|
func deleteAllContent(kubeClient client.Interface, versions *unversioned.APIVersions, namespace string, before unversioned.Time) (estimate int64, err error) {
|
||||||
err = deleteServiceAccounts(kubeClient, namespace)
|
err = deleteServiceAccounts(kubeClient, namespace)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return estimate, err
|
return estimate, err
|
||||||
@ -195,7 +195,6 @@ func deleteAllContent(kubeClient client.Interface, versions *api.APIVersions, na
|
|||||||
// If experimental mode, delete all experimental resources for the namespace.
|
// If experimental mode, delete all experimental resources for the namespace.
|
||||||
if containsVersion(versions, "extensions/v1beta1") {
|
if containsVersion(versions, "extensions/v1beta1") {
|
||||||
resources, err := kubeClient.SupportedResourcesForGroupVersion("extensions/v1beta1")
|
resources, err := kubeClient.SupportedResourcesForGroupVersion("extensions/v1beta1")
|
||||||
glog.Errorf("%v", resources)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return estimate, err
|
return estimate, err
|
||||||
}
|
}
|
||||||
@ -269,7 +268,7 @@ func updateNamespaceStatusFunc(kubeClient client.Interface, namespace *api.Names
|
|||||||
}
|
}
|
||||||
|
|
||||||
// syncNamespace orchestrates deletion of a Namespace and its associated content.
|
// syncNamespace orchestrates deletion of a Namespace and its associated content.
|
||||||
func syncNamespace(kubeClient client.Interface, versions *api.APIVersions, namespace *api.Namespace) (err error) {
|
func syncNamespace(kubeClient client.Interface, versions *unversioned.APIVersions, namespace *api.Namespace) (err error) {
|
||||||
if namespace.DeletionTimestamp == nil {
|
if namespace.DeletionTimestamp == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -532,7 +531,7 @@ func deleteIngress(expClient client.ExtensionsInterface, ns string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO: this is duplicated logic. Move it somewhere central?
|
// TODO: this is duplicated logic. Move it somewhere central?
|
||||||
func containsVersion(versions *api.APIVersions, version string) bool {
|
func containsVersion(versions *unversioned.APIVersions, version string) bool {
|
||||||
for ix := range versions.Versions {
|
for ix := range versions.Versions {
|
||||||
if versions.Versions[ix] == version {
|
if versions.Versions[ix] == version {
|
||||||
return true
|
return true
|
||||||
@ -542,7 +541,7 @@ func containsVersion(versions *api.APIVersions, version string) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO: this is duplicated logic. Move it somewhere central?
|
// TODO: this is duplicated logic. Move it somewhere central?
|
||||||
func containsResource(resources *api.APIResourceList, resourceName string) bool {
|
func containsResource(resources *unversioned.APIResourceList, resourceName string) bool {
|
||||||
if resources == nil {
|
if resources == nil {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@ func TestFinalizeNamespaceFunc(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func testSyncNamespaceThatIsTerminating(t *testing.T, versions *api.APIVersions) {
|
func testSyncNamespaceThatIsTerminating(t *testing.T, versions *unversioned.APIVersions) {
|
||||||
mockClient := &testclient.Fake{}
|
mockClient := &testclient.Fake{}
|
||||||
now := unversioned.Now()
|
now := unversioned.Now()
|
||||||
testNamespace := &api.Namespace{
|
testNamespace := &api.Namespace{
|
||||||
@ -91,11 +91,11 @@ func testSyncNamespaceThatIsTerminating(t *testing.T, versions *api.APIVersions)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if containsVersion(versions, "extensions/v1beta1") {
|
if containsVersion(versions, "extensions/v1beta1") {
|
||||||
resources := []api.APIResource{}
|
resources := []unversioned.APIResource{}
|
||||||
for _, resource := range []string{"daemonsets", "deployments", "jobs", "horizontalpodautoscalers", "ingress"} {
|
for _, resource := range []string{"daemonsets", "deployments", "jobs", "horizontalpodautoscalers", "ingress"} {
|
||||||
resources = append(resources, api.APIResource{Name: resource})
|
resources = append(resources, unversioned.APIResource{Name: resource})
|
||||||
}
|
}
|
||||||
mockClient.Resources = []api.APIResourceList{
|
mockClient.Resources = []unversioned.APIResourceList{
|
||||||
{
|
{
|
||||||
GroupVersion: "extensions/v1beta1",
|
GroupVersion: "extensions/v1beta1",
|
||||||
APIResources: resources,
|
APIResources: resources,
|
||||||
@ -166,11 +166,11 @@ func TestRetryOnConflictError(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestSyncNamespaceThatIsTerminatingNonExperimental(t *testing.T) {
|
func TestSyncNamespaceThatIsTerminatingNonExperimental(t *testing.T) {
|
||||||
testSyncNamespaceThatIsTerminating(t, &api.APIVersions{})
|
testSyncNamespaceThatIsTerminating(t, &unversioned.APIVersions{})
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestSyncNamespaceThatIsTerminatingV1Beta1(t *testing.T) {
|
func TestSyncNamespaceThatIsTerminatingV1Beta1(t *testing.T) {
|
||||||
testSyncNamespaceThatIsTerminating(t, &api.APIVersions{Versions: []string{"extensions/v1beta1"}})
|
testSyncNamespaceThatIsTerminating(t, &unversioned.APIVersions{Versions: []string{"extensions/v1beta1"}})
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestSyncNamespaceThatIsActive(t *testing.T) {
|
func TestSyncNamespaceThatIsActive(t *testing.T) {
|
||||||
@ -187,7 +187,7 @@ func TestSyncNamespaceThatIsActive(t *testing.T) {
|
|||||||
Phase: api.NamespaceActive,
|
Phase: api.NamespaceActive,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
err := syncNamespace(mockClient, &api.APIVersions{}, testNamespace)
|
err := syncNamespace(mockClient, &unversioned.APIVersions{}, testNamespace)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Errorf("Unexpected error when synching namespace %v", err)
|
t.Errorf("Unexpected error when synching namespace %v", err)
|
||||||
}
|
}
|
||||||
@ -199,7 +199,7 @@ func TestSyncNamespaceThatIsActive(t *testing.T) {
|
|||||||
func TestRunStop(t *testing.T) {
|
func TestRunStop(t *testing.T) {
|
||||||
mockClient := &testclient.Fake{}
|
mockClient := &testclient.Fake{}
|
||||||
|
|
||||||
nsController := NewNamespaceController(mockClient, &api.APIVersions{}, 1*time.Second)
|
nsController := NewNamespaceController(mockClient, &unversioned.APIVersions{}, 1*time.Second)
|
||||||
|
|
||||||
if nsController.StopEverything != nil {
|
if nsController.StopEverything != nil {
|
||||||
t.Errorf("Non-running manager should not have a stop channel. Got %v", nsController.StopEverything)
|
t.Errorf("Non-running manager should not have a stop channel. Got %v", nsController.StopEverything)
|
||||||
|
Loading…
Reference in New Issue
Block a user