Increase controller sync time for namespace cleanup

This commit is contained in:
derekwaynecarr 2015-03-24 10:44:34 -04:00
parent ee53dfc741
commit 84c9709299
3 changed files with 4 additions and 4 deletions

View File

@ -74,7 +74,7 @@ func NewCMServer() *CMServer {
Address: util.IP(net.ParseIP("127.0.0.1")),
NodeSyncPeriod: 10 * time.Second,
ResourceQuotaSyncPeriod: 10 * time.Second,
NamespaceSyncPeriod: 10 * time.Second,
NamespaceSyncPeriod: 1 * time.Minute,
RegisterRetryCount: 10,
PodEvictionTimeout: 5 * time.Minute,
NodeMilliCPU: 1000,

View File

@ -159,7 +159,7 @@ func (nm *NamespaceManager) syncNamespace(namespace api.Namespace) (err error) {
}
// if there is a deletion timestamp, and the status is not terminating, then update status
if namespace.DeletionTimestamp != nil && namespace.Status.Phase != api.NamespaceTerminating {
if !namespace.DeletionTimestamp.IsZero() && namespace.Status.Phase != api.NamespaceTerminating {
newNamespace := api.Namespace{}
newNamespace.ObjectMeta = namespace.ObjectMeta
newNamespace.Status = namespace.Status

View File

@ -105,7 +105,7 @@ func (r *REST) Delete(ctx api.Context, name string, options *api.DeleteOptions)
}
func (r *StatusREST) New() runtime.Object {
return &api.Namespace{}
return r.store.New()
}
// Update alters the status subset of an object.
@ -114,7 +114,7 @@ func (r *StatusREST) Update(ctx api.Context, obj runtime.Object) (runtime.Object
}
func (r *FinalizeREST) New() runtime.Object {
return &api.Namespace{}
return r.store.New()
}
// Update alters the status finalizers subset of an object.