Skip to content

Commit

Permalink
Merge pull request kosmos-io#80 from duanmengkk/main
Browse files Browse the repository at this point in the history
add MCS api schema
  • Loading branch information
kosmos-robot authored Oct 6, 2023
2 parents 525aee7 + ed72168 commit a83c62d
Show file tree
Hide file tree
Showing 16 changed files with 1,320 additions and 101 deletions.
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ require (
k8s.io/metrics v0.26.3
k8s.io/utils v0.0.0-20221128185143-99ec85e7a448
sigs.k8s.io/controller-runtime v0.14.5
sigs.k8s.io/mcs-api v0.1.0
)

require (
Expand Down Expand Up @@ -85,7 +86,7 @@ require (
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 // indirect
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 // indirect
github.com/imdario/mergo v0.3.8 // indirect
github.com/imdario/mergo v0.3.9 // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
Expand Down
288 changes: 286 additions & 2 deletions go.sum

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions pkg/scheme/scheme.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"k8s.io/client-go/kubernetes/scheme"
"k8s.io/client-go/rest"
"sigs.k8s.io/controller-runtime/pkg/client"
mcsv1alpha1 "sigs.k8s.io/mcs-api/pkg/apis/v1alpha1"

clusterlinkv1alpha1 "github.com/kosmos.io/kosmos/pkg/apis/kosmos/v1alpha1"
)
Expand All @@ -21,6 +22,10 @@ func init() {
if err != nil {
panic(err)
}
err = mcsv1alpha1.AddToScheme(aggregatedScheme) // add clusterlink schemes
if err != nil {
panic(err)
}
}

// NewSchema returns a singleton schema set which aggregated Kubernetes's schemes and extended schemes.
Expand Down
5 changes: 0 additions & 5 deletions vendor/OWNERS

This file was deleted.

12 changes: 12 additions & 0 deletions vendor/github.com/imdario/mergo/.deepsource.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions vendor/github.com/imdario/mergo/map.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a83c62d

Please sign in to comment.