Skip to content

Commit

Permalink
Remove kcp from enterprise-contract-controller
Browse files Browse the repository at this point in the history
  • Loading branch information
zregvart committed Mar 8, 2023
1 parent 1e971bd commit 3c9b7ed
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 1,335 deletions.
11 changes: 1 addition & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,21 +64,12 @@ api/config/%.yaml: config/crd/bases/%.yaml
@mkdir -p api/config
@cp $< $@

manifests: api/config/appstudio.redhat.com_enterprisecontractpolicies.yaml kcp-manifests ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
manifests: api/config/appstudio.redhat.com_enterprisecontractpolicies.yaml ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.

.PHONY: generate
generate: $(GEN_DEPS) ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths=./...

kcp-manifests: kcp-apischema kcp-apiexport ## Generate kcp manifests

kcp-apischema: $(wildcard config/crd/bases/*.yaml)
@rm -f config/kcp/apiresourceschema_enterprisecontract.yaml
@for f in $?; do go run -modfile tools/go.mod github.com/kcp-dev/kcp/cmd/kubectl-kcp crd snapshot -f $$f --prefix md5-$$(md5sum $$f | awk '{print $1}') >> config/kcp/apiresourceschema_enterprisecontract.yaml; done

kcp-apiexport: config/kcp/apiresourceschema_enterprisecontract.yaml
@yq ea 'select(.metadata.name != null) | {"apiVersion": "apis.kcp.dev/v1alpha1", "kind": "APIExport", "metadata": {"name": "enterprisecontract"}, "spec": {"latestResourceSchemas": [.metadata.name]}} as $$obj ireduce({}; . *+ $$obj)' config/kcp/apiresourceschema_enterprisecontract.yaml > config/kcp/apiexport_enterprisecontract.yaml

.PHONY: fmt
fmt: ## Run go fmt against code.
go fmt ./...
Expand Down
7 changes: 0 additions & 7 deletions config/kcp/apiexport_enterprisecontract.yaml

This file was deleted.

143 changes: 0 additions & 143 deletions config/kcp/apiresourceschema_enterprisecontract.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions config/kcp/kustomization.yaml

This file was deleted.

Loading

0 comments on commit 3c9b7ed

Please sign in to comment.