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

Add APIBinding to make controller work #26

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,9 @@ run-test-e2e: ## Run end-to-end tests on a cluster.

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

# 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
.PHONY: apibinding
apibinding:
$( eval WORKSPACE = $(shell $(KCP_KUBECTL) kcp workspace . --short))
sed 's/WORKSPACE/$(WORKSPACE)/' ./test/e2e/apibinding.yaml | $(KCP_KUBECTL) apply -f -
$(KCP_KUBECTL) wait --for=condition=Ready apibinding/data.my.domain

.PHONY: kind-image
kind-image: docker-build ## Load the controller-manager image into the kind cluster.
Expand Down
8 changes: 5 additions & 3 deletions test/e2e/apibinding.yaml → config/kcp/apibinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ metadata:
spec:
reference:
workspace:
path: WORKSPACE
exportName: data.my.domain
acceptedPermissionClaims:
permissionClaims:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion we should start tagging versions of the example with the release match.
go.mod is still with github.com/kcp-dev/kcp/pkg/apis v0.7.0, which has acceptedPermissionClaims
There is PR #30 that addresses the update of the versions. IMHO PR #30 could be merged first, which would accommodate the change here.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm +1 to making sure the releases match up to KCP's

- resource: "secrets"
state: "Accepted"
- resource: "configmaps"
- resource: "namespaces"
state: "Accepted"
- resource: "namespaces"
state: "Accepted"
1 change: 1 addition & 0 deletions config/kcp/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ resources:
- apiexport.yaml
- clusterrole.yaml
- clusterrolebinding.yaml
- apibinding.yaml

configurations:
- kustomizeconfig.yaml
5 changes: 5 additions & 0 deletions config/kcp/kustomizeconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@ nameReference:
fieldSpecs:
- kind: APIExport
path: spec/latestResourceSchemas
- kind: APIExport
fieldSpecs:
- kind: APIBinding
path: spec/reference/workspace/exportName