github.com/cilium/cilium@v1.16.2/operator/pkg/gateway-api/referencegrant_reconcile.go (about) 1 // SPDX-License-Identifier: Apache-2.0 2 // Copyright Authors of Cilium 3 4 package gateway_api 5 6 import ( 7 "context" 8 9 "github.com/sirupsen/logrus" 10 ctrl "sigs.k8s.io/controller-runtime" 11 12 controllerruntime "github.com/cilium/cilium/operator/pkg/controller-runtime" 13 "github.com/cilium/cilium/pkg/logging/logfields" 14 ) 15 16 // Reconcile is part of the main kubernetes reconciliation loop which aims to 17 // move the current state of the cluster closer to the desired state. 18 // 19 // For more details, check Reconcile and its Result here: 20 // - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.12.2/pkg/reconcile 21 func (r *referenceGrantReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { 22 scopedLog := log.WithContext(ctx).WithFields(logrus.Fields{ 23 logfields.Controller: "referencegrant", 24 logfields.Resource: req.NamespacedName, 25 }) 26 27 // TODO(tam): implement the reconcile logic once ReferenceGrant status is available. 28 scopedLog.Info("Successfully reconciled ReferenceGrant") 29 return controllerruntime.Success() 30 }