Skip to content

Commit

Permalink
refactor: remove CRD definition for the Component Descriptor (#176)
Browse files Browse the repository at this point in the history
CRDs are defined in the relevant controller repo.

References:
- https://github.com/open-component-model/ocm-controller/tree/main/api/v1alpha1
- #171

Closes #171
  • Loading branch information
yitsushi authored Nov 8, 2022
1 parent b7997a6 commit 25501ad
Show file tree
Hide file tree
Showing 14 changed files with 7 additions and 352 deletions.
40 changes: 0 additions & 40 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@ COMPONENT_CLI_IMAGE_REPOSITORY := $(REGISTRY)/cli
SOURCES := $(shell go list -f '{{$$I:=.Dir}}{{range .GoFiles }}{{$$I}}/{{.}} {{end}}' ./... )
GOPATH := $(shell go env GOPATH)

# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
GOBIN=$(shell go env GOPATH)/bin
else
GOBIN=$(shell go env GOBIN)
endif

NOW := $(shell date --rfc-3339=seconds | sed 's/ /T/')
BUILD_FLAGS := "-s -w \
-X github.com/open-component-model/ocm/pkg/version.gitVersion=$(EFFECTIVE_VERSION) \
Expand Down Expand Up @@ -85,39 +78,6 @@ LOCALBIN ?= $(shell pwd)/bin
$(LOCALBIN):
mkdir -p $(LOCALBIN)

## Tool Binaries
KUSTOMIZE ?= $(LOCALBIN)/kustomize
CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen
ENVTEST ?= $(LOCALBIN)/setup-envtest

## Tool Versions
KUSTOMIZE_VERSION ?= v3.8.7
CONTROLLER_TOOLS_VERSION ?= v0.9.0

KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
.PHONY: kustomize
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary.
$(KUSTOMIZE): $(LOCALBIN)
curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN)

.PHONY: controller-gen
controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary.
$(CONTROLLER_GEN): $(LOCALBIN)
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)

.PHONY: envtest
envtest: $(ENVTEST) ## Download envtest-setup locally if necessary.
$(ENVTEST): $(LOCALBIN)
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest

.PHONY: manifests
manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
$(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="./api/..." paths="./pkg/contexts/ocm/compdesc/versions/..." output:crd:artifacts:config=config/crd/bases

.PHONY: generate-deepcopy
generate-deepcopy: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./api/..." paths="./pkg/contexts/ocm/compdesc/versions/..."

.PHONY: generate-license
generate-license:
for f in $(shell find . -name "*.go" -o -name "*.sh"); do \
Expand Down
7 changes: 0 additions & 7 deletions api/v2/doc.go

This file was deleted.

21 changes: 0 additions & 21 deletions api/v2/groupversion_info.go

This file was deleted.

37 changes: 0 additions & 37 deletions api/v2/ocm_descriptor.go

This file was deleted.

88 changes: 0 additions & 88 deletions api/v2/zz_generated.deepcopy.go

This file was deleted.

7 changes: 0 additions & 7 deletions api/v3alpha1/doc.go

This file was deleted.

21 changes: 0 additions & 21 deletions api/v3alpha1/groupversion_info.go

This file was deleted.

36 changes: 0 additions & 36 deletions api/v3alpha1/ocm_descriptor.go

This file was deleted.

88 changes: 0 additions & 88 deletions api/v3alpha1/zz_generated.deepcopy.go

This file was deleted.

3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ require (
golang.org/x/text v0.3.7
gopkg.in/yaml.v3 v3.0.1
helm.sh/helm/v3 v3.9.4
sigs.k8s.io/controller-runtime v0.12.3
)

require (
Expand Down Expand Up @@ -105,6 +104,7 @@ require (
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/fsnotify/fsnotify v1.5.1 // indirect
github.com/fvbommel/sortorder v1.0.1 // indirect
github.com/go-errors/errors v1.0.1 // indirect
github.com/go-gorp/gorp/v3 v3.0.2 // indirect
Expand Down Expand Up @@ -154,6 +154,7 @@ require (
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/onsi/ginkgo v1.16.5 // indirect
github.com/pelletier/go-toml v1.9.4 // indirect
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
Expand Down
Loading

0 comments on commit 25501ad

Please sign in to comment.