From 9dbdc61361f8e89e9b0dfa000ddf784799a24954 Mon Sep 17 00:00:00 2001 From: Valentin Knabel Date: Thu, 11 Dec 2025 09:19:04 +0100 Subject: [PATCH] feat: propagate no controller annotation --- controllers/deployment/reconcile.go | 6 ++++++ controllers/set/reconcile.go | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/controllers/deployment/reconcile.go b/controllers/deployment/reconcile.go index 2b5625f..fa6adaa 100644 --- a/controllers/deployment/reconcile.go +++ b/controllers/deployment/reconcile.go @@ -166,6 +166,12 @@ func (c *controller) createFirewallSet(r *controllers.Ctx[*v2.FirewallDeployment }, } + if r.Target.Annotations != nil { + if val, ok := r.Target.Annotations[v2.FirewallNoControllerConnectionAnnotation]; ok { + set.Annotations[v2.FirewallNoControllerConnectionAnnotation] = val + } + } + err = c.c.GetSeedClient().Create(r.Ctx, set, &client.CreateOptions{}) if err != nil { cond := v2.NewCondition(v2.FirewallDeplomentProgressing, v2.ConditionFalse, "FirewallSetCreateError", fmt.Sprintf("Error creating firewall set: %s.", err)) diff --git a/controllers/set/reconcile.go b/controllers/set/reconcile.go index 6591ea3..c48d958 100644 --- a/controllers/set/reconcile.go +++ b/controllers/set/reconcile.go @@ -157,6 +157,15 @@ func (c *controller) createFirewall(r *controllers.Ctx[*v2.FirewallSet]) (*v2.Fi meta.Annotations[v2.FirewallNoControllerConnectionAnnotation] = "true" } + if r.Target.Annotations != nil { + if val, ok := r.Target.Annotations[v2.FirewallNoControllerConnectionAnnotation]; ok { + if meta.Annotations == nil { + meta.Annotations = map[string]string{} + } + meta.Annotations[v2.FirewallNoControllerConnectionAnnotation] = val + } + } + fw := &v2.Firewall{ ObjectMeta: *meta, Spec: r.Target.Spec.Template.Spec,