Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions internal/provider/kubernetes/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,13 +290,6 @@ func (r *gatewayAPIReconciler) Reconcile(ctx context.Context, _ reconcile.Reques
continue
}

if r.backendCRDExists {
if err = r.processBackends(ctx, gwcResource); err != nil {
r.log.Error(err, fmt.Sprintf("failed processBackends for gatewayClass %s, skipping it", managedGC.Name))
continue
}
}

// Add the referenced services, ServiceImports, and EndpointSlices in
// the collected BackendRefs to the resourceTree.
// BackendRefs are referred by various Route objects and the ExtAuth in SecurityPolicies.
Expand Down Expand Up @@ -1304,23 +1297,6 @@ func (r *gatewayAPIReconciler) processBackendTLSPolicies(
return nil
}

// processBackends adds Backends to the resourceTree
func (r *gatewayAPIReconciler) processBackends(ctx context.Context, resourceTree *resource.Resources) error {
backends := egv1a1.BackendList{}
if err := r.client.List(ctx, &backends); err != nil {
return fmt.Errorf("error listing Backends: %w", err)
}

for _, backend := range backends.Items {
backend := backend //nolint:copyloopvar
// Discard Status to reduce memory consumption in watchable
// It will be recomputed by the gateway-api layer
backend.Status = egv1a1.BackendStatus{}
resourceTree.Backends = append(resourceTree.Backends, &backend)
}
return nil
}

// removeFinalizer removes the gatewayclass finalizer from the provided gc, if it exists.
func (r *gatewayAPIReconciler) removeFinalizer(ctx context.Context, gc *gwapiv1.GatewayClass) error {
if slice.ContainsString(gc.Finalizers, gatewayClassFinalizer) {
Expand Down
Loading