Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change codegen path to kosmos #13

Merged
merged 1 commit into from
Sep 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmd/controller-manager/app/controllerstarter.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import (
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"

"github.com/kosmos.io/kosmos/cmd/controller-manager/app/options"
clusterlinkv1alpha1 "github.com/kosmos.io/kosmos/pkg/apis/clusterlink/v1alpha1"
clusterlinkv1alpha1 "github.com/kosmos.io/kosmos/pkg/apis/kosmos/v1alpha1"
ctrlcontext "github.com/kosmos.io/kosmos/pkg/controllers/context"
"github.com/kosmos.io/kosmos/pkg/generated/clientset/versioned"
"github.com/kosmos.io/kosmos/pkg/generated/informers/externalversions"
"github.com/kosmos.io/kosmos/pkg/generated/listers/clusterlink/v1alpha1"
"github.com/kosmos.io/kosmos/pkg/generated/listers/kosmos/v1alpha1"
"github.com/kosmos.io/kosmos/pkg/utils"
"github.com/kosmos.io/kosmos/pkg/utils/keys"
)
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ require (
)

require (
cloud.google.com/go/compute/metadata v0.2.3 // indirect
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/BurntSushi/toml v1.0.0 // indirect
github.com/MakeNowJust/heredoc v1.0.0 // indirect
Expand Down
4 changes: 3 additions & 1 deletion go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJW
cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M=
cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s=
cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU=
cloud.google.com/go/compute v1.7.0 h1:v/k9Eueb8aAJ0vZuxKMrgm6kPhCLZU9HxFU+AFDs9Uk=
cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U=
cloud.google.com/go/compute v1.14.0 h1:hfm2+FfxVmnRlh6LpB7cg1ZNU+5edAHmW679JePztk0=
cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY=
cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA=
cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=
cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY=
Expand Down
22 changes: 11 additions & 11 deletions hack/update-codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -o nounset
set -o pipefail

CLUSTERLINK_GROUP_PACKAGE="github.com"
CLUSTERLINK_GO_PACKAGE="${CLUSTERLINK_GROUP_PACKAGE}/kosmos.io/clusterlink"
CLUSTERLINK_GO_PACKAGE="${CLUSTERLINK_GROUP_PACKAGE}/kosmos.io/kosmos"

# For all commands, the working directory is the parent directory(repo root).
REPO_ROOT=$(git rev-parse --show-toplevel)
Expand Down Expand Up @@ -40,35 +40,35 @@ create_gopath_tree "${REPO_ROOT}" "${link_path}"

deepcopy-gen \
--go-header-file hack/boilerplate/boilerplate.go.txt \
--input-dirs=github.com/kosmos.io/kosmos/pkg/apis/clusterlink/v1alpha1 \
--input-dirs=github.com/kosmos.io/kosmos/pkg/apis/kosmos/v1alpha1 \
--output-base="${REPO_ROOT}" \
--output-package=pkg/apis/clusterlink/v1alpha1 \
--output-package=pkg/apis/kosmos/v1alpha1 \
--output-file-base=zz_generated.deepcopy

echo "Generating with register-gen"
GO111MODULE=on go install k8s.io/code-generator/cmd/register-gen
register-gen \
--go-header-file hack/boilerplate/boilerplate.go.txt \
--input-dirs=github.com/kosmos.io/kosmos/pkg/apis/clusterlink/v1alpha1 \
--input-dirs=github.com/kosmos.io/kosmos/pkg/apis/kosmos/v1alpha1 \
--output-base="${REPO_ROOT}" \
--output-package=pkg/apis/clusterlink/v1alpha1 \
--output-package=pkg/apis/kosmos/v1alpha1 \
--output-file-base=zz_generated.register

echo "Generating with conversion-gen"
GO111MODULE=on go install k8s.io/code-generator/cmd/conversion-gen
conversion-gen \
--go-header-file hack/boilerplate/boilerplate.go.txt \
--input-dirs=github.com/kosmos.io/kosmos/pkg/apis/clusterlink/v1alpha1 \
--input-dirs=github.com/kosmos.io/kosmos/pkg/apis/kosmos/v1alpha1 \
--output-base="${REPO_ROOT}" \
--output-package=github.com/kosmos.io/kosmos/pkg/apis/clusterlink/v1alpha1 \
--output-package=github.com/kosmos.io/kosmos/pkg/apis/kosmos/v1alpha1 \
--output-file-base=zz_generated.conversion

echo "Generating with client-gen"
GO111MODULE=on go install k8s.io/code-generator/cmd/client-gen
client-gen \
--go-header-file hack/boilerplate/boilerplate.go.txt \
--input-base="" \
--input=github.com/kosmos.io/kosmos/pkg/apis/clusterlink/v1alpha1 \
--input=github.com/kosmos.io/kosmos/pkg/apis/kosmos/v1alpha1 \
--output-base="${REPO_ROOT}" \
--output-package=github.com/kosmos.io/kosmos/pkg/generated/clientset \
--clientset-name=versioned
Expand All @@ -77,15 +77,15 @@ echo "Generating with lister-gen"
GO111MODULE=on go install k8s.io/code-generator/cmd/lister-gen
lister-gen \
--go-header-file hack/boilerplate/boilerplate.go.txt \
--input-dirs=github.com/kosmos.io/kosmos/pkg/apis/clusterlink/v1alpha1 \
--input-dirs=github.com/kosmos.io/kosmos/pkg/apis/kosmos/v1alpha1 \
--output-base="${REPO_ROOT}" \
--output-package=github.com/kosmos.io/kosmos/pkg/generated/listers

echo "Generating with informer-gen"
GO111MODULE=on go install k8s.io/code-generator/cmd/informer-gen
informer-gen \
--go-header-file hack/boilerplate/boilerplate.go.txt \
--input-dirs=github.com/kosmos.io/kosmos/pkg/apis/clusterlink/v1alpha1 \
--input-dirs=github.com/kosmos.io/kosmos/pkg/apis/kosmos/v1alpha1 \
--versioned-clientset-package=github.com/kosmos.io/kosmos/pkg/generated/clientset/versioned \
--listers-package=github.com/kosmos.io/kosmos/pkg/generated/listers \
--output-base="${REPO_ROOT}" \
Expand All @@ -95,7 +95,7 @@ echo "Generating with openapi-gen"
GO111MODULE=on go install k8s.io/code-generator/cmd/openapi-gen
openapi-gen \
--go-header-file hack/boilerplate/boilerplate.go.txt \
--input-dirs "github.com/kosmos.io/kosmos/pkg/apis/clusterlink/v1alpha1" \
--input-dirs "github.com/kosmos.io/kosmos/pkg/apis/kosmos/v1alpha1" \
--input-dirs "k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/apimachinery/pkg/runtime,k8s.io/apimachinery/pkg/version" \
--output-base="${REPO_ROOT}" \
--output-package "github.com/kosmos.io/kosmos/pkg/generated/openapi" \
Expand Down
2 changes: 1 addition & 1 deletion hack/update-crds.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ GO11MODULE=on go install sigs.k8s.io/controller-tools/cmd/[email protected]
GOPATH=$(go env GOPATH | awk -F ':' '{print $1}')
export PATH=$PATH:$GOPATH/bin

controller-gen crd paths=./pkg/apis/clusterlink/... output:crd:dir="${REPO_ROOT}/deploy/crds"
controller-gen crd paths=./pkg/apis/kosmos/... output:crd:dir="${REPO_ROOT}/deploy/crds"

go run "${REPO_ROOT}/generate/generate.go"
4 changes: 2 additions & 2 deletions pkg/agent/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"sigs.k8s.io/controller-runtime/pkg/reconcile"

networkmanager "github.com/kosmos.io/kosmos/pkg/agent/network-manager"
clusterlinkv1alpha1 "github.com/kosmos.io/kosmos/pkg/apis/clusterlink/v1alpha1"
clusterlinkv1alpha1lister "github.com/kosmos.io/kosmos/pkg/generated/listers/clusterlink/v1alpha1"
clusterlinkv1alpha1 "github.com/kosmos.io/kosmos/pkg/apis/kosmos/v1alpha1"
clusterlinkv1alpha1lister "github.com/kosmos.io/kosmos/pkg/generated/listers/kosmos/v1alpha1"
"github.com/kosmos.io/kosmos/pkg/network"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/agent/network-manager/network_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/pkg/errors"
"k8s.io/klog/v2"

clusterlinkv1alpha1 "github.com/kosmos.io/kosmos/pkg/apis/clusterlink/v1alpha1"
clusterlinkv1alpha1 "github.com/kosmos.io/kosmos/pkg/apis/kosmos/v1alpha1"
"github.com/kosmos.io/kosmos/pkg/network"
)

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion pkg/clusterlinkctl/floaterclient/cluster-helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd"

