You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When reconciling a SealedSecret where the corresponding Secret already exists in the cluster, the controller will replace that Secret with a fresh copy, overwriting any existing ObjectMeta.
This drops all existing OwnerReferences on the Secret and causes other controllers in the same cluster to misbehave where they rely on these OwnerReferences to be present.
Our Wave Controler uses OwnerReferences to tie Secrets to Deployments that use them and fails to correctly track Secrets that are also owned by a SealedSecret.
130: Retain existing OwnerReferences r=anguslees a=gargath
This PR ensures that existing `OwnerReferences` on Secrets managed by the controller are retained when a Secret is reconciled.
When an existing Secret is found, the controller will now merge existing OwnerReferences with its own, ensuring that other controllers can use OwnerReferences safely to track these Secrets.
Fixes#127
Co-authored-by: Phil Taprogge <philt@pusher.com>
Co-authored-by: Joel Speed <joel.speed@hotmail.co.uk>
When reconciling a
SealedSecret
where the correspondingSecret
already exists in the cluster, the controller will replace thatSecret
with a fresh copy, overwriting any existingObjectMeta
.This drops all existing
OwnerReferences
on theSecret
and causes other controllers in the same cluster to misbehave where they rely on theseOwnerReferences
to be present.Our Wave Controler uses
OwnerReferences
to tieSecrets
toDeployments
that use them and fails to correctly trackSecrets
that are also owned by aSealedSecret
.The problematic code is at
sealed-secrets/cmd/controller/controller.go
Lines 192 to 194 in 2e3902b
Update()
is called without merging with existingOwnerReferences
first.I'm currently working on a PR to fix this.
The text was updated successfully, but these errors were encountered: