Skip to content
This repository was archived by the owner on Dec 6, 2024. It is now read-only.

Commit 330903d

Browse files
authored
Merge pull request #79 from BlaineEXE/modernize-client-gen
monorepo: update client/api generators
2 parents 276cf4b + 4ebb2a4 commit 330903d

File tree

4,623 files changed

+718312
-776626
lines changed

Some content is hidden

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

4,623 files changed

+718312
-776626
lines changed

Diff for: client/Makefile

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
GO ?= go
2+
3+
# # Setting SHELL to bash allows bash commands to be executed by recipes.
4+
# Options are set to exit when a recipe line exits non-zero or a piped command fails.
5+
SHELL = /usr/bin/env bash -o pipefail
6+
.SHELLFLAGS = -ec
7+
8+
.PHONY: all
9+
all: generate test
10+
11+
.PHONY: help
12+
help: ## Display this help.
13+
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
14+
15+
##@ Development
16+
17+
.PHONY: generate
18+
generate: crds codegen fmt module vendor ## Run all code generation/modification tools.
19+
20+
.PHONY: test
21+
test: vet ## Run all tests
22+
23+
##@ Generators
24+
25+
.PHONY: crds
26+
crds: ## Generate CustomResourceDefinitions.
27+
$(GO) run -v ./vendor/sigs.k8s.io/controller-tools/cmd/controller-gen crd paths="./apis/objectstorage/..."
28+
29+
.PHONY:
30+
codegen: ## Generate deepcopy, client, informer, and lister implementations.
31+
./hack/update-codegen.sh
32+
33+
.PHONY: fmt
34+
fmt: ## Run go fmt
35+
$(GO) fmt ./...
36+
37+
.PHONY: module ## Update go mod
38+
$(GO) mod tidy
39+
40+
.PHONY: vendor
41+
vendor: ## Update vendor dir
42+
$(GO) mod vendor
43+
44+
##@ Tests
45+
46+
.PHONY: vet
47+
vet: ## Run go vet
48+
$(GO) vet ./...

Diff for: client/apis/bucket_info.go

+6-7
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,22 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
1817
package cosiapi
1918

2019
import (
2120
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
22-
"sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage/v1alpha1"
21+
"sigs.k8s.io/container-object-storage-interface-api/client/apis/objectstorage/v1alpha1"
2322
)
2423

2524
type SecretS3 struct {
26-
Endpoint string `json:"endpoint"`
27-
Region string `json:"region"`
28-
AccessKeyID string `json:"accessKeyID"`
25+
Endpoint string `json:"endpoint"`
26+
Region string `json:"region"`
27+
AccessKeyID string `json:"accessKeyID"`
2928
AccessSecretKey string `json:"accessSecretKey"`
3029
}
3130

3231
type SecretAzure struct {
33-
AccessToken string `json:"accessToken"`
32+
AccessToken string `json:"accessToken"`
3433
ExpiryTimeStamp *metav1.Time `json:"expiryTimeStamp"`
3534
}
3635

@@ -45,7 +44,7 @@ type BucketInfo struct {
4544
}
4645

4746
type BucketInfoSpec struct {
48-
// BucketName is the name of the Bucket
47+
// BucketName is the name of the Bucket
4948
BucketName string `json:"bucketName"`
5049

5150
// AuthenticationType denotes the style of authentication

Diff for: client/apis/objectstorage/v1alpha1/register.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ package v1alpha1
1818

1919
import (
2020
"k8s.io/apimachinery/pkg/runtime/schema"
21+
"sigs.k8s.io/container-object-storage-interface-api/client/apis/objectstorage"
2122
"sigs.k8s.io/controller-runtime/pkg/scheme"
22-
objectstorage "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage"
2323
)
2424

2525
var (

Diff for: client/apis/objectstorage/v1alpha1/zz_generated.deepcopy.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: client/clientset/internalversion/clientset.go

-121
This file was deleted.

Diff for: client/clientset/internalversion/doc.go

-20
This file was deleted.

Diff for: client/clientset/internalversion/fake/clientset_generated.go

-85
This file was deleted.

Diff for: client/clientset/internalversion/fake/doc.go

-20
This file was deleted.

0 commit comments

Comments
 (0)