From 4bdb1a067bcaee14eb530fceae526079c4db688f Mon Sep 17 00:00:00 2001 From: gazarenkov Date: Wed, 6 Dec 2023 20:22:26 +0200 Subject: [PATCH] fix for https://github.com/janus-idp/operator/issues/58 --- controllers/local_db_statefulset.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/controllers/local_db_statefulset.go b/controllers/local_db_statefulset.go index 79d56c8..aff6b1e 100644 --- a/controllers/local_db_statefulset.go +++ b/controllers/local_db_statefulset.go @@ -167,6 +167,8 @@ func (r *BackstageReconciler) applyLocalDbStatefulSet(ctx context.Context, backs return err } + // need to patch the Name before get for correct search + statefulSet.Name = fmt.Sprintf("backstage-psql-%s", backstage.Name) err = r.Get(ctx, types.NamespacedName{Name: statefulSet.Name, Namespace: ns}, statefulSet) if err != nil { if errors.IsNotFound(err) {