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

Commit de63d08

Browse files
committed
Add APIBinding to make controller work
1 parent 733db4e commit de63d08

File tree

5 files changed

+15
-20
lines changed

5 files changed

+15
-20
lines changed

Makefile

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,9 @@ run-test-e2e: ## Run end-to-end tests on a cluster.
127127

128128
.PHONY: ready-deployment
129129
ready-deployment: KUBECONFIG = $(ARTIFACT_DIR)/kcp.kubeconfig
130-
ready-deployment: kind-image install deploy apibinding ## Deploy the controller-manager and wait for it to be ready.
130+
ready-deployment: kind-image install deploy ## Deploy the controller-manager and wait for it to be ready.
131131
$(KCP_KUBECTL) --namespace "controller-runtime-example-system" rollout status deployment/controller-runtime-example-controller-manager
132132

133-
# TODO(skuznets|ncdc): this APIBinding is not needed, but here only to work around https://github.com/kcp-dev/kcp/issues/1183 - remove it once that is fixed
134-
.PHONY: apibinding
135-
apibinding:
136-
$( eval WORKSPACE = $(shell $(KCP_KUBECTL) kcp workspace . --short))
137-
sed 's/WORKSPACE/$(WORKSPACE)/' ./test/e2e/apibinding.yaml | $(KCP_KUBECTL) apply -f -
138-
$(KCP_KUBECTL) wait --for=condition=Ready apibinding/data.my.domain
139133

140134
.PHONY: kind-image
141135
kind-image: docker-build ## Load the controller-manager image into the kind cluster.

config/kcp/apibinding.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: apis.kcp.dev/v1alpha1
2+
kind: APIBinding
3+
metadata:
4+
name: data.my.domain
5+
spec:
6+
reference:
7+
workspace:
8+
exportName: data.my.domain

config/kcp/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ resources:
33
- apiexport.yaml
44
- clusterrole.yaml
55
- clusterrolebinding.yaml
6+
- apibinding.yaml
67

78
configurations:
89
- kustomizeconfig.yaml

config/kcp/kustomizeconfig.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,8 @@ nameReference:
33
fieldSpecs:
44
- kind: APIExport
55
path: spec/latestResourceSchemas
6+
- kind: APIExport
7+
fieldSpecs:
8+
- kind: APIBinding
9+
path: spec/reference/workspace/exportName
10+

test/e2e/apibinding.yaml

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)