You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
update makefile help and docs for local development
Rearrange make targets to separate basic from advanced targets. Add some
more developer documentation to help new contributors.
Modify 'make deploy' for easier local development. Modify Kustomize
resource definitions to make it easier to create a local-specific
kustomize.yaml file for an individual development environment.
Add a script to help deploy a locally-built COSI controller without risk
of accidentally committing changes to git.
Add local controller dev workflow to developer doc.
Signed-off-by: Blaine Gardner <[email protected]>
cd ./client &&$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./apis/objectstorage/..."
66
-
codegen.proto:
67
-
$(MAKE) -C proto codegen
68
-
69
-
.PHONY: fmt
70
-
fmt: fmt.client fmt.controller fmt.sidecar ## Format code
71
-
fmt.%: FORCE
72
-
cd$*&& go fmt ./...
73
-
74
-
.PHONY: vet
75
-
vet: vet.client vet.controller vet.sidecar ## Vet code
76
-
vet.%: FORCE
77
-
cd$*&& go vet ./...
50
+
export
78
51
79
-
.PHONY: test
80
-
test: .test.proto test.client test.controller test.sidecar ## Run all unit tests including vet and fmt
81
-
test.%: fmt.% vet.% FORCE
82
-
cd$*&& go test ./...
83
-
.PHONY: .test.proto
84
-
.test.proto: # gRPC proto has a special unit test
85
-
$(MAKE) -C proto check
52
+
##@ Core (Basic)
86
53
87
-
.PHONY: test-e2e
88
-
test-e2e: chainsaw#Run e2e tests against the K8s cluster specified in ~/.kube/config. It requires both controller and driver deployed. If you need to create a cluster beforehand, consider using 'cluster' and 'deploy' targets.
89
-
$(CHAINSAW)test --values ./test/e2e/values.yaml
54
+
.PHONY: all
55
+
.NOTPARALLEL: all#all generators must run before build
56
+
all: prebuild build ## Build all container images, plus their prerequisites (faster with 'make -j')
90
57
91
58
.PHONY: lint
92
59
lint: golangci-lint.client golangci-lint.controller golangci-lint.sidecar spell-lint dockerfiles-lint ## Run all linters (suggest `make -k`)
Copy file name to clipboardExpand all lines: docs/src/developing/core.md
+23-1Lines changed: 23 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,4 +4,26 @@ With “core” COSI we refer to the common set of API and controllers that are
4
4
5
5
Before your first contribution, you should follow [the Kubernetes Contributor Guide](https://www.kubernetes.dev/docs/guide/#contributor-guide).
6
6
7
-
To further understand the COSI architecture, please refer to [KEP-1979: Object Storage Support](https://github.com/kubernetes/enhancements/tree/master/keps/sig-storage/1979-object-storage-support).
7
+
To further understand the COSI architecture, please refer to [KEP-1979: Object Storage
Before contributing a Pull Request, ensure a [GitHub issue](https://github.com/kubernetes-sigs/container-object-storage-interface/issues) exists corresponding to the change.
11
+
12
+
## Local code development
13
+
14
+
For new contributors, use `make help`, and use **Core** targets as needed.
15
+
These targets ensure changes build successfully, pass basic checks, and are ready for end-to-end tests run in COSI's automated CI.
16
+
17
+
Other more advanced targets are available and also described in `make help` output.
18
+
19
+
Some specific workflows are documented below.
20
+
21
+
### Building and deploying COSI controller changes locally
22
+
23
+
```sh
24
+
export CONTROLLER_TAG="$MY_REPO"/cosi-controller:latest # replace MY_REPO with desired dev repo
0 commit comments