Skip to content

Commit

Permalink
update sigs.k8s.io/controller-runtime to v0.12.1, k8s.io/client-go to…
Browse files Browse the repository at this point in the history
… v0.24.0
  • Loading branch information
hexi.ghx committed Mar 16, 2023
1 parent 72fb8d4 commit 26099a7
Show file tree
Hide file tree
Showing 2,212 changed files with 241,984 additions and 60,082 deletions.
2 changes: 1 addition & 1 deletion cmd/kubernetes-cronhpa-controller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
_ "net/http/pprof"
"os"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/runtime/signals"
"sigs.k8s.io/controller-runtime/pkg/manager/signals"
)

var (
Expand Down
36 changes: 26 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,34 @@ module github.com/AliyunContainerService/kubernetes-cronhpa-controller
go 1.14

require (
github.com/go-logr/zapr v0.2.0 // indirect; indrect
github.com/googleapis/gnostic v0.5.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/emicklei/go-restful v2.16.0+incompatible // indirect
github.com/emicklei/go-restful/v3 v3.10.2 // indirect
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-logr/zapr v1.2.3 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/gnostic v0.6.9 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/gorilla/mux v1.8.0
github.com/prometheus/client_golang v1.7.1
github.com/imdario/mergo v0.3.14 // indirect
github.com/onsi/gomega v1.23.0 // indirect
github.com/prometheus/client_golang v1.14.0
github.com/prometheus/common v0.42.0 // indirect
github.com/prometheus/procfs v0.9.0 // indirect
github.com/ringtail/go-cron v1.0.1-0.20201027122514-cfb21c105f50
github.com/satori/go.uuid v1.2.0
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6 // indirect
k8s.io/api v0.19.0
k8s.io/apiextensions-apiserver v0.19.0
golang.org/x/oauth2 v0.6.0 // indirect
golang.org/x/time v0.3.0 // indirect
google.golang.org/protobuf v1.29.1 // indirect
k8s.io/api v0.24.0
k8s.io/apiextensions-apiserver v0.24.0
k8s.io/apimachinery v0.24.0
k8s.io/client-go v0.19.0
k8s.io/klog/v2 v2.60.1
sigs.k8s.io/controller-runtime v0.6.2
k8s.io/client-go v0.24.0
k8s.io/klog/v2 v2.90.1
k8s.io/kube-openapi v0.0.0-20230308215209-15aac26d736a // indirect
k8s.io/utils v0.0.0-20230313181309-38a27ef9d749 // indirect
sigs.k8s.io/controller-runtime v0.12.1
)
878 changes: 620 additions & 258 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/apis/autoscaling/v1beta1/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ package v1beta1

import (
"k8s.io/apimachinery/pkg/runtime/schema"
"sigs.k8s.io/controller-runtime/pkg/runtime/scheme"
"sigs.k8s.io/controller-runtime/pkg/scheme"
)

var (
Expand Down
6 changes: 3 additions & 3 deletions pkg/controller/cronhorizontalpodautoscaler_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ type ReconcileCronHorizontalPodAutoscaler struct {
// Automatically generate RBAC rules to allow the Controller to read and write Deployments
// +kubebuilder:rbac:groups=apps,resources=deployments,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=autoscaling.alibabacloud.com,resources=cronhorizontalpodautoscalers,verbs=get;list;watch;create;update;patch;delete
func (r *ReconcileCronHorizontalPodAutoscaler) Reconcile(request reconcile.Request) (reconcile.Result, error) {
func (r *ReconcileCronHorizontalPodAutoscaler) Reconcile(context context.Context, request reconcile.Request) (reconcile.Result, error) {
// Fetch the CronHorizontalPodAutoscaler instance
log.Infof("Start to handle cronHPA %s in %s namespace", request.Name, request.Namespace)
instance := &autoscalingv1beta1.CronHorizontalPodAutoscaler{}
err := r.Get(context.TODO(), request.NamespacedName, instance)
err := r.Get(context, request.NamespacedName, instance)
if err != nil {
if errors.IsNotFound(err) {
// Object not found, return. Created objects are automatically garbage collected.
Expand Down Expand Up @@ -197,7 +197,7 @@ func (r *ReconcileCronHorizontalPodAutoscaler) Reconcile(request reconcile.Reque
}
// conditions are not changed and no need to update.
if !noNeedUpdateStatus || len(leftConditions) != len(conditions) {
err := r.Update(context.Background(), instance)
err := r.Update(context, instance)
if err != nil {
log.Errorf("Failed to update cron hpa %s in namespace %s status, because of %v", instance.Name, instance.Namespace, err)
}
Expand Down
8 changes: 0 additions & 8 deletions vendor/github.com/cespare/xxhash/v2/.travis.yml

This file was deleted.

37 changes: 21 additions & 16 deletions vendor/github.com/cespare/xxhash/v2/README.md

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

10 changes: 10 additions & 0 deletions vendor/github.com/cespare/xxhash/v2/testall.sh

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

48 changes: 20 additions & 28 deletions vendor/github.com/cespare/xxhash/v2/xxhash.go

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

Loading

0 comments on commit 26099a7

Please sign in to comment.