AddOwnerReference should always set the owner ref array to be able to modify the existing reference
Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
This commit is contained in:
parent
be37c50cc2
commit
48c7c448d3
|
|
@ -109,6 +109,7 @@ func AddOwnerReference(o metav1.Object, r metav1.OwnerReference) {
|
|||
for i := range refs {
|
||||
if refs[i].UID == r.UID {
|
||||
refs[i] = r
|
||||
o.SetOwnerReferences(refs)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue