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

Commit eac083b

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

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
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.

test/e2e/apibinding.yaml renamed to config/kcp/apibinding.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ metadata:
55
spec:
66
reference:
77
workspace:
8-
path: WORKSPACE
98
exportName: data.my.domain
10-
acceptedPermissionClaims:
9+
permissionClaims:
1110
- resource: "secrets"
11+
state: "Accepted"
1212
- resource: "configmaps"
13-
- resource: "namespaces"
13+
state: "Accepted"
14+
- resource: "namespaces"
15+
state: "Accepted"

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+

0 commit comments

Comments
 (0)