Skip to content

Commit 1024716

Browse files
authored
Merge pull request #127 from BlaineEXE/sync-main-release-0.2
Sync main -> release-0.2
2 parents f1f3921 + f8a1e43 commit 1024716

File tree

10,206 files changed

+482862
-1758944
lines changed

Some content is hidden

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

10,206 files changed

+482862
-1758944
lines changed

.github/dependabot.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
version: 2
2+
enable-beta-ecosystems: true
3+
updates:
4+
5+
- package-ecosystem: "gomod"
6+
directories:
7+
- "**/*"
8+
schedule:
9+
interval: "weekly"
10+
groups:
11+
golang-dependencies:
12+
patterns:
13+
- "github.com/golang*"
14+
- "golang.org/x*"
15+
k8s-dependencies:
16+
patterns:
17+
- "k8s.io*"
18+
- "sigs.k8s.io*"
19+
exclude-patterns:
20+
# controller-runtime has history of breaking API changes more often than other k8s projects
21+
- "sigs.k8s.io/controller-runtime"
22+
labels:
23+
- ok-to-test
24+
25+
- package-ecosystem: "docker"
26+
directories:
27+
- "**/*"
28+
schedule:
29+
interval: "weekly"
30+
labels:
31+
- ok-to-test
32+
33+
- package-ecosystem: "github-actions"
34+
directories:
35+
- "**/*"
36+
schedule:
37+
interval: "weekly"
38+
labels:
39+
- ok-to-test

.github/workflows/docs.yaml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Sample workflow for building and deploying a mdBook site to GitHub Pages
2+
#
3+
# To get started with mdBook see: https://rust-lang.github.io/mdBook/index.html
4+
#
5+
name: Deploy mdBook site to Pages
6+
7+
on:
8+
# Runs on only core version tags
9+
push:
10+
tags:
11+
- 'v*'
12+
- '!v*-alpha*'
13+
- '!v*-beta*'
14+
- '!v*-pre*'
15+
- '!v*-rc*'
16+
17+
# Allows you to run this workflow manually from the Actions tab
18+
workflow_dispatch:
19+
20+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
21+
permissions:
22+
contents: read
23+
pages: write
24+
id-token: write
25+
26+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
27+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
28+
concurrency:
29+
group: "pages"
30+
cancel-in-progress: false
31+
32+
jobs:
33+
# Build job
34+
build:
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v5
38+
- name: Install mdBook
39+
run: |
40+
make mdbook
41+
- name: Setup Go
42+
uses: actions/setup-go@v5
43+
with:
44+
go-version-file: ./client/go.mod
45+
- name: Setup Pages
46+
id: pages
47+
uses: actions/configure-pages@v5
48+
with:
49+
enablement: true
50+
- name: Build with mdBook
51+
run: |
52+
make build-docs
53+
- name: Upload artifact
54+
uses: actions/upload-pages-artifact@v3
55+
with:
56+
path: ./docs/book
57+
58+
# Deployment job
59+
deploy:
60+
environment:
61+
name: github-pages
62+
url: ${{ steps.deployment.outputs.page_url }}
63+
runs-on: ubuntu-latest
64+
needs: build
65+
steps:
66+
- name: Deploy to GitHub Pages
67+
id: deployment
68+
uses: actions/deploy-pages@v4

Makefile

Lines changed: 64 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,14 @@ SIDECAR_TAG ?= cosi-provisioner-sidecar:latest
4848
##@ Development
4949

