Skip to content

Commit

Permalink
Use k8s 1.29 client libs
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <tamal@appscode.com>
  • Loading branch information
tamalsaha committed Dec 31, 2023
1 parent 000dfa1 commit 4f405f3
Show file tree
Hide file tree
Showing 3,231 changed files with 334,935 additions and 97,582 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 0 additions & 1 deletion .config/api-rules/violation_exceptions.list
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@ API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,StatusCause
API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,Time,Time
API rule violation: names_match,k8s.io/apimachinery/pkg/runtime,Unknown,ContentEncoding
API rule violation: names_match,k8s.io/apimachinery/pkg/runtime,Unknown,ContentType
API rule violation: names_match,k8s.io/apimachinery/pkg/runtime,Unknown,Raw
API rule violation: names_match,k8s.io/apimachinery/pkg/util/intstr,IntOrString,IntVal
API rule violation: names_match,k8s.io/apimachinery/pkg/util/intstr,IntOrString,StrVal
API rule violation: names_match,k8s.io/apimachinery/pkg/util/intstr,IntOrString,Type
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ BIN := apimachinery

CRD_OPTIONS ?= "crd:maxDescLen=0,generateEmbeddedObjectMeta=true,allowDangerousTypes=true"
# https://github.com/appscodelabs/gengo-builder
CODE_GENERATOR_IMAGE ?= ghcr.io/appscode/gengo:release-1.25
CODE_GENERATOR_IMAGE ?= ghcr.io/appscode/gengo:release-1.29
CORE_API_GROUPS ?= kubedb:v1alpha1 kubedb:v1alpha2 postgres:v1alpha1 catalog:v1alpha1 config:v1alpha1 ops:v1alpha1 autoscaling:v1alpha1 dashboard:v1alpha1 schema:v1alpha1 archiver:v1alpha1
API_GROUPS ?= $(CORE_API_GROUPS) ui:v1alpha1

Expand Down Expand Up @@ -117,7 +117,7 @@ clientset:
--env HTTPS_PROXY=$(HTTPS_PROXY) \
$(CODE_GENERATOR_IMAGE) \
/go/src/k8s.io/code-generator/generate-groups.sh \
all \
client,deepcopy,informer,lister \
$(GO_PKG)/$(REPO)/client \
$(GO_PKG)/$(REPO)/apis \
"$(API_GROUPS)" \
Expand Down Expand Up @@ -354,7 +354,7 @@ unit-tests: $(BUILD_DIRS)
./hack/test.sh $(SRC_PKGS) \
"

ADDTL_LINTERS := goconst,gofmt,goimports,unparam
ADDTL_LINTERS := gofmt,goimports,unparam

.PHONY: lint
lint: $(BUILD_DIRS)
Expand Down
1,226 changes: 979 additions & 247 deletions apis/archiver/v1alpha1/openapi_generated.go

Large diffs are not rendered by default.

13 changes: 7 additions & 6 deletions apis/autoscaling/v1alpha1/elasticsearch_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
logf "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/manager"
"sigs.k8s.io/controller-runtime/pkg/webhook"
"sigs.k8s.io/controller-runtime/pkg/webhook/admission"
)

