Skip to content

Commit f19306e

Browse files
committed
transition to v1alpha2 skeleton
Without retaining any unused v1alpha1 content, transition the project to a v1alpha2 skeleton. The client, controller, and sidecar are largely featureless, based on a fresh kubebuilder project. The Kubernetes client API is also a featureless scaffold based on a fresh kubebuilder project. All COSI resource Kinds are accounted for, but no COSI-specific fields are defined in spec or status definitions. Similarly, gRPC protobuf files have core definitions and placeholders for RPC calls without field definitions needed for COSI use. The intent of the skeleton is that API, gRPC, controller, and sidecar functionality can be added as needed as features are added. This will facilitate deeper discussions in the future on small implementation decisions. Signed-off-by: Blaine Gardner <[email protected]>
1 parent 5fce7c3 commit f19306e

File tree

3,314 files changed

+429046
-117673
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,314 files changed

+429046
-117673
lines changed

.github/workflows/docs.yaml

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

Makefile

Lines changed: 39 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -48,21 +48,18 @@ SIDECAR_TAG ?= cosi-provisioner-sidecar:latest
4848
##@ Development
4949

5050
.PHONY: generate
51-
generate: crd-ref-docs controller/Dockerfile sidecar/Dockerfile ## Generate files
52-
$(MAKE) -C client crds
51+
generate: controller-gen controller/Dockerfile sidecar/Dockerfile ## Generate files
52+
cd ./client && $(CONTROLLER_GEN) rbac:roleName=manager-role crd paths="./apis/objectstorage/..."
53+
# $(MAKE) -C client crds
5354
$(MAKE) -C proto generate
54-
$(CRD_REF_DOCS) \
55-
--config=./docs/.crd-ref-docs.yaml \
56-
--source-path=./client/apis \
57-
--renderer=markdown \
58-
--output-path=./docs/src/api/
55+
5956
%/Dockerfile: hack/Dockerfile.in hack/gen-dockerfile.sh
6057
hack/gen-dockerfile.sh $* > "$@"
6158

6259
.PHONY: codegen
63-
codegen: codegen.client codegen.proto ## Generate code
64-
codegen.%: FORCE
65-
$(MAKE) -C $* codegen
60+
codegen: controller-gen ## Generate code
61+
cd ./client && $(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./apis/objectstorage/..."
62+
$(MAKE) -C proto codegen
6663

6764
.PHONY: fmt
6865
fmt: fmt.client fmt.controller fmt.sidecar ## Format code
@@ -117,8 +114,14 @@ build.sidecar: sidecar/Dockerfile ## Build only the sidecar container image
117114
$(DOCKER) build --file sidecar/Dockerfile --platform $(PLATFORM) $(BUILD_ARGS) --tag $(SIDECAR_TAG) .
118115

119116
.PHONY: build-docs
120-
build-docs: generate mdbook
121-
cd docs; $(MDBOOK) build
117+
build-docs: generate crd-ref-docs mdbook
118+
@echo "build-docs is temporarily disabled for v1alpha2 development"
119+
# $(CRD_REF_DOCS) \
120+
# --config=./docs/.crd-ref-docs.yaml \
121+
# --source-path=./client/apis \
122+
# --renderer=markdown \
123+
# --output-path=./docs/src/api/
124+
# cd docs; $(MDBOOK) build
122125

123126
MDBOOK_PORT ?= 3000
124127

@@ -164,31 +167,38 @@ $(TOOLBIN):
164167
mkdir -p $(TOOLBIN)
165168

166169
# Tool Binaries
167-
CHAINSAW ?= $(TOOLBIN)/chainsaw
168-
CRD_REF_DOCS ?= $(TOOLBIN)/crd-ref-docs
169-
CTLPTL ?= $(TOOLBIN)/ctlptl
170-
GOLANGCI_LINT ?= $(TOOLBIN)/golangci-lint
171-
KIND ?= $(TOOLBIN)/kind
172-
KUSTOMIZE ?= $(TOOLBIN)/kustomize
173-
MDBOOK ?= $(TOOLBIN)/mdbook
174-
SPELL_LINT ?= $(TOOLBIN)/spell-lint
170+
CHAINSAW ?= $(TOOLBIN)/chainsaw
171+
CONTROLLER_GEN ?= $(TOOLBIN)/controller-gen
172+
CRD_REF_DOCS ?= $(TOOLBIN)/crd-ref-docs
173+
CTLPTL ?= $(TOOLBIN)/ctlptl
174+
GOLANGCI_LINT ?= $(TOOLBIN)/golangci-lint
175+
KIND ?= $(TOOLBIN)/kind
176+
KUSTOMIZE ?= $(TOOLBIN)/kustomize
177+
MDBOOK ?= $(TOOLBIN)/mdbook
178+
SPELL_LINT ?= $(TOOLBIN)/spell-lint
175179

176180
# Tool Versions
177-
CHAINSAW_VERSION ?= v0.2.12
178-
CRD_REF_DOCS_VERSION ?= v0.1.0
179-
CTLPTL_VERSION ?= v0.8.39
180-
GOLANGCI_LINT_VERSION ?= v1.64.7
181-
KIND_VERSION ?= v0.27.0
182-
KUSTOMIZE_VERSION ?= v5.6.0
183-
MDBOOK_VERSION ?= v0.4.47
184-
SPELL_LINT_VERSION ?= v0.6.0
185-
HADOLINT_VERSION ?= v2.12.0
181+
CHAINSAW_VERSION ?= v0.2.12
182+
CONTROLLER_TOOLS_VERSION ?= v0.19.0
183+
CRD_REF_DOCS_VERSION ?= v0.1.0
184+
CTLPTL_VERSION ?= v0.8.39
185+
GOLANGCI_LINT_VERSION ?= v1.64.7
186+
KIND_VERSION ?= v0.27.0
187+
KUSTOMIZE_VERSION ?= v5.6.0
188+
MDBOOK_VERSION ?= v0.4.47
189+
SPELL_LINT_VERSION ?= v0.6.0
190+
HADOLINT_VERSION ?= v2.12.0
186191

187192
.PHONY: chainsaw
188193
chainsaw: $(CHAINSAW)-$(CHAINSAW_VERSION)
189194
$(CHAINSAW)-$(CHAINSAW_VERSION): $(TOOLBIN)
190195
$(call go-install-tool,$(CHAINSAW),github.com/kyverno/chainsaw,$(CHAINSAW_VERSION))
191196

197+
.PHONY: controller-gen
198+
controller-gen: $(CONTROLLER_GEN)-$(CONTROLLER_TOOLS_VERSION)
199+
$(CONTROLLER_GEN)-$(CONTROLLER_TOOLS_VERSION): $(LOCALBIN)
200+
$(call go-install-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen,$(CONTROLLER_TOOLS_VERSION))
201+
192202
.PHONY: crd-ref-docs
193203
crd-ref-docs: $(CRD_REF_DOCS)-$(CRD_REF_DOCS_VERSION)
194204
$(CRD_REF_DOCS)-$(CRD_REF_DOCS_VERSION): $(TOOLBIN)

client/.gitignore

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

client/Makefile

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

client/apis/bucket_info.go

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

client/apis/objectstorage/consts/consts.go

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

client/apis/objectstorage/register.go

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

client/apis/objectstorage/v1alpha1/doc.go

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

client/apis/objectstorage/v1alpha1/events.go

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

0 commit comments

Comments
 (0)