5050
.PHONY: generate
51-
generate: controller/Dockerfile sidecar/Dockerfile ## Generate files
51+
generate: crd-ref-docs controller/Dockerfile sidecar/Dockerfile ## Generate files
5252
$(MAKE) -C client crds
5353
$(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/
5459
%/Dockerfile: hack/Dockerfile.in hack/gen-dockerfile.sh
5560
hack/gen-dockerfile.sh $* > "$@"
5661

@@ -82,14 +87,16 @@ test-e2e: chainsaw # Run e2e tests against the K8s cluster specified in ~/.kube/
8287
$(CHAINSAW) test --values ./test/e2e/values.yaml
8388

8489
.PHONY: lint
85-
lint: golangci-lint.client golangci-lint.controller golangci-lint.sidecar ## Run all linters (suggest `make -k`)
90+
lint: golangci-lint.client golangci-lint.controller golangci-lint.sidecar spell-lint ## Run all linters (suggest `make -k`)
8691
golangci-lint.%: golangci-lint
87-
cd $* && $(GOLANGCI_LINT) run --config $(CURDIR)/.golangci.yaml --new
92+
cd $* && $(GOLANGCI_LINT) run $(GOLANGCI_LINT_RUN_OPTS) --config $(CURDIR)/.golangci.yaml --new
93+
spell-lint:
94+
git ls-files | grep -v -e CHANGELOG -e go.mod -e go.sum -e vendor | xargs $(SPELL_LINT) -i "Creater,creater,ect" -error -o stderr
8895

8996
.PHONY: lint-fix
9097
lint-fix: golangci-lint-fix.client golangci-lint-fix.controller golangci-lint-fix.sidecar ## Run all linters and perform fixes where possible (suggest `make -k`)
9198
golangci-lint-fix.%: golangci-lint
92-
cd $* && $(GOLANGCI_LINT) run --config $(CURDIR)/.golangci.yaml --new --fix
99+
cd $* && $(GOLANGCI_LINT) run $(GOLANGCI_LINT_RUN_OPTS) --config $(CURDIR)/.golangci.yaml --new --fix
93100

94101
##@ Build
95102

@@ -107,6 +114,16 @@ build.controller: controller/Dockerfile ## Build only the controller container i
107114
build.sidecar: sidecar/Dockerfile ## Build only the sidecar container image
108115
$(DOCKER) build --file sidecar/Dockerfile --platform $(PLATFORM) $(BUILD_ARGS) --tag $(SIDECAR_TAG) .
109116

117+
.PHONY: build-docs
118+
build-docs: generate mdbook
119+
cd docs; $(MDBOOK) build
120+
121+
MDBOOK_PORT ?= 3000
122+
123+
.PHONY: serve-docs
124+
serve-docs: generate mdbook build-docs
125+
cd docs; $(MDBOOK) serve --port $(MDBOOK_PORT)
126+
110127
.PHONY: clean
111128
clean: ## Clean build environment
112129
$(MAKE) -C proto clean
@@ -121,11 +138,11 @@ clobber: ## Clean build environment and cached tools
121138

122139
.PHONY: cluster
123140
cluster: kind ctlptl ## Create Kind cluster and local registry
124-
$(CTLPTL) apply -f ctlptl.yaml
141+
PATH=$(TOOLBIN):$(PATH) $(CTLPTL) apply -f ctlptl.yaml
125142

126143
.PHONY: cluster-reset
127144
cluster-reset: kind ctlptl ## Delete Kind cluster
128-
$(CTLPTL) delete -f ctlptl.yaml
145+
PATH=$(TOOLBIN):$(PATH) $(CTLPTL) delete -f ctlptl.yaml
129146

130147
.PHONY: deploy
131148
deploy: kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config
@@ -145,44 +162,65 @@ $(TOOLBIN):
145162
mkdir -p $(TOOLBIN)
146163

147164
# Tool Binaries
148-
CHAINSAW ?= $(TOOLBIN)/chainsaw
149-
CTLPTL ?= $(TOOLBIN)/ctlptl
165+
CHAINSAW ?= $(TOOLBIN)/chainsaw
166+
CRD_REF_DOCS ?= $(TOOLBIN)/crd-ref-docs
167+
CTLPTL ?= $(TOOLBIN)/ctlptl
150168
GOLANGCI_LINT ?= $(TOOLBIN)/golangci-lint
151-
KIND ?= $(TOOLBIN)/kind
152-
KUSTOMIZE ?= $(TOOLBIN)/kustomize
169+
KIND ?= $(TOOLBIN)/kind
170+
KUSTOMIZE ?= $(TOOLBIN)/kustomize
171+
MDBOOK ?= $(TOOLBIN)/mdbook
172+
SPELL_LINT ?= $(TOOLBIN)/spell-lint
153173

154174
# Tool Versions
155-
CHAINSAW_VERSION ?= $(shell grep 'github.com/kyverno/chainsaw ' ./hack/tools/go.mod | cut -d ' ' -f 2)
156-
CTLPTL_VERSION ?= $(shell grep 'github.com/tilt-dev/ctlptl ' ./hack/tools/go.mod | cut -d ' ' -f 2)
157-
GOLANGCI_LINT_VERSION ?= $(shell grep 'github.com/golangci/golangci-lint ' ./hack/tools/go.mod | cut -d ' ' -f 2)
158-
KIND_VERSION ?= $(shell grep 'sigs.k8s.io/kind ' ./hack/tools/go.mod | cut -d ' ' -f 2)
159-
KUSTOMIZE_VERSION ?= $(shell grep 'sigs.k8s.io/kustomize/kustomize/v5 ' ./hack/tools/go.mod | cut -d ' ' -f 2)
175+
CHAINSAW_VERSION ?= v0.2.12
176+
CRD_REF_DOCS_VERSION ?= v0.1.0
177+
CTLPTL_VERSION ?= v0.8.39
178+
GOLANGCI_LINT_VERSION ?= v1.64.7
179+
KIND_VERSION ?= v0.27.0
180+
KUSTOMIZE_VERSION ?= v5.6.0
181+
MDBOOK_VERSION ?= v0.4.47
182+
SPELL_LINT_VERSION ?= v0.6.0
160183

161184
.PHONY: chainsaw
162-
chainsaw: $(CHAINSAW)$(CHAINSAW_VERSION)
163-
$(CHAINSAW)$(CHAINSAW_VERSION): $(TOOLBIN)
185+
chainsaw: $(CHAINSAW)-$(CHAINSAW_VERSION)
186+
$(CHAINSAW)-$(CHAINSAW_VERSION): $(TOOLBIN)
164187
$(call go-install-tool,$(CHAINSAW),github.com/kyverno/chainsaw,$(CHAINSAW_VERSION))
165188

189+
.PHONY: crd-ref-docs
190+
crd-ref-docs: $(CRD_REF_DOCS)-$(CRD_REF_DOCS_VERSION)
191+
$(CRD_REF_DOCS)-$(CRD_REF_DOCS_VERSION): $(TOOLBIN)
192+
$(call go-install-tool,$(CRD_REF_DOCS),github.com/elastic/crd-ref-docs,$(CRD_REF_DOCS_VERSION))
193+
166194
.PHONY: ctlptl
167-
ctlptl: $(CTLPTL)$(CTLPTL_VERSION)
168-
$(CTLPTL)$(CTLPTL_VERSION): $(TOOLBIN)
195+
ctlptl: $(CTLPTL)-$(CTLPTL_VERSION)
196+
$(CTLPTL)-$(CTLPTL_VERSION): $(TOOLBIN)
169197
$(call go-install-tool,$(CTLPTL),github.com/tilt-dev/ctlptl/cmd/ctlptl,$(CTLPTL_VERSION))
170198

171199
.PHONY: golangci-lint
172-
golangci-lint: $(GOLANGCI_LINT)$(GOLANGCI_LINT_VERSION)
173-
$(GOLANGCI_LINT)$(GOLANGCI_LINT_VERSION): $(TOOLBIN)
174-
$(call go-install-tool,$(GOLANGCI_LINT),github.com/golangci/golangci-lint/cmd/golangci-lint,$(GOLANGCI_LINT_VERSION))
200+
golangci-lint: $(GOLANGCI_LINT)-$(GOLANGCI_LINT_VERSION)
201+
$(GOLANGCI_LINT)-$(GOLANGCI_LINT_VERSION): $(TOOLBIN)
202+
./hack/tools/install-golangci-lint.sh $(TOOLBIN) $(GOLANGCI_LINT) $(GOLANGCI_LINT_VERSION)
175203

176204
.PHONY: kind
177-
kind: $(KIND)$(KIND_VERSION)
178-
$(KIND)$(KIND_VERSION): $(TOOLBIN)
205+
kind: $(KIND)-$(KIND_VERSION)
206+
$(KIND)-$(KIND_VERSION): $(TOOLBIN)
179207
$(call go-install-tool,$(KIND),sigs.k8s.io/kind,$(KIND_VERSION))
180208

181209
.PHONY: kustomize
182-
kustomize: $(KUSTOMIZE)$(KUSTOMIZE_VERSION)
183-
$(KUSTOMIZE)$(KUSTOMIZE_VERSION): $(TOOLBIN)
210+
kustomize: $(KUSTOMIZE)-$(KUSTOMIZE_VERSION)
211+
$(KUSTOMIZE)-$(KUSTOMIZE_VERSION): $(TOOLBIN)
184212
$(call go-install-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/v5,$(KUSTOMIZE_VERSION))
185213

214+
.PHONY: mdbook
215+
mdbook: $(MDBOOK)-$(MDBOOK_VERSION)
216+
$(MDBOOK)-$(MDBOOK_VERSION): $(TOOLBIN)
217+
./hack/tools/install-mdbook.sh $(MDBOOK) $(MDBOOK_VERSION)
218+
219+
.PHONY: spell-lint
220+
spell-lint: $(SPELL_LINT)-$(SPELL_LINT_VERSION)
221+
$(SPELL_LINT)-$(SPELL_LINT_VERSION): $(TOOLBIN)
222+
./hack/tools/install-misspell-lint.sh $(TOOLBIN) $(SPELL_LINT) $(SPELL_LINT_VERSION)
223+
186224
# go-install-tool will 'go install' any package with custom target and name of binary, if it doesn't exist
187225
# $1 - target path with name of binary
188226
# $2 - package url which can be installed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Create a new issue raising a RFC for the changes following this format:
2929
**Description:**
3030
> 1. Protocol:
3131
> 2. Fields Added:
32-
> 3. Why is this change neccessary?
32+
> 3. Why is this change necessary?
3333
> ...(describe why here)...
3434
> 4. Which other COSI projects are affected by this change?
3535
> 5. Upgrade plan
File renamed without changes.

client/config/crd/objectstorage.k8s.io_bucketaccessclasses.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.16.4
6+
controller-gen.kubebuilder.io/version: v0.17.3
77
name: bucketaccessclasses.objectstorage.k8s.io
88
spec:
99
group: objectstorage.k8s.io

client/config/crd/objectstorage.k8s.io_bucketaccesses.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.16.4
6+
controller-gen.kubebuilder.io/version: v0.17.3
77
name: bucketaccesses.objectstorage.k8s.io
88
spec:
99
group: objectstorage.k8s.io

client/config/crd/objectstorage.k8s.io_bucketclaims.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.16.4
6+
controller-gen.kubebuilder.io/version: v0.17.3
77
name: bucketclaims.objectstorage.k8s.io
88
spec:
99
group: objectstorage.k8s.io

client/config/crd/objectstorage.k8s.io_bucketclasses.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.16.4
6+
controller-gen.kubebuilder.io/version: v0.17.3
77
name: bucketclasses.objectstorage.k8s.io
88
spec:
99
group: objectstorage.k8s.io

client/config/crd/objectstorage.k8s.io_buckets.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.16.4
6+
controller-gen.kubebuilder.io/version: v0.17.3
77
name: buckets.objectstorage.k8s.io
88
spec:
99
group: objectstorage.k8s.io

0 commit comments

Comments
 (0)