Skip to content

Commit 0740376

Browse files
authored
Merge pull request kubernetes-sigs#7 from multicluster-runtime/sttts-cluster-api
✨ Add cluster-api provider
2 parents 7205cf6 + c9a56e4 commit 0740376

File tree

13 files changed

+1121
-34
lines changed

13 files changed

+1121
-34
lines changed

.github/workflows/golangci-lint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ jobs:
2323
- ""
2424
- examples/kind
2525
- providers/kind
26+
- examples/cluster-api
27+
- providers/cluster-api
2628
steps:
2729
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2.2
2830
- name: Calculate go version

Makefile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ GO_APIDIFF := $(TOOLS_BIN_DIR)/go-apidiff
5454
CONTROLLER_GEN := $(TOOLS_BIN_DIR)/controller-gen
5555
EXAMPLES_KIND_DIR := $(abspath examples/kind)
5656
PROVIDERS_KIND_DIR := $(abspath providers/kind)
57+
EXAMPLES_CLUSTER_API_DIR := $(abspath examples/cluster-api)
58+
PROVIDERS_CLUSTER_API_DIR := $(abspath providers/cluster-api)
5759
GO_INSTALL := ./hack/go-install.sh
5860

5961
# The help will print out all targets with their descriptions organized bellow their categories. The categories are represented by `##@` and the target descriptions by `##`.
@@ -119,6 +121,8 @@ lint: $(GOLANGCI_LINT) ## Lint codebase
119121
$(GOLANGCI_LINT) run -v $(GOLANGCI_LINT_EXTRA_ARGS)
120122
cd examples/kind; $(GOLANGCI_LINT) run -v $(GOLANGCI_LINT_EXTRA_ARGS)
121123
cd proviers/kind; $(GOLANGCI_LINT) run -v $(GOLANGCI_LINT_EXTRA_ARGS)
124+
cd examples/cluster-api; $(GOLANGCI_LINT) run -v $(GOLANGCI_LINT_EXTRA_ARGS)
125+
cd proviers/cluster-api; $(GOLANGCI_LINT) run -v $(GOLANGCI_LINT_EXTRA_ARGS)
122126

123127
.PHONY: lint-fix
124128
lint-fix: $(GOLANGCI_LINT) ## Lint the codebase and run auto-fixers if supported by the linter.
@@ -154,7 +158,12 @@ clean-release: ## Remove the release folder
154158

155159
.PHONY: verify-modules
156160
verify-modules: modules $(GO_MOD_CHECK) ## Verify go modules are up to date
157-
@if !(git diff --quiet HEAD -- go.sum go.mod $(TOOLS_DIR)/go.mod $(TOOLS_DIR)/go.sum $(EXAMPLES_KIND_DIR)/go.mod $(EXAMPLES_KIND_DIR)/go.sum $(PROVIDERS_KIND_DIR)/go.mod $(PROVIDERS_KIND_DIR)/go.sum); then \
161+
@if !(git diff --quiet HEAD -- go.sum go.mod $(TOOLS_DIR)/go.mod $(TOOLS_DIR)/go.sum \
162+
$(EXAMPLES_KIND_DIR)/go.mod $(EXAMPLES_KIND_DIR)/go.sum \
163+
$(PROVIDERS_KIND_DIR)/go.mod $(PROVIDERS_KIND_DIR)/go.sum \
164+
$(EXAMPLES_CLUSTER_API_DIR)/go.mod $(EXAMPLES_CLUSTER_API_DIR)/go.sum \
165+
$(PROVIDERS_CLUSTER_API_DIR)/go.mod $(PROVIDERS_CLUSTER_API_DIR)/go.sum \
166+
); then \
158167
git diff; \
159168
echo "go module files are out of date, please run 'make modules'"; exit 1; \
160169
fi

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
## Multi cluster controllers with controller-runtime
99

