Skip to content

Commit eb0549c

Browse files
authored
Merge pull request #48 from everpeace/cluster-inventory-api
🌱 Cluster Inventory(`ClusterProfile`) API Provider
2 parents 5a71e2a + c35aa8e commit eb0549c

File tree

17 files changed

+1878
-1
lines changed

17 files changed

+1878
-1
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ jobs:
2525
- providers/kind
2626
- examples/cluster-api
2727
- providers/cluster-api
28+
- examples/cluster-inventory-api
29+
- providers/cluster-inventory-api
2830
name: golangci-lint [${{ matrix.working-directory }}]
2931
steps:
3032
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2.2

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ EXAMPLES_KIND_DIR := $(abspath examples/kind)
5656
PROVIDERS_KIND_DIR := $(abspath providers/kind)
5757
EXAMPLES_CLUSTER_API_DIR := $(abspath examples/cluster-api)
5858
PROVIDERS_CLUSTER_API_DIR := $(abspath providers/cluster-api)
59+
EXAMPLES_CLUSTER_INVENTORY_API_DIR := $(abspath examples/cluster-inventory-api)
60+
PROVIDERS_CLUSTER_INVENTORY_API_DIR := $(abspath providers/cluster-inventory-api)
5961
GO_INSTALL := ./hack/go-install.sh
6062

6163
# The help will print out all targets with their descriptions organized bellow their categories. The categories are represented by `##@` and the target descriptions by `##`.
@@ -140,6 +142,8 @@ modules: ## Runs go mod to ensure modules are up to date.
140142
cd $(PROVIDERS_KIND_DIR); go mod tidy
141143
cd $(EXAMPLES_CLUSTER_API_DIR); go mod tidy
142144
cd $(PROVIDERS_CLUSTER_API_DIR); go mod tidy
145+
cd $(EXAMPLES_CLUSTER_INVENTORY_API_DIR); go mod tidy
146+
cd $(PROVIDERS_CLUSTER_INVENTORY_API_DIR); go mod tidy
143147

144148
## --------------------------------------
145149
## Cleanup / Verification
@@ -165,6 +169,8 @@ verify-modules: modules $(GO_MOD_CHECK) ## Verify go modules are up to date
165169
$(PROVIDERS_KIND_DIR)/go.mod $(PROVIDERS_KIND_DIR)/go.sum \
166170
$(EXAMPLES_CLUSTER_API_DIR)/go.mod $(EXAMPLES_CLUSTER_API_DIR)/go.sum \
167171
$(PROVIDERS_CLUSTER_API_DIR)/go.mod $(PROVIDERS_CLUSTER_API_DIR)/go.sum \
172+
$(EXAMPLES_CLUSTER_INVENTORY_API_DIR)/go.mod $(EXAMPLES_CLUSTER_INVENTORY_API_DIR)/go.sum \
173+
$(PROVIDERS_CLUSTER_INVENTORY_API_DIR)/go.mod $(PROVIDERS_CLUSTER_INVENTORY_API_DIR)/go.sum \
168174
); then \
169175
git diff; \
170176
echo "go module files are out of date, please run 'make modules'"; exit 1; \
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"providers": [
3+
{
4+
"name": "google",
5+
"execConfig": {
6+
"apiVersion": "client.authentication.k8s.io/v1beta1",
7+
"args": null,
8+
"command": "gke-gcloud-auth-plugin",
9+
"env": null,
10+
"provideClusterInfo": true
11+
}
12+
}
13+
]
14+
}

examples/cluster-inventory-api/go.mod

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
module sigs.k8s.io/multicluster-runtime/examples/cluster-inventory-api
2+
3+
go 1.24.0
4+
5+
replace (
6+
sigs.k8s.io/multicluster-runtime => ../..
7+
sigs.k8s.io/multicluster-runtime/providers/cluster-inventory-api => ../../providers/cluster-inventory-api
8+
)
9+
10+
require (
11+
k8s.io/api v0.33.0
12+
k8s.io/apimachinery v0.33.0
13+
k8s.io/client-go v0.33.0
14+
sigs.k8s.io/cluster-inventory-api v0.0.0-20250702132726-0f613c6275a5
15+
sigs.k8s.io/controller-runtime v0.21.0
16+
sigs.k8s.io/multicluster-runtime v0.0.0-00010101000000-000000000000
17+
sigs.k8s.io/multicluster-runtime/providers/cluster-inventory-api v0.0.0-00010101000000-000000000000
18+
)
19+
20+
require (
21+
github.com/beorn7/perks v1.0.1 // indirect
22+
github.com/cespare/xxhash/v2 v2.3.0 // indirect
23+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
24+
github.com/emicklei/go-restful/v3 v3.12.2 // indirect
25+
github.com/evanphx/json-patch/v5 v5.9.11 // indirect
26+
github.com/fsnotify/fsnotify v1.8.0 // indirect
27+
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
28+
github.com/go-logr/logr v1.4.2 // indirect
29+
github.com/go-logr/zapr v1.3.0 // indirect
30+
github.com/go-openapi/jsonpointer v0.21.1 // indirect
31+
github.com/go-openapi/jsonreference v0.21.0 // indirect
32+
github.com/go-openapi/swag v0.23.1 // indirect
33+
github.com/gogo/protobuf v1.3.2 // indirect
34+
github.com/google/btree v1.1.3 // indirect
35+
github.com/google/gnostic-models v0.6.9 // indirect
36+
github.com/google/go-cmp v0.7.0 // indirect
37+
github.com/google/uuid v1.6.0 // indirect
38+
github.com/josharian/intern v1.0.0 // indirect
39+
github.com/json-iterator/go v1.1.12 // indirect
40+
github.com/mailru/easyjson v0.9.0 // indirect
41+
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
42+
github.com/modern-go/reflect2 v1.0.2 // indirect
43+
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
44+
github.com/pkg/errors v0.9.1 // indirect
45+
github.com/prometheus/client_golang v1.22.0 // indirect
46+
github.com/prometheus/client_model v0.6.1 // indirect
47+
github.com/prometheus/common v0.62.0 // indirect
48+
github.com/prometheus/procfs v0.15.1 // indirect
49+
github.com/spf13/pflag v1.0.6 // indirect
50+
github.com/x448/float16 v0.8.4 // indirect
51+
go.uber.org/multierr v1.11.0 // indirect
52+
go.uber.org/zap v1.27.0 // indirect
53+
golang.org/x/net v0.39.0 // indirect
54+
golang.org/x/oauth2 v0.29.0 // indirect
55+
golang.org/x/sync v0.13.0 // indirect
56+
golang.org/x/sys v0.32.0 // indirect
57+
golang.org/x/term v0.31.0 // indirect
58+
golang.org/x/text v0.24.0 // indirect
59+
golang.org/x/time v0.11.0 // indirect
60+
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
61+
google.golang.org/protobuf v1.36.6 // indirect
62+
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
63+
gopkg.in/inf.v0 v0.9.1 // indirect
64+
gopkg.in/yaml.v3 v3.0.1 // indirect
65+
k8s.io/apiextensions-apiserver v0.33.0 // indirect
66+
k8s.io/klog/v2 v2.130.1 // indirect
67+
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff // indirect
68+
k8s.io/utils v0.0.0-20241210054802-24370beab758 // indirect
69+
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
70+
sigs.k8s.io/randfill v1.0.0 // indirect
71+
sigs.k8s.io/structured-merge-diff/v4 v4.6.0 // indirect
72+
sigs.k8s.io/yaml v1.4.0 // indirect
73+
)

0 commit comments

Comments
 (0)