Skip to content
This repository was archived by the owner on Apr 24, 2024. It is now read-only.

Commit bb518e9

Browse files
Few fixes
1 parent b834565 commit bb518e9

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,11 @@ endif
9595

9696
.PHONY: install
9797
install: manifests kustomize ## Install APIResourceSchemas and APIExport into kcp (using $KUBECONFIG or ~/.kube/config).
98-
kustomize build config/kcp | kubectl apply -f -
98+
$(KUSTOMIZE) build config/kcp | kubectl apply -f -
9999

100100
.PHONY: uninstall
101101
uninstall: manifests kustomize ## Uninstall APIResourceSchemas and APIExport from kcp (using $KUBECONFIG or ~/.kube/config). Call with ignore-not-found=true to ignore resource not found errors during deletion.
102-
kustomize build config/kcp | kubectl delete --ignore-not-found=$(ignore-not-found) -f -
102+
$(KUSTOMIZE) build config/kcp | kubectl delete --ignore-not-found=$(ignore-not-found) -f -
103103

104104
.PHONY: deploy-crd
105105
deploy-crd: manifests kustomize ## Deploy controller

controllers/configmap_controller.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ import (
2626
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2727
"k8s.io/apimachinery/pkg/types"
2828

29-
kcpclient "github.com/kcp-dev/apimachinery/pkg/client"
30-
3129
"github.com/kcp-dev/logicalcluster"
3230

3331
ctrl "sigs.k8s.io/controller-runtime"
@@ -55,7 +53,7 @@ type ConfigMapReconciler struct {
5553
func (r *ConfigMapReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
5654
log := log.FromContext(ctx).WithValues("cluster", req.ClusterName)
5755

58-
ctx = kcpclient.WithCluster(ctx, logicalcluster.New(req.ClusterName))
56+
ctx = logicalcluster.WithCluster(ctx, logicalcluster.New(req.ClusterName))
5957

6058
// Test get
6159
var configMap corev1.ConfigMap

controllers/widget_controller.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ package controllers
1919
import (
2020
"context"
2121

22-
kcpclient "github.com/kcp-dev/apimachinery/pkg/client"
2322
"github.com/kcp-dev/logicalcluster"
2423
"k8s.io/apimachinery/pkg/api/errors"
2524
"k8s.io/apimachinery/pkg/runtime"
@@ -57,7 +56,7 @@ func (r *WidgetReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctr
5756
logger.Info("Listed all widgets across all workspaces", "count", len(allWidgets.Items))
5857

5958
// Add the logical cluster to the context
60-
ctx = kcpclient.WithCluster(ctx, logicalcluster.New(req.ClusterName))
59+
ctx = logicalcluster.WithCluster(ctx, logicalcluster.New(req.ClusterName))
6160

6261
logger.Info("Getting widget")
6362
var w datav1alpha1.Widget

0 commit comments

Comments
 (0)