clusterlinkv1alpha1 "github.com/kosmos.io/kosmos/pkg/apis/clusterlink/v1alpha1"
clusterlinkv1alpha1 "github.com/kosmos.io/kosmos/pkg/apis/kosmos/v1alpha1"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions pkg/clusterlinkctl/membercurd/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import (
"k8s.io/client-go/tools/clientcmd"
"k8s.io/klog/v2"

clusterlinkv1alpha1 "github.com/kosmos.io/kosmos/pkg/apis/clusterlink/v1alpha1"
clusterlinkv1alpha1 "github.com/kosmos.io/kosmos/pkg/apis/kosmos/v1alpha1"
"github.com/kosmos.io/kosmos/pkg/clusterlinkctl/util/apiclient"
"github.com/kosmos.io/kosmos/pkg/generated/clientset/versioned"
"github.com/kosmos.io/kosmos/pkg/generated/clientset/versioned/typed/clusterlink/v1alpha1"
"github.com/kosmos.io/kosmos/pkg/generated/clientset/versioned/typed/kosmos/v1alpha1"
)

type CommandMemberOption struct {
Expand Down
4 changes: 2 additions & 2 deletions pkg/controllers/calicoippool/calicoippool_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ import (
"k8s.io/client-go/tools/cache"
"k8s.io/klog/v2"

clusterlinkv1alpha1 "github.com/kosmos.io/kosmos/pkg/apis/clusterlink/v1alpha1"
clusterlinkv1alpha1 "github.com/kosmos.io/kosmos/pkg/apis/kosmos/v1alpha1"
clusterhelper "github.com/kosmos.io/kosmos/pkg/controllers/cluster"
"github.com/kosmos.io/kosmos/pkg/generated/clientset/versioned"
"github.com/kosmos.io/kosmos/pkg/generated/informers/externalversions"
"github.com/kosmos.io/kosmos/pkg/generated/listers/clusterlink/v1alpha1"
"github.com/kosmos.io/kosmos/pkg/generated/listers/kosmos/v1alpha1"
"github.com/kosmos.io/kosmos/pkg/utils"
"github.com/kosmos.io/kosmos/pkg/utils/flags"
"github.com/kosmos.io/kosmos/pkg/utils/keys"
Expand Down
2 changes: 1 addition & 1 deletion pkg/controllers/cluster/cluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"k8s.io/client-go/tools/cache"
"k8s.io/klog/v2"

clusterlinkv1alpha1 "github.com/kosmos.io/kosmos/pkg/apis/clusterlink/v1alpha1"
clusterlinkv1alpha1 "github.com/kosmos.io/kosmos/pkg/apis/kosmos/v1alpha1"
"github.com/kosmos.io/kosmos/pkg/generated/clientset/versioned"
"github.com/kosmos.io/kosmos/pkg/utils"
"github.com/kosmos.io/kosmos/pkg/utils/flags"
Expand Down
2 changes: 1 addition & 1 deletion pkg/controllers/cluster/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"k8s.io/klog/v2"
ctrl "sigs.k8s.io/controller-runtime"

clusterlinkv1alpha1 "github.com/kosmos.io/kosmos/pkg/apis/clusterlink/v1alpha1"
clusterlinkv1alpha1 "github.com/kosmos.io/kosmos/pkg/apis/kosmos/v1alpha1"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion pkg/controllers/node/node_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/predicate"
"sigs.k8s.io/controller-runtime/pkg/reconcile"

clusterlinkv1alpha1 "github.com/kosmos.io/kosmos/pkg/apis/clusterlink/v1alpha1"
clusterlinkv1alpha1 "github.com/kosmos.io/kosmos/pkg/apis/kosmos/v1alpha1"
"github.com/kosmos.io/kosmos/pkg/generated/clientset/versioned"
interfacepolicy "github.com/kosmos.io/kosmos/pkg/utils/interface-policy"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/controllers/nodecidr/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"k8s.io/client-go/tools/cache"
"k8s.io/klog/v2"

clusterlister "github.com/kosmos.io/kosmos/pkg/generated/listers/clusterlink/v1alpha1"
clusterlister "github.com/kosmos.io/kosmos/pkg/generated/listers/kosmos/v1alpha1"
"github.com/kosmos.io/kosmos/pkg/utils"
)

Expand Down
6 changes: 3 additions & 3 deletions pkg/controllers/nodecidr/nodecidr_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ import (
"k8s.io/client-go/util/retry"
"k8s.io/klog/v2"

clusterlinkv1alpha1 "github.com/kosmos.io/kosmos/pkg/apis/clusterlink/v1alpha1"
clusterlinkv1alpha1 "github.com/kosmos.io/kosmos/pkg/apis/kosmos/v1alpha1"
"github.com/kosmos.io/kosmos/pkg/generated/clientset/versioned"
"github.com/kosmos.io/kosmos/pkg/generated/informers/externalversions"
clusterinformer "github.com/kosmos.io/kosmos/pkg/generated/informers/externalversions/clusterlink/v1alpha1"
clusterlister "github.com/kosmos.io/kosmos/pkg/generated/listers/clusterlink/v1alpha1"
clusterinformer "github.com/kosmos.io/kosmos/pkg/generated/informers/externalversions/kosmos/v1alpha1"
clusterlister "github.com/kosmos.io/kosmos/pkg/generated/listers/kosmos/v1alpha1"
"github.com/kosmos.io/kosmos/pkg/utils"
"github.com/kosmos.io/kosmos/pkg/utils/flags"
"github.com/kosmos.io/kosmos/pkg/utils/keys"
Expand Down
2 changes: 1 addition & 1 deletion pkg/elector/elector.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/klog/v2"

"github.com/kosmos.io/kosmos/pkg/apis/clusterlink/v1alpha1"
"github.com/kosmos.io/kosmos/pkg/apis/kosmos/v1alpha1"
"github.com/kosmos.io/kosmos/pkg/generated/clientset/versioned"
"github.com/kosmos.io/kosmos/pkg/utils"
"github.com/kosmos.io/kosmos/pkg/utils/role"
Expand Down
2 changes: 1 addition & 1 deletion pkg/elector/elector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

"github.com/kosmos.io/kosmos/pkg/apis/clusterlink/v1alpha1"
"github.com/kosmos.io/kosmos/pkg/apis/kosmos/v1alpha1"
)

func TestEnsureGateWayRole(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/generated/clientset/versioned/clientset.go

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

4 changes: 2 additions & 2 deletions pkg/generated/clientset/versioned/fake/clientset_generated.go

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

2 changes: 1 addition & 1 deletion pkg/generated/clientset/versioned/fake/register.go

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

2 changes: 1 addition & 1 deletion pkg/generated/clientset/versioned/scheme/register.go

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

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

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

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

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

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

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

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

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

8 changes: 4 additions & 4 deletions pkg/generated/informers/externalversions/factory.go

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

2 changes: 1 addition & 1 deletion pkg/generated/informers/externalversions/generic.go

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

Loading
Loading