Skip to content

Commit

Permalink
Also trigger ACL extension reconcile.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit91 committed Sep 9, 2024
1 parent e7f2708 commit 57b7c08
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions controllers/deployment/infrastructure_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,30 @@ func (c *controller) updateInfrastructureStatus(r *controllers.Ctx[*v2.FirewallD

c.log.Info("found gardener infrastructure resource and patched egress cidrs for acl extension", "infrastructure-name", infraObj.GetName(), "egress-cidrs", egressCIDRs)

aclObj := &unstructured.Unstructured{}

aclObj.SetGroupVersionKind(schema.GroupVersionKind{
Group: "extensions.gardener.cloud",
Kind: "Extension",
Version: "v1alpha1",
})

err = c.c.GetSeedClient().Get(r.Ctx, client.ObjectKey{
Namespace: c.c.GetSeedNamespace(),
Name: "acl",
}, infraObj)
if err != nil {
if apierrors.IsNotFound(err) {
return nil
}
return err
}

err = v2.AddAnnotation(r.Ctx, c.c.GetSeedClient(), aclObj, "gardener.cloud/operation", "reconcile")
if err != nil {
return fmt.Errorf("error annotating acl extension with reconcile operation: %w", err)
}

return nil
}

Expand Down

0 comments on commit 57b7c08

Please sign in to comment.