diff --git a/go.mod b/go.mod index 5f4c3e1bf..51100c5a6 100644 --- a/go.mod +++ b/go.mod @@ -4,6 +4,7 @@ go 1.20 replace ( cuelang.org/go => cuelang.org/go v0.4.3 + github.com/docker/docker => github.com/docker/docker v20.10.3-0.20220121014307-40bb9831756f+incompatible github.com/rancher/apiserver => github.com/acorn-io/apiserver-1 v0.0.0-20220608053213-0ffc3be57697 github.com/rancher/wrangler => github.com/acorn-io/wrangler v0.0.0-20230619194218-746dc7cf6a0c @@ -14,7 +15,7 @@ require ( cuelang.org/go v0.5.0 github.com/AlecAivazis/survey/v2 v2.3.6 github.com/acorn-io/aml v0.0.0-20230721050626-ddd76a9874fd - github.com/acorn-io/baaah v0.0.0-20230707151126-5d519d272865 + github.com/acorn-io/baaah v0.0.0-20230727135555-ef06bde4f2ed github.com/acorn-io/mink v0.0.0-20230523184405-ceaaa366d500 github.com/acorn-io/namegenerator v0.0.0-20220915160418-9e3d5a0ffe78 github.com/acorn-io/z v0.0.0-20230714155009-a770ecbbdc45 diff --git a/go.sum b/go.sum index e9c91565a..04427f93b 100644 --- a/go.sum +++ b/go.sum @@ -94,8 +94,8 @@ github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d h1:licZJFw2RwpH github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d/go.mod h1:asat636LX7Bqt5lYEZ27JNDcqxfjdBQuJ/MM4CN/Lzo= github.com/acorn-io/aml v0.0.0-20230721050626-ddd76a9874fd h1:garYcFPFPRFp7NsY8BPg38OV09pC1DeEYt01lh11JAM= github.com/acorn-io/aml v0.0.0-20230721050626-ddd76a9874fd/go.mod h1:UEx5RRLFjryCEHN2pM59+d8A0mPJ3VAxggJOTzPymwg= -github.com/acorn-io/baaah v0.0.0-20230707151126-5d519d272865 h1:BPPGCEBgPxn7crFFWqLDJUlzdHQ23olFkdUqlXd3KA8= -github.com/acorn-io/baaah v0.0.0-20230707151126-5d519d272865/go.mod h1:LtwaWrYK/VuGptWxeD5Sgl0sgJV1ksicpTzyLilow1U= +github.com/acorn-io/baaah v0.0.0-20230727135555-ef06bde4f2ed h1:8qAa5oYrHn39TPoJx8A2+qccR7dRkjqR5zneRS+PqW4= +github.com/acorn-io/baaah v0.0.0-20230727135555-ef06bde4f2ed/go.mod h1:LtwaWrYK/VuGptWxeD5Sgl0sgJV1ksicpTzyLilow1U= github.com/acorn-io/mink v0.0.0-20230523184405-ceaaa366d500 h1:tiM36bM+iMWuW9HM+YlM1GfNDXC7f565z8Be5epO0qM= github.com/acorn-io/mink v0.0.0-20230523184405-ceaaa366d500/go.mod h1:y6aYj2dF/SlU205bDfA43Y5c9sa/aYr4X5GDqYJzJTU= github.com/acorn-io/namegenerator v0.0.0-20220915160418-9e3d5a0ffe78 h1:5zs9L/CXNkuTdJSbhFWczAorbmx67nqlqswx5CQi7XI= diff --git a/pkg/server/server.go b/pkg/server/server.go index 30cff72dd..e443fc486 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -1,8 +1,8 @@ package server import ( - "github.com/acorn-io/baaah/pkg/clientaggregator" "github.com/acorn-io/baaah/pkg/restconfig" + "github.com/acorn-io/baaah/pkg/runtime/multi" "github.com/acorn-io/mink/pkg/server" adminapi "github.com/acorn-io/runtime/pkg/apis/admin.acorn.io" api "github.com/acorn-io/runtime/pkg/apis/api.acorn.io" @@ -13,6 +13,7 @@ import ( apiserver "k8s.io/apiserver/pkg/server" "k8s.io/apiserver/pkg/server/options" "k8s.io/client-go/rest" + kclient "sigs.k8s.io/controller-runtime/pkg/client" ) type Config struct { @@ -41,10 +42,7 @@ func apiGroups(serverConfig Config) ([]*apiserver.APIGroupInfo, error) { if err != nil { return nil, err } - aggr := clientaggregator.New(c) - aggr.AddGroup(api.Group, localClient) - aggr.AddGroup(adminapi.Group, localClient) - c = aggr + c = multi.NewWithWatch(c, map[string]kclient.WithWatch{api.Group: localClient, adminapi.Group: localClient}) } return registry.APIGroups(c, restConfig, localCfg)