Skip to content

Commit

Permalink
Fix bug: Sending nil when no namespaced pod owners found (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
NetanelBollag authored Nov 12, 2023
1 parent 9c01822 commit e7f5e58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/operator/controllers/otterizeclient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func (c *CloudClient) AcquireServiceUserAndPassword(ctx context.Context, service
}

func (c *CloudClient) CleanupOrphanK8SPodEntries(ctx context.Context, _ string, existingServicesByNamespace map[string]*goset.Set[string]) error {
var namespacedPodOwners []otterizegraphql.NamespacedPodOwner
namespacedPodOwners := make([]otterizegraphql.NamespacedPodOwner, 0)
for namespace, podOwnerNames := range existingServicesByNamespace {
for _, podOwner := range podOwnerNames.Items() {
namespacedPodOwners = append(namespacedPodOwners, otterizegraphql.NamespacedPodOwner{Namespace: namespace, Name: podOwner})
Expand Down

0 comments on commit e7f5e58

Please sign in to comment.