1010
- **no fork, no go mod replace**: clean extension to [upstream controller-runtime](https://github.com/kubernetes-sigs/controller-runtime).
11-
- **universal**: kind, [Gardener](https://gardener.cloud/) (tbd), [cluster-api](https://github.com/kubernetes-sigs/cluster-api) (tbd). kcp. BYO. Cluster providers make the controller-runtime multi-cluster aware.
11+
- **universal**: kind, [cluster-api](https://github.com/kubernetes-sigs/cluster-api), [Gardener](https://gardener.cloud/) (tbd), kcp (tbd), BYO. Cluster providers make the controller-runtime multi-cluster aware.
1212
- **seamless**: add multi-cluster support without compromising on single-cluster. Run in either mode without code changes to the reconcilers.
1313

1414
> [!WARNING]

examples/cluster-api/go.mod

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
module github.com/multicluster-runtime/multicluster-runtime/examples/fleet
2+
3+
go 1.23.4
4+
5+
toolchain go1.24.0
6+
7+
replace github.com/multicluster-runtime/multicluster-runtime => ../..
8+
9+
replace github.com/multicluster-runtime/multicluster-runtime/providers/cluster-api => ../../providers/cluster-api
10+
11+
require (
12+
github.com/multicluster-runtime/multicluster-runtime v0.20.0-alpha.2
13+
github.com/multicluster-runtime/multicluster-runtime/providers/cluster-api v0.0.0-00010101000000-000000000000
14+
golang.org/x/sync v0.10.0
15+
k8s.io/api v0.32.2
16+
k8s.io/apimachinery v0.32.2
17+
k8s.io/client-go v0.32.2
18+
sigs.k8s.io/cluster-api v1.9.4
19+
sigs.k8s.io/controller-runtime v0.20.2
20+
)
21+
22+
require (
23+
github.com/beorn7/perks v1.0.1 // indirect
24+
github.com/blang/semver/v4 v4.0.0 // indirect
25+
github.com/cespare/xxhash/v2 v2.3.0 // indirect
26+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
27+
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
28+
github.com/evanphx/json-patch/v5 v5.9.11 // indirect
29+
github.com/fsnotify/fsnotify v1.7.0 // indirect
30+
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
31+
github.com/go-logr/logr v1.4.2 // indirect
32+
github.com/go-logr/zapr v1.3.0 // indirect
33+
github.com/go-openapi/jsonpointer v0.21.0 // indirect
34+
github.com/go-openapi/jsonreference v0.20.2 // indirect
35+
github.com/go-openapi/swag v0.23.0 // indirect
36+
github.com/gobuffalo/flect v1.0.3 // indirect
37+
github.com/gogo/protobuf v1.3.2 // indirect
38+
github.com/golang/protobuf v1.5.4 // indirect
39+
github.com/google/btree v1.1.3 // indirect
40+
github.com/google/gnostic-models v0.6.8 // indirect
41+
github.com/google/go-cmp v0.6.0 // indirect
42+
github.com/google/gofuzz v1.2.0 // indirect
43+
github.com/google/uuid v1.6.0 // indirect
44+
github.com/inconshreveable/mousetrap v1.1.0 // indirect
45+
github.com/josharian/intern v1.0.0 // indirect
46+
github.com/json-iterator/go v1.1.12 // indirect
47+
github.com/mailru/easyjson v0.7.7 // indirect
48+
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
49+
github.com/modern-go/reflect2 v1.0.2 // indirect
50+
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
51+
github.com/pkg/errors v0.9.1 // indirect
52+
github.com/prometheus/client_golang v1.19.1 // indirect
53+
github.com/prometheus/client_model v0.6.1 // indirect
54+
github.com/prometheus/common v0.55.0 // indirect
55+
github.com/prometheus/procfs v0.15.1 // indirect
56+
github.com/spf13/cobra v1.8.1 // indirect
57+
github.com/spf13/pflag v1.0.5 // indirect
58+
github.com/x448/float16 v0.8.4 // indirect
59+
go.opentelemetry.io/otel v1.28.0 // indirect
60+
go.opentelemetry.io/otel/trace v1.28.0 // indirect
61+
go.uber.org/multierr v1.11.0 // indirect
62+
go.uber.org/zap v1.27.0 // indirect
63+
golang.org/x/net v0.33.0 // indirect
64+
golang.org/x/oauth2 v0.24.0 // indirect
65+
golang.org/x/sys v0.28.0 // indirect
66+
golang.org/x/term v0.27.0 // indirect
67+
golang.org/x/text v0.21.0 // indirect
68+
golang.org/x/time v0.7.0 // indirect
69+
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
70+
google.golang.org/protobuf v1.35.1 // indirect
71+
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
72+
gopkg.in/inf.v0 v0.9.1 // indirect
73+
gopkg.in/yaml.v3 v3.0.1 // indirect
74+
k8s.io/apiextensions-apiserver v0.32.1 // indirect
75+
k8s.io/cluster-bootstrap v0.31.3 // indirect
76+
k8s.io/component-base v0.32.1 // indirect
77+
k8s.io/klog/v2 v2.130.1 // indirect
78+
k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f // indirect
79+
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // indirect
80+
sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect
81+
sigs.k8s.io/structured-merge-diff/v4 v4.4.2 // indirect
82+
sigs.k8s.io/yaml v1.4.0 // indirect
83+
)

0 commit comments

Comments
 (0)