Skip to content

Commit 45e9014

Browse files
authored
Modify and optimize the client-go directory and its contents. (#844)
1 parent 08b7cff commit 45e9014

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+252
-732
lines changed

Makefile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,12 @@ clone-sample:
2424
mkdir -p bin
2525
cp -r samples bin/samples
2626

27+
#########
28+
29+
#########
30+
2731
# allow optional per-repo overrides
28-
-include Makefile.overrides.mk
32+
-include client-go/Makefile.overrides.mk
2933

3034
# Set the environment variable BUILD_WITH_CONTAINER to use a container
3135
# to build the repo. The only dependencies in this mode are to have make and
@@ -41,7 +45,7 @@ export
4145

4246
RUN = ./tools/scripts/run.sh
4347

44-
MAKE_DOCKER = $(RUN) make --no-print-directory -e -f Makefile.core.mk
48+
MAKE_DOCKER = $(RUN) make --no-print-directory -e -f client-go/Makefile.core.mk
4549

4650
%:
4751
@$(MAKE_DOCKER) $@
@@ -67,6 +71,6 @@ include out/.env
6771
export
6872

6973
export GOBIN ?= $(GOPATH)/bin
70-
include Makefile.core.mk
74+
include client-go/Makefile.core.mk
7175

7276
endif

Makefile.common.mk

Lines changed: 0 additions & 13 deletions
This file was deleted.

Makefile.overrides.mk

Lines changed: 0 additions & 1 deletion
This file was deleted.

NOTICE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Apache Dubbo Kubernetes
2-
Copyright 2018-2025 The Apache Software Foundation
2+
Copyright 2018-2026 The Apache Software Foundation
33

44
This product includes software developed by the Dubbo Kubernetes project
55
at The Apache Software Foundation (http://dubbo.apache.org/).
Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,19 @@
1-
gen: generate-k8s-client tidy-go
1+
# Licensed to the Apache Software Foundation (ASF) under one or more
2+
# contributor license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright ownership.
4+
# The ASF licenses this file to You under the Apache License, Version 2.0
5+
# (the "License"); you may not use this file except in compliance with
6+
# the License. You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
gen: generate-k8s-client
217

318
clean: clean-k8s-client
419

@@ -9,11 +24,17 @@ client_gen = client-gen
924
lister_gen = lister-gen
1025
informer_gen = informer-gen
1126

12-
kube_dubbo_source_packages = github.com/apache/dubbo-kubernetes/api/networking/v1alpha3
27+
kube_dubbo_source_packages = $(subst $(space),$(empty), \
28+
github.com/apache/dubbo-kubernetes/api/networking/v1alpha3 \
29+
)
1330

14-
kube_base_output_package = client-go/pkg
31+
kube_base_output_package = github.com/apache/dubbo-kubernetes/client-go/pkg
1532
kube_api_base_package = $(kube_base_output_package)/apis
16-
kube_api_packages = github.com/apache/dubbo-kubernetes/$(kube_api_base_package)/networking/v1alpha3
33+
34+
kube_api_packages = $(subst $(space),$(empty), \
35+
$(kube_api_base_package)/networking/v1alpha3 \
36+
)
37+
1738
kube_api_applyconfiguration_packages = $(kube_api_packages),k8s.io/apimachinery/pkg/apis/meta/v1
1839
kube_clientset_package = $(kube_base_output_package)/clientset
1940
kube_clientset_name = versioned
@@ -39,11 +60,11 @@ else
3960
endif
4061

4162
rename_generated_files=\
42-
cd client-go && find $(subst client-go/, $(empty), $(subst $(comma), $(space), $(kube_api_packages)) $(subst github.com/apache/dubbo-kubernetes/, $(empty), $(kube_clientset_package)) $(subst github.com/apache/dubbo-kubernetes/, $(empty), $(kube_listers_package)) $(subst github.com/apache/dubbo-kubernetes/, $(empty), $(kube_informers_package))) \
63+
cd client-go && find $(subst client-go/, $(empty), $(subst github.com/apache/dubbo-kubernetes/, $(empty), $(subst $(comma), $(space), $(kube_api_packages) $(kube_clientset_package) $(kube_listers_package) $(kube_informers_package)))) \
4364
-name '*.go' -and -not -name 'doc.go' -and -not -name '*.gen.go' -type f -exec sh -c 'mv "$$1" "$${1%.go}".gen.go' - '{}' \; || true
4465

4566
fixup_generated_files=\
46-
find client-go -name "*.deepcopy.gen.go" -type f -exec sed -i '' -e '/\*out = \*in/d' {} +
67+
find . -name "*.deepcopy.gen.go" -type f | xargs sed -i -e '/\*out = \*in/d'
4768

4869
.PHONY: generate-k8s-client
4970
generate-k8s-client:
@@ -67,6 +88,4 @@ generate-k8s-client:
6788
.PHONY: clean-k8s-client
6889
clean-k8s-client:
6990
# remove generated code
70-
@rm -rf client-go/pkg
71-
72-
include Makefile.common.mk
91+
@rm -rf client-go/pkg
Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16-
*.md
17-
*.pb.go
18-
.git/
19-
.gitignore
20-
README.md
21-
# Note: bin/ is NOT ignored - it's needed for Docker builds
16+
BUILD_WITH_CONTAINER ?= 1
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1+
//
12
// Licensed to the Apache Software Foundation (ASF) under one or more
23
// contributor license agreements. See the NOTICE file distributed with
34
// this work for additional information regarding copyright ownership.
45
// The ASF licenses this file to You under the Apache License, Version 2.0
56
// (the "License"); you may not use this file except in compliance with
67
// the License. You may obtain a copy of the License at
78
//
8-
// http://www.apache.org/licenses/LICENSE-2.0
9+
// http://www.apache.org/licenses/LICENSE-2.0
910
//
1011
// Unless required by applicable law or agreed to in writing, software
1112
// distributed under the License is distributed on an "AS IS" BASIS,
1213
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1314
// See the License for the specific language governing permissions and
1415
// limitations under the License.
1516

16-
module github.com/apache/dubbo-kubernetes/test/loadtest
17+
package main
1718

18-
go 1.24.0
19+
func main() {}

client-go/pkg/apis/networking/v1alpha3/zz_generated.deepcopy.gen.go

Lines changed: 152 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client-go/pkg/applyconfiguration/networking/v1alpha3/destinationrule.go

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client-go/pkg/applyconfiguration/networking/v1alpha3/virtualservice.go

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)