-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathregistration-operator.diff
30 lines (26 loc) · 1.87 KB
/
registration-operator.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
diff --git a/Makefile b/Makefile
index cb477b4..23d85cd 100644
--- a/Makefile
+++ b/Makefile
@@ -36,6 +36,7 @@ OLM_VERSION?=0.16.1
KUBECTL?=kubectl
KUBECONFIG?=./.kubeconfig
+HUB_KUBECONFIG?=./.kubeconfig
KLUSTERLET_KUBECONFIG_CONTEXT?=$(shell $(KUBECTL) config current-context)
KLUSTERLET_KIND_KUBECONFIG?=$(HOME)/cluster1-kubeconfig
HUB_KIND_KUBECONFIG?=$(HOME)/hub-kubeconfig
@@ -124,7 +125,7 @@ cluster-hub-ip-kind:
CLUSTER_IP_KIND?=$(shell $(KUBECTL) --kubeconfig $(HOME)/hub-kubeconfig config view | grep server | awk '{ print $2 }' | cut -f3 -d/)
bootstrap-secret: cluster-ip
- cp $(KUBECONFIG) dev-kubeconfig
+ cp $(HUB_KUBECONFIG) dev-kubeconfig
$(KUBECTL) config use-context $(KLUSTERLET_KUBECONFIG_CONTEXT)
$(KUBECTL) get ns open-cluster-management-agent; if [ $$? -ne 0 ] ; then $(KUBECTL) create ns open-cluster-management-agent; fi
$(KUBECTL) config set clusters.kind-$(MANAGED_CLUSTER).server https://$(CLUSTER_IP) --kubeconfig dev-kubeconfig
@@ -158,7 +159,7 @@ deploy-spoke-operator-kind: install-olm-kind munge-spoke-csv bootstrap-secret-ki
$(OPERATOR_SDK) run packagemanifests deploy/klusterlet/olm-catalog/klusterlet/ --namespace open-cluster-management --version $(CSV_VERSION) --install-mode OwnNamespace --timeout=10m
apply-spoke-cr:
- $(SED_CMD) -e "s,quay.io/open-cluster-management/registration,$(REGISTRATION_IMAGE)," -e "s,quay.io/open-cluster-management/work,$(WORK_IMAGE)," deploy/klusterlet/config/samples/operator_open-cluster-management_klusterlets.cr.yaml | $(KUBECTL) apply -f -
+ $(SED_CMD) -e "s,cluster1,$(MANAGED_CLUSTER)," -e "s,quay.io/open-cluster-management/registration,$(REGISTRATION_IMAGE)," -e "s,quay.io/open-cluster-management/work,$(WORK_IMAGE)," deploy/klusterlet/config/samples/operator_open-cluster-management_klusterlets.cr.yaml | $(KUBECTL) apply -f -
apply-spoke-cr-kind:
$(KUBECTL) config use-context kind-$(MANAGED_CLUSTER)