mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
Increase controller sync time for namespace cleanup
This commit is contained in:
parent
ee53dfc741
commit
84c9709299
@ -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,
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user