Skip to content

Commit

Permalink
Turn on namespace lifecycle plug-in
Browse files Browse the repository at this point in the history
  • Loading branch information
derekwaynecarr committed Mar 24, 2015
1 parent 2ac63eb commit ee53dfc
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cluster/aws/config-default.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ DNS_DOMAIN="kubernetes.local"
DNS_REPLICAS=1

# Admission Controllers to invoke prior to persisting objects in cluster
ADMISSION_CONTROL=NamespaceAutoProvision,LimitRanger,ResourceQuota
ADMISSION_CONTROL=NamespaceLifecycle,NamespaceAutoProvision,LimitRanger,ResourceQuota
2 changes: 1 addition & 1 deletion cluster/azure/config-default.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ ELASTICSEARCH_LOGGING_REPLICAS=1
ENABLE_CLUSTER_MONITORING="${KUBE_ENABLE_CLUSTER_MONITORING:-true}"

# Admission Controllers to invoke prior to persisting objects in cluster
ADMISSION_CONTROL=NamespaceAutoProvision,LimitRanger,ResourceQuota
ADMISSION_CONTROL=NamespaceLifecycle,NamespaceAutoProvision,LimitRanger,ResourceQuota
2 changes: 1 addition & 1 deletion cluster/gce/config-default.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,4 @@ DNS_DOMAIN="kubernetes.local"
DNS_REPLICAS=1

# Admission Controllers to invoke prior to persisting objects in cluster
ADMISSION_CONTROL=NamespaceAutoProvision,LimitRanger,ResourceQuota
ADMISSION_CONTROL=NamespaceLifecycle,NamespaceAutoProvision,LimitRanger,ResourceQuota
2 changes: 1 addition & 1 deletion cluster/vagrant/config-default.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ MASTER_USER=vagrant
MASTER_PASSWD=vagrant

# Admission Controllers to invoke prior to persisting objects in cluster
ADMISSION_CONTROL=NamespaceAutoProvision,LimitRanger,ResourceQuota
ADMISSION_CONTROL=NamespaceLifecycle,NamespaceAutoProvision,LimitRanger,ResourceQuota

# Optional: Install node monitoring.
ENABLE_NODE_MONITORING=true
Expand Down
5 changes: 3 additions & 2 deletions pkg/namespace/namespace_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (

"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
"github.com/GoogleCloudPlatform/kubernetes/pkg/client/cache"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
)

Expand Down Expand Up @@ -61,7 +62,7 @@ func TestFinalize(t *testing.T) {

func TestSyncNamespaceThatIsTerminating(t *testing.T) {
mockClient := &client.Fake{}
nm := NewNamespaceManager(mockClient)
nm := NamespaceManager{kubeClient: mockClient, store: cache.NewStore(cache.MetaNamespaceKeyFunc)}
now := util.Now()
testNamespace := api.Namespace{
ObjectMeta: api.ObjectMeta{
Expand Down Expand Up @@ -101,7 +102,7 @@ func TestSyncNamespaceThatIsTerminating(t *testing.T) {

func TestSyncNamespaceThatIsActive(t *testing.T) {
mockClient := &client.Fake{}
nm := NewNamespaceManager(mockClient)
nm := NamespaceManager{kubeClient: mockClient, store: cache.NewStore(cache.MetaNamespaceKeyFunc)}
testNamespace := api.Namespace{
ObjectMeta: api.ObjectMeta{
Name: "test",
Expand Down

0 comments on commit ee53dfc

Please sign in to comment.