diff --git a/cmd/main.go b/cmd/main.go index 03881545..0d8b160e 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -20,7 +20,7 @@ import ( "flag" "os" - // Import all Kubernetes client auth plugins (e.g. Azure, GCP, OIDC, etc.) + // Import all Kubernetes client auth plugins (e.g. Azure, GCP, OIDC, etc.). // to ensure that exec-entrypoint and run can make use of them. _ "k8s.io/client-go/plugin/pkg/client/auth" diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 5c5f0b84..e486b14b 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -1,2 +1,8 @@ resources: - manager.yaml +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +images: +- name: controller + newName: cluster-inventory + newTag: 0.0.1 diff --git a/internal/controller/cluster_controller.go b/internal/controller/cluster_controller.go index b1704eb8..a90bed07 100644 --- a/internal/controller/cluster_controller.go +++ b/internal/controller/cluster_controller.go @@ -18,6 +18,7 @@ package controller import ( "context" + "go.uber.org/zap" "k8s.io/apimachinery/pkg/runtime" ctrl "sigs.k8s.io/controller-runtime" @@ -31,6 +32,7 @@ import ( type ClusterReconciler struct { client.Client Scheme *runtime.Scheme + log *zap.SugaredLogger } //+kubebuilder:rbac:groups=clusterinventory.kyma-project.io,resources=clusters,verbs=get;list;watch;create;update;patch;delete @@ -49,7 +51,10 @@ type ClusterReconciler struct { func (r *ClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { _ = log.FromContext(ctx) - // TODO(user): your logic here + r.log. + With("name", req.Name). + With("ns", req.Namespace). + With("DISPER-TEST", "YOLO") return ctrl.Result{}, nil }