// log is for logging in this package.
Expand Down Expand Up @@ -97,18 +98,18 @@ func (in *ElasticsearchAutoscaler) setOpsReqOptsDefaults() {
var _ webhook.Validator = &ElasticsearchAutoscaler{}

// ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (in *ElasticsearchAutoscaler) ValidateCreate() error {
func (in *ElasticsearchAutoscaler) ValidateCreate() (admission.Warnings, error) {
esLog.Info("validate create", "name", in.Name)
return in.validate()
return nil, in.validate()
}

// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
func (in *ElasticsearchAutoscaler) ValidateUpdate(old runtime.Object) error {
return in.validate()
func (in *ElasticsearchAutoscaler) ValidateUpdate(old runtime.Object) (admission.Warnings, error) {
return nil, in.validate()
}

func (_ ElasticsearchAutoscaler) ValidateDelete() error {
return nil
func (_ ElasticsearchAutoscaler) ValidateDelete() (admission.Warnings, error) {
return nil, nil
}

func (in *ElasticsearchAutoscaler) validate() error {
Expand Down
13 changes: 7 additions & 6 deletions apis/autoscaling/v1alpha1/mariadb_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
logf "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/manager"
"sigs.k8s.io/controller-runtime/pkg/webhook"
"sigs.k8s.io/controller-runtime/pkg/webhook/admission"
)

// log is for logging in this package.
Expand Down Expand Up @@ -74,18 +75,18 @@ func (in *MariaDBAutoscaler) setOpsReqOptsDefaults() {
var _ webhook.Validator = &MariaDBAutoscaler{}

// ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (in *MariaDBAutoscaler) ValidateCreate() error {
func (in *MariaDBAutoscaler) ValidateCreate() (admission.Warnings, error) {
mariaLog.Info("validate create", "name", in.Name)
return in.validate()
return nil, in.validate()
}

// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
func (in *MariaDBAutoscaler) ValidateUpdate(old runtime.Object) error {
return in.validate()
func (in *MariaDBAutoscaler) ValidateUpdate(old runtime.Object) (admission.Warnings, error) {
return nil, in.validate()
}

func (_ MariaDBAutoscaler) ValidateDelete() error {
return nil
func (_ MariaDBAutoscaler) ValidateDelete() (admission.Warnings, error) {
return nil, nil
}

func (in *MariaDBAutoscaler) validate() error {
Expand Down
13 changes: 7 additions & 6 deletions apis/autoscaling/v1alpha1/mongodb_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
logf "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/manager"
"sigs.k8s.io/controller-runtime/pkg/webhook"
"sigs.k8s.io/controller-runtime/pkg/webhook/admission"
)

// log is for logging in this package.
Expand Down Expand Up @@ -98,19 +99,19 @@ func (in *MongoDBAutoscaler) SetDefaults(db *dbapi.MongoDB) {
var _ webhook.Validator = &MongoDBAutoscaler{}

// ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (in *MongoDBAutoscaler) ValidateCreate() error {
func (in *MongoDBAutoscaler) ValidateCreate() (admission.Warnings, error) {
mongoLog.Info("validate create", "name", in.Name)
return in.validate()
return nil, in.validate()
}

// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
func (in *MongoDBAutoscaler) ValidateUpdate(old runtime.Object) error {
func (in *MongoDBAutoscaler) ValidateUpdate(old runtime.Object) (admission.Warnings, error) {
mongoLog.Info("validate create", "name", in.Name)
return in.validate()
return nil, in.validate()
}

func (_ MongoDBAutoscaler) ValidateDelete() error {
return nil
func (_ MongoDBAutoscaler) ValidateDelete() (admission.Warnings, error) {
return nil, nil
}

func (in *MongoDBAutoscaler) validate() error {
Expand Down
13 changes: 7 additions & 6 deletions apis/autoscaling/v1alpha1/mysql_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
logf "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/manager"
"sigs.k8s.io/controller-runtime/pkg/webhook"
"sigs.k8s.io/controller-runtime/pkg/webhook/admission"
)

// log is for logging in this package.
Expand Down Expand Up @@ -78,19 +79,19 @@ func (in *MySQLAutoscaler) SetDefaults() {
var _ webhook.Validator = &MySQLAutoscaler{}

// ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (in *MySQLAutoscaler) ValidateCreate() error {
func (in *MySQLAutoscaler) ValidateCreate() (admission.Warnings, error) {
mysqlLog.Info("validate create", "name", in.Name)
return in.validate()
return nil, in.validate()
}

// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
func (in *MySQLAutoscaler) ValidateUpdate(old runtime.Object) error {
func (in *MySQLAutoscaler) ValidateUpdate(old runtime.Object) (admission.Warnings, error) {
mysqlLog.Info("validate create", "name", in.Name)
return in.validate()
return nil, in.validate()
}

func (_ MySQLAutoscaler) ValidateDelete() error {
return nil
func (_ MySQLAutoscaler) ValidateDelete() (admission.Warnings, error) {
return nil, nil
}

func (in *MySQLAutoscaler) validate() error {
Expand Down
Loading

0 comments on commit 4f405f3

Please sign in to comment.