From 8e59ea534d767c2196ec3abc5305597f1db7fcd0 Mon Sep 17 00:00:00 2001 From: odubajDT <93584209+odubajDT@users.noreply.github.com> Date: Tue, 23 Jan 2024 08:02:52 +0100 Subject: [PATCH] Update common/flagdproxy/flagdproxy.go Co-authored-by: Giovanni Liva Signed-off-by: odubajDT <93584209+odubajDT@users.noreply.github.com> --- common/flagdproxy/flagdproxy.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/flagdproxy/flagdproxy.go b/common/flagdproxy/flagdproxy.go index 903ffcd33..05943eef1 100644 --- a/common/flagdproxy/flagdproxy.go +++ b/common/flagdproxy/flagdproxy.go @@ -211,7 +211,11 @@ func (f *FlagdProxyHandler) doesFlagdProxyExist(ctx context.Context) (bool, *app } func (f *FlagdProxyHandler) shouldUpdateFlagdProxy(old, new *appsV1.Deployment) bool { - return isDeployedByOFO(old) && !reflect.DeepEqual(old.Spec, new.Spec) + if !isDeployedByOFO(old) { + f.Log.Info("flagd-proxy Deployment not managed by OFO") + return false + } + return !reflect.DeepEqual(old.Spec, new.Spec) } func (f *FlagdProxyHandler) getOperatorDeployment(ctx context.Context) (*appsV1.Deployment, error) {