Skip to content

Commit 8663917

Browse files
committed
Inherit no controller connection annotation.
1 parent 88a5bfb commit 8663917

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

controllers/deployment/reconcile.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,12 @@ func (c *controller) createFirewallSet(r *controllers.Ctx[*v2.FirewallDeployment
166166
},
167167
}
168168

169+
if r.Target.Annotations != nil {
170+
if val, ok := r.Target.Annotations[v2.FirewallNoControllerConnectionAnnotation]; ok {
171+
set.Annotations[v2.FirewallNoControllerConnectionAnnotation] = val
172+
}
173+
}
174+
169175
err = c.c.GetSeedClient().Create(r.Ctx, set, &client.CreateOptions{})
170176
if err != nil {
171177
cond := v2.NewCondition(v2.FirewallDeplomentProgressing, v2.ConditionFalse, "FirewallSetCreateError", fmt.Sprintf("Error creating firewall set: %s.", err))

controllers/set/reconcile.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,12 @@ func (c *controller) createFirewall(r *controllers.Ctx[*v2.FirewallSet]) (*v2.Fi
157157
meta.Annotations[v2.FirewallNoControllerConnectionAnnotation] = "true"
158158
}
159159

160+
if r.Target.Annotations != nil {
161+
if val, ok := r.Target.Annotations[v2.FirewallNoControllerConnectionAnnotation]; ok {
162+
meta.Annotations[v2.FirewallNoControllerConnectionAnnotation] = val
163+
}
164+
}
165+
160166
fw := &v2.Firewall{
161167
ObjectMeta: *meta,
162168
Spec: r.Target.Spec.Template.Spec,

0 commit comments

Comments
 (0)