Commit 90d6080f authored by Victor Marmol's avatar Victor Marmol

Merge pull request #8392 from liggitt/ttlfunc

Pass correct update flag to TTLFunc
parents dc587b7a a2d6dd04
...@@ -238,7 +238,7 @@ func (e *Etcd) UpdateWithName(ctx api.Context, name string, obj runtime.Object) ...@@ -238,7 +238,7 @@ func (e *Etcd) UpdateWithName(ctx api.Context, name string, obj runtime.Object)
} }
ttl := uint64(0) ttl := uint64(0)
if e.TTLFunc != nil { if e.TTLFunc != nil {
ttl, err = e.TTLFunc(obj, false) ttl, err = e.TTLFunc(obj, true)
if err != nil { if err != nil {
return err return err
} }
...@@ -281,7 +281,7 @@ func (e *Etcd) Update(ctx api.Context, obj runtime.Object) (runtime.Object, bool ...@@ -281,7 +281,7 @@ func (e *Etcd) Update(ctx api.Context, obj runtime.Object) (runtime.Object, bool
} }
ttl := uint64(0) ttl := uint64(0)
if e.TTLFunc != nil { if e.TTLFunc != nil {
ttl, err = e.TTLFunc(obj, true) ttl, err = e.TTLFunc(obj, false)
if err != nil { if err != nil {
return nil, 0, err return nil, 0, err
} }
...@@ -303,7 +303,7 @@ func (e *Etcd) Update(ctx api.Context, obj runtime.Object) (runtime.Object, bool ...@@ -303,7 +303,7 @@ func (e *Etcd) Update(ctx api.Context, obj runtime.Object) (runtime.Object, bool
} }
ttl := uint64(0) ttl := uint64(0)
if e.TTLFunc != nil { if e.TTLFunc != nil {
ttl, err = e.TTLFunc(obj, false) ttl, err = e.TTLFunc(obj, true)
if err != nil { if err != nil {
return nil, 0, err return nil, 0, err
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment