Compare commits

...

8 Commits

Author SHA1 Message Date
32a595d160 Merge pull request 'Handle services in same namespace if namespace is not specified' (#34) from feature/properly-handle-namespaced-services into main
All checks were successful
Publish / build (push) Successful in 2m0s
Reviewed-on: #34
2025-06-28 23:14:01 +00:00
834f52c015 Handle services in same namespace if namespace is not specified
All checks were successful
Build project / build (push) Successful in 1m42s
2025-06-29 01:12:26 +02:00
9d43b517e6 Merge pull request 'Properly check for firewallGroup in same namespace' (#33) from feature/properly-handle-firewallgroups-in-same-namespace into main
All checks were successful
Publish / build (push) Successful in 2m27s
Reviewed-on: #33
2025-06-28 23:07:05 +00:00
2b38f08a1a Merge pull request 'feature/cleanly-delete-empty-resources' (#32) from feature/cleanly-delete-empty-resources into main
Some checks failed
Publish / build (push) Has been cancelled
Reviewed-on: #32
2025-06-28 22:59:42 +00:00
3a63034e26 Properly check for firewallGroup in same namespace
All checks were successful
Build project / build (push) Successful in 1m54s
Publish / build (push) Successful in 2m0s
2025-06-29 00:58:57 +02:00
37d8060995 Check for nil ResourcesManaged
All checks were successful
Build project / build (push) Successful in 2m0s
Publish / build (push) Successful in 2m4s
2025-06-29 00:44:49 +02:00
8623d6cbc0 debug
All checks were successful
Build project / build (push) Successful in 1m52s
Publish / build (push) Successful in 2m2s
2025-06-29 00:24:00 +02:00
61606e8a7e debug 2025-06-29 00:23:26 +02:00

View File

@@ -125,7 +125,7 @@ func (r *FirewallPolicyReconciler) Reconcile(ctx context.Context, req ctrl.Reque
}
log.Info("Running finalizer logic for FirewallPolicy", "name", firewallPolicy.Name)
if firewallPolicy.Status != nil {
if firewallPolicy.Status.ResourcesManaged != nil {
if len(firewallPolicy.Status.ResourcesManaged.UnifiFirewallPolicies) > 0 {
for i, UnifiFirewallPolicy := range firewallPolicy.Status.ResourcesManaged.UnifiFirewallPolicies {
log.Info(fmt.Sprintf("From: %s to: %s TcpIpv4: %s UdpIpv4: %s TcpIpv6: %s UdpIpv6: %s", UnifiFirewallPolicy.From, UnifiFirewallPolicy.To, UnifiFirewallPolicy.TcpIpv4ID, UnifiFirewallPolicy.UdpIpv4ID, UnifiFirewallPolicy.TcpIpv6ID, UnifiFirewallPolicy.UdpIpv6ID))
@@ -287,14 +287,14 @@ func (r *FirewallPolicyReconciler) Reconcile(ctx context.Context, req ctrl.Reque
// This will be used when running through all firewall groups and servics known, to see if a rule should be added.
for _, dest_group := range firewallPolicy.Spec.Destination.FirewallGroups {
namespace := defaultNs
namespace := firewallPolicy.Namespace
if len(dest_group.Namespace) > 0 {
namespace = dest_group.Namespace
}
destination_groups[namespace+"/"+dest_group.Name] = struct{}{}
}
for _, dest_service := range firewallPolicy.Spec.Destination.Services {
namespace := defaultNs
namespace := firewallPolicy.Namespace
if len(dest_service.Namespace) > 0 {
namespace = dest_service.Namespace
}