From 8289578b0f59f973f8bb3f9a0b5c52e5ed535d22 Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Tue, 4 Jul 2023 19:43:16 +0200 Subject: [PATCH] Add support for Kubernetes 1.27 (#2235) * Add support for Kubernetes 1.27 Signed-off-by: Israel Blancas * Upgrade kind and update the CI Signed-off-by: Israel Blancas * Fix format Signed-off-by: Israel Blancas * Use newer base version for K8S since 1.19 and 1.20 are not supported since Kind 1.17 Signed-off-by: Israel Blancas * Fix usage of deprecated methods Signed-off-by: Israel Blancas * Fix K8s test environments Signed-off-by: Israel Blancas * Add quotes to Go version Signed-off-by: Israel Blancas --------- Signed-off-by: Israel Blancas --- .github/workflows/e2e-elasticsearch.yaml | 2 +- .github/workflows/e2e-examples.yaml | 2 +- .github/workflows/e2e-generate.yaml | 2 +- .github/workflows/e2e-miscellaneous.yaml | 2 +- .github/workflows/e2e-sidecar.yaml | 2 +- .github/workflows/e2e-streaming.yaml | 2 +- .github/workflows/e2e-ui.yaml | 2 +- .github/workflows/e2e-upgrade.yaml | 2 +- Makefile | 4 +- apis/v1/jaeger_webhook.go | 15 +- apis/v1/jaeger_webhook_test.go | 7 +- ...jaeger-operator.clusterserviceversion.yaml | 2 +- .../manifests/jaegertracing.io_jaegers.yaml | 2 +- .../crd/bases/jaegertracing.io_jaegers.yaml | 3 +- config/default/manager_auth_proxy_patch.yaml | 2 +- config/rbac/role.yaml | 1 - config/webhook/manifests.yaml | 2 - controllers/appsv1/deployment_webhook.go | 10 +- controllers/appsv1/deployment_webhook_test.go | 20 +- .../jaegertracing/jaeger_controller.go | 6 +- go.mod | 58 ++--- go.sum | 226 ++++++------------ hack/actions/e2e/action.yaml | 2 +- hack/install/install-controller-gen.sh | 2 +- hack/install/install-kind.sh | 8 +- hack/install/install-kubebuilder.sh | 2 +- kind-1.21.yaml | 2 +- kind-1.22.yaml | 2 +- kind-1.23.yaml | 2 +- kind-1.24.yaml | 2 +- kind-1.25.yaml | 2 +- kind-1.26.yaml | 2 +- kind-1.27.yaml | 18 ++ pkg/cmd/start/bootstrap.go | 9 +- pkg/controller/jaeger/account_test.go | 10 +- .../jaeger/clusterrolebinding_test.go | 10 +- pkg/controller/jaeger/configmap_test.go | 12 +- pkg/controller/jaeger/consolelink_test.go | 12 +- pkg/controller/jaeger/cronjob_test.go | 11 +- pkg/controller/jaeger/daemonset_test.go | 10 +- pkg/controller/jaeger/dependencies.go | 84 ++++--- pkg/controller/jaeger/dependencies_test.go | 4 +- pkg/controller/jaeger/deployment.go | 86 +++---- pkg/controller/jaeger/deployment_test.go | 12 +- pkg/controller/jaeger/elasticsearch.go | 148 ++++++------ pkg/controller/jaeger/elasticsearch_test.go | 10 +- .../jaeger/horizontalpodautoscaler_test.go | 17 +- pkg/controller/jaeger/ingress_test.go | 10 +- .../jaeger/jaeger_controller_test.go | 18 +- pkg/controller/jaeger/kafka.go | 88 +++---- pkg/controller/jaeger/kafka_test.go | 10 +- pkg/controller/jaeger/kafkauser.go | 88 +++---- pkg/controller/jaeger/kafkauser_test.go | 10 +- pkg/controller/jaeger/route_test.go | 10 +- pkg/controller/jaeger/secret_test.go | 10 +- pkg/controller/jaeger/service_test.go | 10 +- pkg/upgrade/upgrade_test.go | 14 +- tests/assert-jobs/utils/testhttp.go | 193 ++++++++------- tests/cmd-utils/wait-cronjob/main.go | 174 +++++++------- 59 files changed, 741 insertions(+), 747 deletions(-) create mode 100644 kind-1.27.yaml diff --git a/.github/workflows/e2e-elasticsearch.yaml b/.github/workflows/e2e-elasticsearch.yaml index 7bc47290b..b17f8f5ae 100644 --- a/.github/workflows/e2e-elasticsearch.yaml +++ b/.github/workflows/e2e-elasticsearch.yaml @@ -21,7 +21,7 @@ jobs: matrix: kube-version: - "1.19" - - "1.25" + - "1.27" name: Run Elasticsearch E2E tests steps: - name: "Check out code into the Go module directory" diff --git a/.github/workflows/e2e-examples.yaml b/.github/workflows/e2e-examples.yaml index 578c51853..c6f8fa126 100644 --- a/.github/workflows/e2e-examples.yaml +++ b/.github/workflows/e2e-examples.yaml @@ -21,7 +21,7 @@ jobs: matrix: kube-version: - "1.19" - - "1.25" + - "1.27" name: Run examples E2E tests steps: - name: "Check out code into the Go module directory" diff --git a/.github/workflows/e2e-generate.yaml b/.github/workflows/e2e-generate.yaml index 4e3400537..f06787301 100644 --- a/.github/workflows/e2e-generate.yaml +++ b/.github/workflows/e2e-generate.yaml @@ -21,7 +21,7 @@ jobs: matrix: kube-version: - "1.19" - - "1.25" + - "1.27" name: Run generate E2E tests steps: - name: "Check out code into the Go module directory" diff --git a/.github/workflows/e2e-miscellaneous.yaml b/.github/workflows/e2e-miscellaneous.yaml index fd53a69d4..39ca81ca3 100644 --- a/.github/workflows/e2e-miscellaneous.yaml +++ b/.github/workflows/e2e-miscellaneous.yaml @@ -21,7 +21,7 @@ jobs: matrix: kube-version: - "1.19" - - "1.25" + - "1.27" name: Run miscellaneous E2E tests steps: - name: "Check out code into the Go module directory" diff --git a/.github/workflows/e2e-sidecar.yaml b/.github/workflows/e2e-sidecar.yaml index 974274e39..13ce619fe 100644 --- a/.github/workflows/e2e-sidecar.yaml +++ b/.github/workflows/e2e-sidecar.yaml @@ -21,7 +21,7 @@ jobs: matrix: kube-version: - "1.19" - - "1.25" + - "1.27" name: Run sidecar E2E tests steps: - name: "Check out code into the Go module directory" diff --git a/.github/workflows/e2e-streaming.yaml b/.github/workflows/e2e-streaming.yaml index f04ff58b6..eeff32093 100644 --- a/.github/workflows/e2e-streaming.yaml +++ b/.github/workflows/e2e-streaming.yaml @@ -21,7 +21,7 @@ jobs: matrix: kube-version: - "1.19" - - "1.25" + - "1.27" name: Run streaming E2E tests steps: - name: "Check out code into the Go module directory" diff --git a/.github/workflows/e2e-ui.yaml b/.github/workflows/e2e-ui.yaml index 2ad25759b..513016737 100644 --- a/.github/workflows/e2e-ui.yaml +++ b/.github/workflows/e2e-ui.yaml @@ -21,7 +21,7 @@ jobs: matrix: kube-version: - "1.19" - - "1.25" + - "1.27" name: UI E2E tests steps: - name: "Check out code into the Go module directory" diff --git a/.github/workflows/e2e-upgrade.yaml b/.github/workflows/e2e-upgrade.yaml index ee88abb9f..2dc47f226 100644 --- a/.github/workflows/e2e-upgrade.yaml +++ b/.github/workflows/e2e-upgrade.yaml @@ -21,7 +21,7 @@ jobs: matrix: kube-version: - "1.19" - - "1.25" + - "1.27" name: Run upgrade E2E tests steps: - name: "Check out code into the Go module directory" diff --git a/Makefile b/Makefile index 414bed872..fae8179b0 100644 --- a/Makefile +++ b/Makefile @@ -82,9 +82,9 @@ LD_FLAGS ?= "-X $(VERSION_PKG).version=$(VERSION) -X $(VERSION_PKG).buildDate=$( # ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary. ENVTEST ?= $(LOCALBIN)/setup-envtest -ENVTEST_K8S_VERSION = 1.26 +ENVTEST_K8S_VERSION = 1.27 # Options for KIND version to use -export KUBE_VERSION ?= 1.26 +export KUBE_VERSION ?= 1.27 KIND_CONFIG ?= kind-$(KUBE_VERSION).yaml SCORECARD_TEST_IMG ?= quay.io/operator-framework/scorecard-test:v$(OPERATOR_SDK_VERSION) diff --git a/apis/v1/jaeger_webhook.go b/apis/v1/jaeger_webhook.go index cdbad7cf6..552fdb709 100644 --- a/apis/v1/jaeger_webhook.go +++ b/apis/v1/jaeger_webhook.go @@ -13,6 +13,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/webhook" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" ) const ( @@ -86,13 +87,13 @@ func (j *Jaeger) Default() { var _ webhook.Validator = &Jaeger{} // ValidateCreate implements webhook.Validator so a webhook will be registered for the type -func (j *Jaeger) ValidateCreate() error { +func (j *Jaeger) ValidateCreate() (admission.Warnings, error) { jaegerlog.Info("validate create", "name", j.Name) return j.ValidateUpdate(nil) } // ValidateUpdate implements webhook.Validator so a webhook will be registered for the type -func (j *Jaeger) ValidateUpdate(_ runtime.Object) error { +func (j *Jaeger) ValidateUpdate(_ runtime.Object) (admission.Warnings, error) { jaegerlog.Info("validate update", "name", j.Name) if ShouldInjectOpenShiftElasticsearchConfiguration(j.Spec.Storage) && j.Spec.Storage.Elasticsearch.DoNotProvision { @@ -103,24 +104,24 @@ func (j *Jaeger) ValidateUpdate(_ runtime.Object) error { Name: j.Spec.Storage.Elasticsearch.Name, }, es) if errors.IsNotFound(err) { - return fmt.Errorf("elasticsearch instance not found: %v", err) + return nil, fmt.Errorf("elasticsearch instance not found: %v", err) } } for _, opt := range j.objsWithOptions() { got := opt.DeepCopy().ToArgs() if f := getAdditionalTLSFlags(got); f != nil { - return fmt.Errorf("tls flags incomplete, got: %v", got) + return nil, fmt.Errorf("tls flags incomplete, got: %v", got) } } - return nil + return nil, nil } // ValidateDelete implements webhook.Validator so a webhook will be registered for the type -func (j *Jaeger) ValidateDelete() error { +func (j *Jaeger) ValidateDelete() (admission.Warnings, error) { jaegerlog.Info("validate delete", "name", j.Name) - return nil + return nil, nil } // OpenShiftElasticsearchNodeCount returns total node count of Elasticsearch nodes. diff --git a/apis/v1/jaeger_webhook_test.go b/apis/v1/jaeger_webhook_test.go index 8207921b3..13b3b0e23 100644 --- a/apis/v1/jaeger_webhook_test.go +++ b/apis/v1/jaeger_webhook_test.go @@ -177,7 +177,9 @@ func TestDefault(t *testing.T) { } func TestValidateDelete(t *testing.T) { - assert.Nil(t, new(Jaeger).ValidateDelete()) + warnings, err := new(Jaeger).ValidateDelete() + assert.Nil(t, warnings) + assert.Nil(t, err) } func TestValidate(t *testing.T) { @@ -275,13 +277,14 @@ func TestValidate(t *testing.T) { fakeCl := fake.NewClientBuilder().WithRuntimeObjects(test.objsToCreate...).Build() cl = fakeCl - err := test.current.ValidateCreate() + warnings, err := test.current.ValidateCreate() if test.err != "" { assert.NotNil(t, err) assert.Equal(t, test.err, err.Error()) } else { assert.Nil(t, err) } + assert.Nil(t, warnings) }) } } diff --git a/bundle/manifests/jaeger-operator.clusterserviceversion.yaml b/bundle/manifests/jaeger-operator.clusterserviceversion.yaml index b9b70545b..090ddc061 100644 --- a/bundle/manifests/jaeger-operator.clusterserviceversion.yaml +++ b/bundle/manifests/jaeger-operator.clusterserviceversion.yaml @@ -436,7 +436,7 @@ spec: - --upstream=http://127.0.0.1:8383/ - --logtostderr=true - --v=0 - image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.0 + image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.1 name: kube-rbac-proxy ports: - containerPort: 8443 diff --git a/bundle/manifests/jaegertracing.io_jaegers.yaml b/bundle/manifests/jaegertracing.io_jaegers.yaml index 51ea9c219..2871a9706 100644 --- a/bundle/manifests/jaegertracing.io_jaegers.yaml +++ b/bundle/manifests/jaegertracing.io_jaegers.yaml @@ -3,7 +3,7 @@ kind: CustomResourceDefinition metadata: annotations: cert-manager.io/inject-ca-from: observability/jaeger-operator-serving-cert - controller-gen.kubebuilder.io/version: v0.9.2 + controller-gen.kubebuilder.io/version: v0.12.0 creationTimestamp: null labels: name: jaeger-operator diff --git a/config/crd/bases/jaegertracing.io_jaegers.yaml b/config/crd/bases/jaegertracing.io_jaegers.yaml index 5fa2e80e2..939dd8473 100644 --- a/config/crd/bases/jaegertracing.io_jaegers.yaml +++ b/config/crd/bases/jaegertracing.io_jaegers.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.2 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.12.0 name: jaegers.jaegertracing.io spec: group: jaegertracing.io diff --git a/config/default/manager_auth_proxy_patch.yaml b/config/default/manager_auth_proxy_patch.yaml index 0eaa97a65..968716726 100644 --- a/config/default/manager_auth_proxy_patch.yaml +++ b/config/default/manager_auth_proxy_patch.yaml @@ -9,7 +9,7 @@ spec: spec: containers: - name: kube-rbac-proxy - image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.0 + image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.1 args: - "--secure-listen-address=0.0.0.0:8443" - "--upstream=http://127.0.0.1:8383/" diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 41bc135c1..e20110722 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -2,7 +2,6 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - creationTimestamp: null name: manager-role rules: - apiGroups: diff --git a/config/webhook/manifests.yaml b/config/webhook/manifests.yaml index fcb0af444..b80dca3cd 100644 --- a/config/webhook/manifests.yaml +++ b/config/webhook/manifests.yaml @@ -2,7 +2,6 @@ apiVersion: admissionregistration.k8s.io/v1 kind: MutatingWebhookConfiguration metadata: - creationTimestamp: null name: mutating-webhook-configuration webhooks: - admissionReviewVersions: @@ -49,7 +48,6 @@ webhooks: apiVersion: admissionregistration.k8s.io/v1 kind: ValidatingWebhookConfiguration metadata: - creationTimestamp: null name: validating-webhook-configuration webhooks: - admissionReviewVersions: diff --git a/controllers/appsv1/deployment_webhook.go b/controllers/appsv1/deployment_webhook.go index 9cfa7fb76..1fc378cf5 100644 --- a/controllers/appsv1/deployment_webhook.go +++ b/controllers/appsv1/deployment_webhook.go @@ -25,15 +25,13 @@ import ( "github.com/jaegertracing/jaeger-operator/pkg/tracing" ) -var ( - _ admission.DecoderInjector = (*deploymentInterceptor)(nil) - _ webhook.AdmissionHandler = (*deploymentInterceptor)(nil) -) +var _ webhook.AdmissionHandler = (*deploymentInterceptor)(nil) // NewDeploymentInterceptorWebhook creates a new deployment mutating webhook to be registered -func NewDeploymentInterceptorWebhook(c client.Client) webhook.AdmissionHandler { +func NewDeploymentInterceptorWebhook(c client.Client, decoder *admission.Decoder) webhook.AdmissionHandler { return &deploymentInterceptor{ - client: c, + client: c, + decoder: decoder, } } diff --git a/controllers/appsv1/deployment_webhook_test.go b/controllers/appsv1/deployment_webhook_test.go index e4c47625d..521968a72 100644 --- a/controllers/appsv1/deployment_webhook_test.go +++ b/controllers/appsv1/deployment_webhook_test.go @@ -244,8 +244,8 @@ func TestReconcilieDeployment(t *testing.T) { AdmissionResponse: admissionv1.AdmissionResponse{ Allowed: true, Result: &metav1.Status{ - Reason: "is jaeger deployment, we do not touch it", - Code: 200, + Message: "is jaeger deployment, we do not touch it", + Code: 200, }, }, }, @@ -314,8 +314,8 @@ func TestReconcilieDeployment(t *testing.T) { AdmissionResponse: admissionv1.AdmissionResponse{ Allowed: true, Result: &metav1.Status{ - Reason: "no suitable Jaeger instances found to inject a sidecar", - Code: 200, + Message: "no suitable Jaeger instances found to inject a sidecar", + Code: 200, }, }, }, @@ -369,8 +369,8 @@ func TestReconcilieDeployment(t *testing.T) { AdmissionResponse: admissionv1.AdmissionResponse{ Allowed: true, Result: &metav1.Status{ - Reason: "not watching in namespace, we do not touch the deployment", - Code: 200, + Message: "not watching in namespace, we do not touch the deployment", + Code: 200, }, }, }, @@ -398,7 +398,8 @@ func TestReconcilieDeployment(t *testing.T) { errors: tc.errors, } - r := NewDeploymentInterceptorWebhook(cl) + decoder := admission.NewDecoder(scheme.Scheme) + r := NewDeploymentInterceptorWebhook(cl, decoder) req := admission.Request{} if !tc.emptyRequest { @@ -419,9 +420,6 @@ func TestReconcilieDeployment(t *testing.T) { } } - decoder, err := admission.NewDecoder(s) - require.NoError(t, err) - admission.InjectDecoderInto(decoder, r) resp := r.Handle(context.Background(), req) assert.Len(t, resp.Patches, len(tc.resp.Patches)) @@ -433,8 +431,6 @@ func TestReconcilieDeployment(t *testing.T) { }) assert.Equal(t, tc.resp, resp) - - require.NoError(t, err) }) } } diff --git a/controllers/jaegertracing/jaeger_controller.go b/controllers/jaegertracing/jaeger_controller.go index 2ef1e182a..122b395fa 100644 --- a/controllers/jaegertracing/jaeger_controller.go +++ b/controllers/jaegertracing/jaeger_controller.go @@ -22,7 +22,6 @@ import ( "k8s.io/apimachinery/pkg/runtime" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/source" "github.com/operator-framework/operator-lib/handler" @@ -69,7 +68,10 @@ func (r *JaegerReconciler) Reconcile(ctx context.Context, request ctrl.Request) func (r *JaegerReconciler) SetupWithManager(mgr ctrl.Manager) error { err := ctrl.NewControllerManagedBy(mgr). For(&v1.Jaeger{}). - Watches(&source.Kind{Type: &v1.Jaeger{}}, &handler.InstrumentedEnqueueRequestForObject{}). + Watches( + &v1.Jaeger{}, + &handler.InstrumentedEnqueueRequestForObject{}, + ). Complete(r) return err } diff --git a/go.mod b/go.mod index a82229378..3752ab6a0 100644 --- a/go.mod +++ b/go.mod @@ -4,14 +4,14 @@ go 1.20 require ( github.com/Masterminds/semver v1.5.0 - github.com/go-logr/logr v1.2.3 + github.com/go-logr/logr v1.2.4 github.com/google/gnostic v0.6.9 github.com/google/go-cmp v0.5.9 github.com/mitchellh/go-homedir v1.1.0 github.com/openshift/api v0.0.0-20230213202419-42edf4f1d905 github.com/openshift/elasticsearch-operator v0.0.0-20230209095209-2403ff186a1c github.com/opentracing/opentracing-go v1.2.0 - github.com/operator-framework/operator-lib v0.11.0 + github.com/operator-framework/operator-lib v0.11.1-0.20230607132417-ecb9be488378 github.com/pkg/errors v0.9.1 github.com/sirupsen/logrus v1.9.0 github.com/spf13/cobra v1.6.1 @@ -32,11 +32,11 @@ require ( go.uber.org/zap v1.24.0 gomodules.xyz/jsonpatch/v2 v2.3.0 google.golang.org/grpc v1.53.0 - k8s.io/api v0.26.2 - k8s.io/apimachinery v0.26.2 - k8s.io/client-go v0.26.2 - k8s.io/component-base v0.26.2 - sigs.k8s.io/controller-runtime v0.14.4 + k8s.io/api v0.27.3 + k8s.io/apimachinery v0.27.3 + k8s.io/client-go v0.27.3 + k8s.io/component-base v0.27.3 + sigs.k8s.io/controller-runtime v0.15.0 ) require ( @@ -50,13 +50,13 @@ require ( github.com/evanphx/json-patch/v5 v5.6.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-logr/zapr v1.2.3 // indirect - github.com/go-openapi/jsonpointer v0.19.5 // indirect - github.com/go-openapi/jsonreference v0.20.0 // indirect - github.com/go-openapi/swag v0.19.14 // indirect + github.com/go-logr/zapr v1.2.4 // indirect + github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-openapi/jsonreference v0.20.1 // indirect + github.com/go-openapi/swag v0.22.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.2 // indirect + github.com/golang/protobuf v1.5.3 // indirect github.com/google/gofuzz v1.1.0 // indirect github.com/google/uuid v1.3.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 // indirect @@ -66,18 +66,18 @@ require ( github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/magiconair/properties v1.8.7 // indirect - github.com/mailru/easyjson v0.7.6 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.2 // indirect + github.com/mailru/easyjson v0.7.7 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/pelletier/go-toml/v2 v2.0.6 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.14.0 // indirect - github.com/prometheus/client_model v0.3.0 // indirect - github.com/prometheus/common v0.37.0 // indirect - github.com/prometheus/procfs v0.8.0 // indirect + github.com/prometheus/client_golang v1.15.1 // indirect + github.com/prometheus/client_model v0.4.0 // indirect + github.com/prometheus/common v0.42.0 // indirect + github.com/prometheus/procfs v0.9.0 // indirect github.com/spf13/afero v1.9.3 // indirect github.com/spf13/cast v1.5.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect @@ -87,24 +87,24 @@ require ( go.opentelemetry.io/proto/otlp v0.19.0 // indirect go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.8.0 // indirect - golang.org/x/net v0.7.0 // indirect - golang.org/x/oauth2 v0.4.0 // indirect - golang.org/x/sys v0.5.0 // indirect - golang.org/x/term v0.5.0 // indirect - golang.org/x/text v0.7.0 // indirect + golang.org/x/net v0.10.0 // indirect + golang.org/x/oauth2 v0.5.0 // indirect + golang.org/x/sys v0.8.0 // indirect + golang.org/x/term v0.8.0 // indirect + golang.org/x/text v0.9.0 // indirect golang.org/x/time v0.3.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect - google.golang.org/protobuf v1.28.1 // indirect + google.golang.org/protobuf v1.30.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.26.1 // indirect - k8s.io/klog/v2 v2.80.1 // indirect - k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect - k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 // indirect - sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect + k8s.io/apiextensions-apiserver v0.27.3 // indirect + k8s.io/klog/v2 v2.90.1 // indirect + k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect + k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5 // indirect + sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/go.sum b/go.sum index 37de703aa..6ba0309cd 100644 --- a/go.sum +++ b/go.sum @@ -44,16 +44,9 @@ github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3Q github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= @@ -62,7 +55,6 @@ github.com/cenkalti/backoff/v4 v4.2.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyY github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= @@ -106,32 +98,21 @@ github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeME github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= -github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= -github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= -github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= -github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA= -github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.14 h1:gm3vOOXfiuw5i9p5N9xJvfjvuofpyvLA9Wr6QfK5Fng= -github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= +github.com/go-logr/zapr v1.2.4/go.mod h1:FyHWQIzQORZ0QVE1BtVHv3cKtNLuXsbNLtpuhNapBOA= +github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= +github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +github.com/go-openapi/jsonreference v0.20.1 h1:FBLnyygC4/IZZr893oiomc9XaghoveYTrLC1F86HID8= +github.com/go-openapi/jsonreference v0.20.1/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= +github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= +github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= @@ -165,8 +146,9 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/gnostic v0.6.9 h1:ZK/5VhkoX835RikCHpSUJV9a+S3e1zLh59YnyWeBW+0= @@ -200,6 +182,7 @@ github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20230510103437-eeec1cb781c3 h1:2XF1Vzq06X+inNqgJ9tRnGuw+ZVCB3FazXODD6JE1R8= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= @@ -223,39 +206,28 @@ github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLf github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= -github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.2 h1:hAHbPm5IJGijwng3PWk09JkG9WeqChjprR5s9bBZ+OM= -github.com/matttproud/golang_protobuf_extensions v1.0.2/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= +github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= @@ -263,70 +235,43 @@ github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo/v2 v2.6.0 h1:9t9b9vRUbFq3C4qKFCGkVuq/fIHji802N1nrtkh1mNc= -github.com/onsi/gomega v1.24.1 h1:KORJXNNTzJXzu4ScJWssJfJMnJ+2QJqhoQSRwNlze9E= +github.com/onsi/ginkgo/v2 v2.9.5 h1:+6Hr4uxzP4XIUyAkg61dWBw8lb/gc4/X5luuxN/EC+Q= +github.com/onsi/gomega v1.27.7 h1:fVih9JD6ogIiHUN6ePK7HJidyEDpWGVB5mzM7cWNXoU= github.com/openshift/api v0.0.0-20230213202419-42edf4f1d905 h1:f+W57UXpRIJeZIh9lGLIPix/YxdFDBgHDGo0OkIgQw0= github.com/openshift/api v0.0.0-20230213202419-42edf4f1d905/go.mod h1:ctXNyWanKEjGj8sss1KjjHQ3ENKFm33FFnS5BKaIPh4= github.com/openshift/elasticsearch-operator v0.0.0-20230209095209-2403ff186a1c h1:634+wE/JdH3vRZsezq0ZP96/dhyzvxF1oL0PooadSxw= github.com/openshift/elasticsearch-operator v0.0.0-20230209095209-2403ff186a1c/go.mod h1:XqvnrVfp9t5hZtlSIRd5yh2SIMS97Uv9mbGyiKassmE= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= -github.com/operator-framework/operator-lib v0.11.0 h1:eYzqpiOfq9WBI4Trddisiq/X9BwCisZd3rIzmHRC9Z8= -github.com/operator-framework/operator-lib v0.11.0/go.mod h1:RpyKhFAoG6DmKTDIwMuO6pI3LRc8IE9rxEYWy476o6g= +github.com/operator-framework/operator-lib v0.11.1-0.20230607132417-ecb9be488378 h1:g7JRKMQt/VAzVGUYbiAXwL6YCdQQkGI4nIfMVG6kU6c= +github.com/operator-framework/operator-lib v0.11.1-0.20230607132417-ecb9be488378/go.mod h1:johXYPNOI2CfP3DyNcZRU/4byiQ27rBsAcMSTDE99vs= github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU= github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= -github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_golang v1.15.1 h1:8tXpTmJbyH5lydzFPoxSIJ0J46jdh3tylbvM1xCv0LI= +github.com/prometheus/client_golang v1.15.1/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= -github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= +github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= +github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= +github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= +github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= +github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= @@ -344,7 +289,6 @@ github.com/spf13/viper v1.15.0 h1:js3yy885G8xwJa6iOISGFwd+qlUo5AvyXb7CiihdtiU= github.com/spf13/viper v1.15.0/go.mod h1:fFcTBJxvhhzSJiZy8n+PeW6t8l+KeT/uTARa0jHOQLA= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= @@ -352,7 +296,6 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= @@ -372,6 +315,7 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -406,15 +350,13 @@ go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= -go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -459,9 +401,9 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -469,7 +411,6 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -493,12 +434,9 @@ golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -508,11 +446,9 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.4.0 h1:NF0gk8LVPg1Ml7SSbGyySuoxdsXitj7TvgvuRxIMc/M= -golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= +golang.org/x/oauth2 v0.5.0 h1:HuArIo48skDwlrvM3sEdHXElYslAMsf3KwRkkW4MC4s= +golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -523,13 +459,11 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -538,7 +472,6 @@ golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -551,8 +484,6 @@ golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -560,24 +491,19 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -586,9 +512,8 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -611,7 +536,6 @@ golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -646,6 +570,8 @@ golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.9.1 h1:8WMNJAz3zrtPmnYC7ISf5dEn3MT0gY7jBJfw27yrrLo= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -759,25 +685,21 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= +google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= @@ -794,30 +716,30 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.26.2 h1:dM3cinp3PGB6asOySalOZxEG4CZ0IAdJsrYZXE/ovGQ= -k8s.io/api v0.26.2/go.mod h1:1kjMQsFE+QHPfskEcVNgL3+Hp88B80uj0QtSOlj8itU= -k8s.io/apiextensions-apiserver v0.26.1 h1:cB8h1SRk6e/+i3NOrQgSFij1B2S0Y0wDoNl66bn8RMI= -k8s.io/apiextensions-apiserver v0.26.1/go.mod h1:AptjOSXDGuE0JICx/Em15PaoO7buLwTs0dGleIHixSM= -k8s.io/apimachinery v0.26.2 h1:da1u3D5wfR5u2RpLhE/ZtZS2P7QvDgLZTi9wrNZl/tQ= -k8s.io/apimachinery v0.26.2/go.mod h1:ats7nN1LExKHvJ9TmwootT00Yz05MuYqPXEXaVeOy5I= -k8s.io/client-go v0.26.2 h1:s1WkVujHX3kTp4Zn4yGNFK+dlDXy1bAAkIl+cFAiuYI= -k8s.io/client-go v0.26.2/go.mod h1:u5EjOuSyBa09yqqyY7m3abZeovO/7D/WehVVlZ2qcqU= -k8s.io/component-base v0.26.2 h1:IfWgCGUDzrD6wLLgXEstJKYZKAFS2kO+rBRi0p3LqcI= -k8s.io/component-base v0.26.2/go.mod h1:DxbuIe9M3IZPRxPIzhch2m1eT7uFrSBJUBuVCQEBivs= -k8s.io/klog/v2 v2.80.1 h1:atnLQ121W371wYYFawwYx1aEY2eUfs4l3J72wtgAwV4= -k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+OGxg8HsuBr/5f6tVAjDu6E= -k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= -k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 h1:KTgPnR10d5zhztWptI952TNtt/4u5h3IzDXkdIMuo2Y= -k8s.io/utils v0.0.0-20221128185143-99ec85e7a448/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/api v0.27.3 h1:yR6oQXXnUEBWEWcvPWS0jQL575KoAboQPfJAuKNrw5Y= +k8s.io/api v0.27.3/go.mod h1:C4BNvZnQOF7JA/0Xed2S+aUyJSfTGkGFxLXz9MnpIpg= +k8s.io/apiextensions-apiserver v0.27.3 h1:xAwC1iYabi+TDfpRhxh4Eapl14Hs2OftM2DN5MpgKX4= +k8s.io/apiextensions-apiserver v0.27.3/go.mod h1:BH3wJ5NsB9XE1w+R6SSVpKmYNyIiyIz9xAmBl8Mb+84= +k8s.io/apimachinery v0.27.3 h1:Ubye8oBufD04l9QnNtW05idcOe9Z3GQN8+7PqmuVcUM= +k8s.io/apimachinery v0.27.3/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= +k8s.io/client-go v0.27.3 h1:7dnEGHZEJld3lYwxvLl7WoehK6lAq7GvgjxpA3nv1E8= +k8s.io/client-go v0.27.3/go.mod h1:2MBEKuTo6V1lbKy3z1euEGnhPfGZLKTS9tiJ2xodM48= +k8s.io/component-base v0.27.3 h1:g078YmdcdTfrCE4fFobt7qmVXwS8J/3cI1XxRi/2+6k= +k8s.io/component-base v0.27.3/go.mod h1:JNiKYcGImpQ44iwSYs6dysxzR9SxIIgQalk4HaCNVUY= +k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw= +k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f h1:2kWPakN3i/k81b0gvD5C5FJ2kxm1WrQFanWchyKuqGg= +k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f/go.mod h1:byini6yhqGC14c3ebc/QwanvYwhuMWF6yz2F8uwW8eg= +k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5 h1:kmDqav+P+/5e1i9tFfHq1qcF3sOrDp+YEkVDAHu7Jwk= +k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/controller-runtime v0.14.4 h1:Kd/Qgx5pd2XUL08eOV2vwIq3L9GhIbJ5Nxengbd4/0M= -sigs.k8s.io/controller-runtime v0.14.4/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= -sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k= -sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= +sigs.k8s.io/controller-runtime v0.15.0 h1:ML+5Adt3qZnMSYxZ7gAverBLNPSMQEibtzAgp0UPojU= +sigs.k8s.io/controller-runtime v0.15.0/go.mod h1:7ngYvp1MLT+9GeZ+6lH3LOlcHkp/+tzA/fmHa4iq9kk= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= diff --git a/hack/actions/e2e/action.yaml b/hack/actions/e2e/action.yaml index ead9c698a..8bc005c51 100644 --- a/hack/actions/e2e/action.yaml +++ b/hack/actions/e2e/action.yaml @@ -23,7 +23,7 @@ runs: - name: "Set up Go" uses: actions/setup-go@v2.1.4 with: - go-version: 1.19 + go-version: "1.20" - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 with: diff --git a/hack/install/install-controller-gen.sh b/hack/install/install-controller-gen.sh index ffef8e130..f989e6600 100755 --- a/hack/install/install-controller-gen.sh +++ b/hack/install/install-controller-gen.sh @@ -1,5 +1,5 @@ #!/bin/bash -VERSION="0.9.2" +VERSION="0.12.0" echo "Installing controller-gen" diff --git a/hack/install/install-kind.sh b/hack/install/install-kind.sh index b3ebf5fa7..d62289db1 100755 --- a/hack/install/install-kind.sh +++ b/hack/install/install-kind.sh @@ -1,8 +1,12 @@ #!/bin/bash -VERSION="0.17.0" - echo "Installing kind" +VERSION="0.20.0" +# Kubernetes 1.19 and 1.20 are supported by Kind until 0.17.0 +if [ "$KUBE_VERSION" == "1.19" ] || [ "$KUBE_VERSION" == "1.20" ]; then + VERSION="0.17.0" +fi + current_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) source $current_dir/install-utils.sh diff --git a/hack/install/install-kubebuilder.sh b/hack/install/install-kubebuilder.sh index a7b6644ee..ec444e5b6 100755 --- a/hack/install/install-kubebuilder.sh +++ b/hack/install/install-kubebuilder.sh @@ -1,5 +1,5 @@ #!/bin/bash -VERSION="3.6.0" +VERSION="3.10.0" echo "Installing kubebuilder" diff --git a/kind-1.21.yaml b/kind-1.21.yaml index 148f2611f..cf70b3a77 100644 --- a/kind-1.21.yaml +++ b/kind-1.21.yaml @@ -2,7 +2,7 @@ kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane - image: kindest/node:v1.21.14@sha256:9d9eb5fb26b4fbc0c6d95fa8c790414f9750dd583f5d7cee45d92e8c26670aa1 + image: kindest/node:v1.21.14@sha256:8a4e9bb3f415d2bb81629ce33ef9c76ba514c14d707f9797a01e3216376ba093 kubeadmConfigPatches: - | kind: InitConfiguration diff --git a/kind-1.22.yaml b/kind-1.22.yaml index 5e27021f0..eaff96142 100644 --- a/kind-1.22.yaml +++ b/kind-1.22.yaml @@ -2,7 +2,7 @@ kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane - image: kindest/node:v1.22.15@sha256:7d9708c4b0873f0fe2e171e2b1b7f45ae89482617778c1c875f1053d4cef2e41 + image: kindest/node:v1.22.17@sha256:f5b2e5698c6c9d6d0adc419c0deae21a425c07d81bbf3b6a6834042f25d4fba2 kubeadmConfigPatches: - | kind: InitConfiguration diff --git a/kind-1.23.yaml b/kind-1.23.yaml index 1125478f0..5d38d6beb 100644 --- a/kind-1.23.yaml +++ b/kind-1.23.yaml @@ -2,7 +2,7 @@ kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane - image: kindest/node:v1.23.13@sha256:ef453bb7c79f0e3caba88d2067d4196f427794086a7d0df8df4f019d5e336b61 + image: kindest/node:v1.23.17@sha256:59c989ff8a517a93127d4a536e7014d28e235fb3529d9fba91b3951d461edfdb kubeadmConfigPatches: - | kind: InitConfiguration diff --git a/kind-1.24.yaml b/kind-1.24.yaml index b3bbaca0f..92f15448e 100644 --- a/kind-1.24.yaml +++ b/kind-1.24.yaml @@ -2,7 +2,7 @@ kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane - image: kindest/node:v1.24.7@sha256:577c630ce8e509131eab1aea12c022190978dd2f745aac5eb1fe65c0807eb315 + image: kindest/node:v1.24.15@sha256:7db4f8bea3e14b82d12e044e25e34bd53754b7f2b0e9d56df21774e6f66a70ab kubeadmConfigPatches: - | kind: InitConfiguration diff --git a/kind-1.25.yaml b/kind-1.25.yaml index 2cd0808b8..336485ccf 100644 --- a/kind-1.25.yaml +++ b/kind-1.25.yaml @@ -2,7 +2,7 @@ kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane - image: kindest/node:v1.25.3@sha256:f52781bc0d7a19fb6c405c2af83abfeb311f130707a0e219175677e366cc45d1 + image: kindest/node:v1.25.11@sha256:227fa11ce74ea76a0474eeefb84cb75d8dad1b08638371ecf0e86259b35be0c8 kubeadmConfigPatches: - | kind: InitConfiguration diff --git a/kind-1.26.yaml b/kind-1.26.yaml index 7f430973a..433b0034e 100644 --- a/kind-1.26.yaml +++ b/kind-1.26.yaml @@ -2,7 +2,7 @@ kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane - image: kindest/node:v1.26.0@sha256:691e24bd2417609db7e589e1a479b902d2e209892a10ce375fab60a8407c7352 + image: kindest/node:v1.26.6@sha256:6e2d8b28a5b601defe327b98bd1c2d1930b49e5d8c512e1895099e4504007adb kubeadmConfigPatches: - | kind: InitConfiguration diff --git a/kind-1.27.yaml b/kind-1.27.yaml new file mode 100644 index 000000000..bb075d37a --- /dev/null +++ b/kind-1.27.yaml @@ -0,0 +1,18 @@ +kind: Cluster +apiVersion: kind.x-k8s.io/v1alpha4 +nodes: +- role: control-plane + image: kindest/node:v1.27.3@sha256:3966ac761ae0136263ffdb6cfd4db23ef8a83cba8a463690e98317add2c9ba72 + kubeadmConfigPatches: + - | + kind: InitConfiguration + nodeRegistration: + kubeletExtraArgs: + node-labels: "ingress-ready=true" + extraPortMappings: + - containerPort: 80 + hostPort: 80 + protocol: TCP + - containerPort: 443 + hostPort: 443 + protocol: TCP diff --git a/pkg/cmd/start/bootstrap.go b/pkg/cmd/start/bootstrap.go index ccc7f10e1..692f199bb 100644 --- a/pkg/cmd/start/bootstrap.go +++ b/pkg/cmd/start/bootstrap.go @@ -24,6 +24,7 @@ import ( clientgoscheme "k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/rest" "sigs.k8s.io/controller-runtime/pkg/log" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" // import OIDC cluster authentication plugin, e.g. for IBM Cloud _ "k8s.io/client-go/plugin/pkg/client/auth/oidc" @@ -355,8 +356,9 @@ func createManager(ctx context.Context, cfg *rest.Config) manager.Manager { // Also note that you may face performance issues when using this with a high number of namespaces. // More Info: https://godoc.org/github.com/kubernetes-sigs/controller-runtime/pkg/cache#MultiNamespacedCacheBuilder if strings.Contains(namespace, ",") { - options.Namespace = "" - options.NewCache = cache.MultiNamespacedCacheBuilder(strings.Split(namespace, ",")) + options.Cache = cache.Options{ + Namespaces: strings.Split(namespace, ","), + } } // Create a new manager to provide shared dependencies and start components @@ -427,8 +429,9 @@ func setupWebhooks(_ context.Context, mgr manager.Manager) { // register webhook srv := mgr.GetWebhookServer() + decoder := admission.NewDecoder(mgr.GetScheme()) srv.Register("/mutate-v1-deployment", &webhook.Admission{ - Handler: appsv1controllers.NewDeploymentInterceptorWebhook(mgr.GetClient()), + Handler: appsv1controllers.NewDeploymentInterceptorWebhook(mgr.GetClient(), decoder), }) } diff --git a/pkg/controller/jaeger/account_test.go b/pkg/controller/jaeger/account_test.go index 3b36cc2cb..63fd13e8b 100644 --- a/pkg/controller/jaeger/account_test.go +++ b/pkg/controller/jaeger/account_test.go @@ -7,8 +7,8 @@ import ( "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/reconcile" v1 "github.com/jaegertracing/jaeger-operator/apis/v1" @@ -19,7 +19,7 @@ func TestServiceAccountCreate(t *testing.T) { // prepare nsn := types.NamespacedName{Name: "my-instance"} - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), } @@ -66,7 +66,7 @@ func TestServiceAccountUpdate(t *testing.T) { "app.kubernetes.io/managed-by": "jaeger-operator", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), &orig, } @@ -107,7 +107,7 @@ func TestServiceAccountDelete(t *testing.T) { "app.kubernetes.io/managed-by": "jaeger-operator", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), &orig, } @@ -143,7 +143,7 @@ func TestAccountCreateExistingNameInAnotherNamespace(t *testing.T) { Namespace: "tenant2", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), v1.NewJaeger(nsnExisting), &corev1.ServiceAccount{ diff --git a/pkg/controller/jaeger/clusterrolebinding_test.go b/pkg/controller/jaeger/clusterrolebinding_test.go index 82c7633c1..89852095f 100644 --- a/pkg/controller/jaeger/clusterrolebinding_test.go +++ b/pkg/controller/jaeger/clusterrolebinding_test.go @@ -9,8 +9,8 @@ import ( rbac "k8s.io/api/rbac/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/reconcile" v1 "github.com/jaegertracing/jaeger-operator/apis/v1" @@ -26,7 +26,7 @@ func TestClusterRoleBindingsCreate(t *testing.T) { Name: "my-instance", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), } @@ -70,7 +70,7 @@ func TestClusterRoleBindingsSkipped(t *testing.T) { Name: "my-instance", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), } @@ -121,7 +121,7 @@ func TestClusterRoleBindingsUpdate(t *testing.T) { "app.kubernetes.io/managed-by": "jaeger-operator", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), &orig, } @@ -167,7 +167,7 @@ func TestClusterRoleBindingsDelete(t *testing.T) { "app.kubernetes.io/managed-by": "jaeger-operator", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), &orig, } diff --git a/pkg/controller/jaeger/configmap_test.go b/pkg/controller/jaeger/configmap_test.go index 87fc8c767..83545c404 100644 --- a/pkg/controller/jaeger/configmap_test.go +++ b/pkg/controller/jaeger/configmap_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/reconcile" v1 "github.com/jaegertracing/jaeger-operator/apis/v1" @@ -22,7 +22,7 @@ func TestConfigMapsCreate(t *testing.T) { Name: "TestConfigMapsCreate", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), } @@ -71,7 +71,7 @@ func TestConfigMapsUpdate(t *testing.T) { "app.kubernetes.io/managed-by": "jaeger-operator", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), &orig, } @@ -114,7 +114,7 @@ func TestConfigMapsDelete(t *testing.T) { "app.kubernetes.io/managed-by": "jaeger-operator", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), &orig, } @@ -150,7 +150,7 @@ func TestConfigMapCreateExistingNameInAnotherNamespace(t *testing.T) { Namespace: "tenant2", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), v1.NewJaeger(nsnExisting), &corev1.ConfigMap{ @@ -232,7 +232,7 @@ func TestConfigMapsClean(t *testing.T) { "app.kubernetes.io/managed-by": "jaeger-operator", } - objs := []runtime.Object{ + objs := []client.Object{ trustedCAConfig, serviceCAConfig, serviceCAConfigExist, diff --git a/pkg/controller/jaeger/consolelink_test.go b/pkg/controller/jaeger/consolelink_test.go index 74eeebbe6..5c2534d05 100644 --- a/pkg/controller/jaeger/consolelink_test.go +++ b/pkg/controller/jaeger/consolelink_test.go @@ -15,8 +15,8 @@ import ( "github.com/spf13/viper" "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/reconcile" "github.com/jaegertracing/jaeger-operator/pkg/strategy" @@ -31,7 +31,7 @@ func TestConsoleLinkCreate(t *testing.T) { viper.Set(v1.ConfigOperatorScope, v1.OperatorScopeCluster) defer viper.Reset() - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), } @@ -96,7 +96,7 @@ func TestConsoleLinkUpdate(t *testing.T) { "app.kubernetes.io/managed-by": "jaeger-operator", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), &orig, } @@ -153,7 +153,7 @@ func TestConsoleLinkDelete(t *testing.T) { "app.kubernetes.io/managed-by": "jaeger-operator", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), &orig, } @@ -200,7 +200,7 @@ func TestConsoleLinksCreateExistingNameInAnotherNamespace(t *testing.T) { defer viper.Reset() // Existing console link and route - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), v1.NewJaeger(nsnExisting), &osconsolev1.ConsoleLink{ @@ -295,7 +295,7 @@ func TestConsoleLinksSkipped(t *testing.T) { Namespace: namespace, } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), } diff --git a/pkg/controller/jaeger/cronjob_test.go b/pkg/controller/jaeger/cronjob_test.go index e6d1dab9a..dc195cdc7 100644 --- a/pkg/controller/jaeger/cronjob_test.go +++ b/pkg/controller/jaeger/cronjob_test.go @@ -11,6 +11,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/reconcile" v1 "github.com/jaegertracing/jaeger-operator/apis/v1" @@ -27,7 +28,7 @@ func TestCronJobsCreate(t *testing.T) { Name: "TestCronJobsCreate", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), } @@ -81,7 +82,7 @@ func TestCronJobsUpdate(t *testing.T) { "app.kubernetes.io/managed-by": "jaeger-operator", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), &orig, } @@ -127,7 +128,7 @@ func TestCronJobsDelete(t *testing.T) { "app.kubernetes.io/managed-by": "jaeger-operator", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), &orig, } @@ -163,7 +164,7 @@ func TestCronJobsCreateExistingNameInAnotherNamespace(t *testing.T) { Namespace: "tenant2", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), v1.NewJaeger(nsnExisting), &batchv1.CronJob{ @@ -187,7 +188,7 @@ func TestCronJobsCreateExistingNameInAnotherNamespace(t *testing.T) { }, } - var updatedCronJob runtime.Object = cj + var updatedCronJob client.Object = cj cronjobs := []runtime.Object{updatedCronJob} r.strategyChooser = func(ctx context.Context, jaeger *v1.Jaeger) strategy.S { diff --git a/pkg/controller/jaeger/daemonset_test.go b/pkg/controller/jaeger/daemonset_test.go index 463bf2e48..d8a81f69e 100644 --- a/pkg/controller/jaeger/daemonset_test.go +++ b/pkg/controller/jaeger/daemonset_test.go @@ -7,8 +7,8 @@ import ( "github.com/stretchr/testify/assert" appsv1 "k8s.io/api/apps/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/reconcile" v1 "github.com/jaegertracing/jaeger-operator/apis/v1" @@ -21,7 +21,7 @@ func TestDaemonSetsCreate(t *testing.T) { Name: "TestDaemonSetsCreate", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), } @@ -70,7 +70,7 @@ func TestDaemonSetsUpdate(t *testing.T) { "app.kubernetes.io/managed-by": "jaeger-operator", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), &orig, } @@ -113,7 +113,7 @@ func TestDaemonSetsDelete(t *testing.T) { "app.kubernetes.io/managed-by": "jaeger-operator", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), &orig, } @@ -149,7 +149,7 @@ func TestDaemonSetsCreateExistingNameInAnotherNamespace(t *testing.T) { Namespace: "tenant2", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), v1.NewJaeger(nsnExisting), &appsv1.DaemonSet{ diff --git a/pkg/controller/jaeger/dependencies.go b/pkg/controller/jaeger/dependencies.go index 9bbab2af9..ffbea9151 100644 --- a/pkg/controller/jaeger/dependencies.go +++ b/pkg/controller/jaeger/dependencies.go @@ -63,46 +63,52 @@ func (r *ReconcileJaeger) handleDependency(ctx context.Context, str strategy.S, seen := false once := &sync.Once{} - return wait.PollImmediate(time.Second, deadline*time.Second, func() (done bool, err error) { - batch := &batchv1.Job{} - if err = r.client.Get(ctx, types.NamespacedName{Name: dep.Name, Namespace: dep.Namespace}, batch); err != nil { - if k8serrors.IsNotFound(err) { - if seen { - // we have seen this object before, but it doesn't exist anymore! - // we don't have anything else to do here, break the poll - log.Log.V(1).Info( - "Dependency has been removed.", - "namespace", dep.Namespace, - "name", dep.Name, - ) - span.SetStatus(codes.Error, ErrDependencyRemoved.Error()) - return true, ErrDependencyRemoved - } + return wait.PollUntilContextTimeout( + ctx, + time.Second, + deadline*time.Second, + true, + wait.ConditionWithContextFunc( + func(context.Context) (done bool, err error) { + batch := &batchv1.Job{} + if err = r.client.Get(ctx, types.NamespacedName{Name: dep.Name, Namespace: dep.Namespace}, batch); err != nil { + if k8serrors.IsNotFound(err) { + if seen { + // we have seen this object before, but it doesn't exist anymore! + // we don't have anything else to do here, break the poll + log.Log.V(1).Info( + "Dependency has been removed.", + "namespace", dep.Namespace, + "name", dep.Name, + ) + span.SetStatus(codes.Error, ErrDependencyRemoved.Error()) + return true, ErrDependencyRemoved + } - // the object might have not been created yet - log.Log.V(-1).Info( - "Dependency doesn't exist yet.", - "namespace", dep.Namespace, - "name", dep.Name, - ) - return false, nil - } - return false, tracing.HandleError(err, span) - } + // the object might have not been created yet + log.Log.V(-1).Info( + "Dependency doesn't exist yet.", + "namespace", dep.Namespace, + "name", dep.Name, + ) + return false, nil + } + return false, tracing.HandleError(err, span) + } - seen = true - // for now, we just assume each batch job has one pod - if batch.Status.Succeeded != 1 { - once.Do(func() { - log.Log.V(-1).Info( - "Waiting for dependency to complete", - "namespace", dep.Namespace, - "name", dep.Name, - ) - }) - return false, nil - } + seen = true + // for now, we just assume each batch job has one pod + if batch.Status.Succeeded != 1 { + once.Do(func() { + log.Log.V(-1).Info( + "Waiting for dependency to complete", + "namespace", dep.Namespace, + "name", dep.Name, + ) + }) + return false, nil + } - return true, nil - }) + return true, nil + })) } diff --git a/pkg/controller/jaeger/dependencies_test.go b/pkg/controller/jaeger/dependencies_test.go index 5b3538dbe..91044ae3b 100644 --- a/pkg/controller/jaeger/dependencies_test.go +++ b/pkg/controller/jaeger/dependencies_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/assert" batchv1 "k8s.io/api/batch/v1" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/reconcile" v1 "github.com/jaegertracing/jaeger-operator/apis/v1" @@ -22,7 +22,7 @@ func TestHandleDependencies(t *testing.T) { Name: "TestHandleDependencies", } - objs := []runtime.Object{v1.NewJaeger(nsn)} + objs := []client.Object{v1.NewJaeger(nsn)} dep := batchv1.Job{} dep.Name = nsn.Name diff --git a/pkg/controller/jaeger/deployment.go b/pkg/controller/jaeger/deployment.go index 840471b4b..3e328fe22 100644 --- a/pkg/controller/jaeger/deployment.go +++ b/pkg/controller/jaeger/deployment.go @@ -106,53 +106,59 @@ func (r *ReconcileJaeger) waitForStability(ctx context.Context, dep appsv1.Deplo seen := false once := &sync.Once{} - return wait.PollImmediate(time.Second, 5*time.Minute, func() (done bool, err error) { - d := &appsv1.Deployment{} - if err := r.client.Get(ctx, types.NamespacedName{Name: dep.Name, Namespace: dep.Namespace}, d); err != nil { - if k8serrors.IsNotFound(err) { - if seen { - // we have seen this object before, but it doesn't exist anymore! - // we don't have anything else to do here, break the poll - log.Log.V(1).Info( - "Deployment has been removed.", - "namespace", dep.Namespace, - "name", dep.Name, - ) - return true, ErrDeploymentRemoved + return wait.PollUntilContextTimeout( + ctx, + time.Second, + 5*time.Minute, + true, + wait.ConditionWithContextFunc( + func(context.Context) (done bool, err error) { + d := &appsv1.Deployment{} + if err := r.client.Get(ctx, types.NamespacedName{Name: dep.Name, Namespace: dep.Namespace}, d); err != nil { + if k8serrors.IsNotFound(err) { + if seen { + // we have seen this object before, but it doesn't exist anymore! + // we don't have anything else to do here, break the poll + log.Log.V(1).Info( + "Deployment has been removed.", + "namespace", dep.Namespace, + "name", dep.Name, + ) + return true, ErrDeploymentRemoved + } + + // the object might have not been created yet + log.Log.V(-1).Info( + "Deployment doesn't exist yet.", + "namespace", dep.Namespace, + "name", dep.Name, + ) + return false, nil + } + return false, tracing.HandleError(err, span) } - // the object might have not been created yet - log.Log.V(-1).Info( - "Deployment doesn't exist yet.", - "namespace", dep.Namespace, - "name", dep.Name, - ) - return false, nil - } - return false, tracing.HandleError(err, span) - } + seen = true + if d.Status.ReadyReplicas != d.Status.Replicas { + once.Do(func() { + log.Log.V(-1).Info( + "Waiting for deployment to stabilize", + "namespace", dep.Namespace, + "name", dep.Name, + "ready", d.Status.ReadyReplicas, + "desired", d.Status.Replicas, + ) + }) + return false, nil + } - seen = true - if d.Status.ReadyReplicas != d.Status.Replicas { - once.Do(func() { log.Log.V(-1).Info( - "Waiting for deployment to stabilize", + "Deployment has stabilized", "namespace", dep.Namespace, "name", dep.Name, "ready", d.Status.ReadyReplicas, "desired", d.Status.Replicas, ) - }) - return false, nil - } - - log.Log.V(-1).Info( - "Deployment has stabilized", - "namespace", dep.Namespace, - "name", dep.Name, - "ready", d.Status.ReadyReplicas, - "desired", d.Status.Replicas, - ) - return true, nil - }) + return true, nil + })) } diff --git a/pkg/controller/jaeger/deployment_test.go b/pkg/controller/jaeger/deployment_test.go index eafb6c888..9101593d2 100644 --- a/pkg/controller/jaeger/deployment_test.go +++ b/pkg/controller/jaeger/deployment_test.go @@ -9,8 +9,8 @@ import ( "github.com/stretchr/testify/assert" appsv1 "k8s.io/api/apps/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/reconcile" v1 "github.com/jaegertracing/jaeger-operator/apis/v1" @@ -24,7 +24,7 @@ func TestDeploymentCreate(t *testing.T) { Namespace: "tenant1", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), } @@ -76,7 +76,7 @@ func TestDeploymentUpdate(t *testing.T) { "app.kubernetes.io/managed-by": "jaeger-operator", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), &orig, } @@ -120,7 +120,7 @@ func TestDeploymentDelete(t *testing.T) { "app.kubernetes.io/managed-by": "jaeger-operator", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), &orig, } @@ -158,7 +158,7 @@ func TestDeploymentDeleteAfterCreate(t *testing.T) { "app.kubernetes.io/instance": nsn.Name, "app.kubernetes.io/managed-by": "jaeger-operator", } - objs := []runtime.Object{v1.NewJaeger(nsn), &depToDelete} + objs := []client.Object{v1.NewJaeger(nsn), &depToDelete} // the deployment to be created dep := appsv1.Deployment{} @@ -220,7 +220,7 @@ func TestDeploymentCreateExistingNameInAnotherNamespace(t *testing.T) { Namespace: "tenant2", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), v1.NewJaeger(nsnExisting), &appsv1.Deployment{ diff --git a/pkg/controller/jaeger/elasticsearch.go b/pkg/controller/jaeger/elasticsearch.go index e0482fa57..5a1ec3882 100644 --- a/pkg/controller/jaeger/elasticsearch.go +++ b/pkg/controller/jaeger/elasticsearch.go @@ -95,79 +95,85 @@ func waitForAvailableElastic(ctx context.Context, c client.Client, es esv1.Elast seen := false once := &sync.Once{} - return wait.PollImmediate(time.Second, 2*time.Minute, func() (done bool, err error) { - depList := appsv1.DeploymentList{} - labels := map[string]string{ - "cluster-name": es.Name, - "component": "elasticsearch", - } - opts := []client.ListOption{ - client.InNamespace(es.Namespace), - client.MatchingLabels(labels), - } + return wait.PollUntilContextTimeout( + ctx, + time.Second, + 2*time.Minute, + true, + wait.ConditionWithContextFunc( + func(context.Context) (done bool, err error) { + depList := appsv1.DeploymentList{} + labels := map[string]string{ + "cluster-name": es.Name, + "component": "elasticsearch", + } + opts := []client.ListOption{ + client.InNamespace(es.Namespace), + client.MatchingLabels(labels), + } - if err = c.List(ctx, &depList, opts...); err != nil { - if k8serrors.IsNotFound(err) { - if seen { - // we have seen this object before, but it doesn't exist anymore! - // we don't have anything else to do here, break the poll - log.Log.V(1).Info( - "Elasticsearch cluster has been removed.", + if err = c.List(ctx, &depList, opts...); err != nil { + if k8serrors.IsNotFound(err) { + if seen { + // we have seen this object before, but it doesn't exist anymore! + // we don't have anything else to do here, break the poll + log.Log.V(1).Info( + "Elasticsearch cluster has been removed.", + "namespace", es.Namespace, + "name", es.Name, + ) + return true, ErrElasticsearchRemoved + } + + // the object might have not been created yet + log.Log.V(-1).Info( + "Elasticsearch cluster doesn't exist yet.", + "namespace", es.Namespace, + "name", es.Name, + ) + return false, nil + } + return false, tracing.HandleError(err, span) + } + + seen = true + availableDep := int32(0) + for _, d := range depList.Items { + if d.Status.Replicas == d.Status.AvailableReplicas { + availableDep++ + } + } + ssList := appsv1.StatefulSetList{} + if err = c.List(ctx, &ssList, opts...); err != nil { + if k8serrors.IsNotFound(err) { + // the object might have not been created yet + log.Log.V(-1).Info( + "Elasticsearch cluster doesn't exist yet.", + "namespace", es.Namespace, + "name", es.Name, + ) + return false, nil + } + return false, tracing.HandleError(err, span) + } + ssAvailableRep := int32(0) + ssReplicas := int32(0) + for _, s := range ssList.Items { + ssReplicas += *s.Spec.Replicas + ssAvailableRep += s.Status.ReadyReplicas + } + once.Do(func() { + log.Log.V(-1).Info( + "Waiting for Elasticsearch to be available", "namespace", es.Namespace, "name", es.Name, + "desiredESNodes", expectedSize, + "desiredStatefulSetNodes", ssReplicas, + "availableStatefulSetNodes", ssAvailableRep, + "desiredDeploymentNodes", expectedSize-ssReplicas, + "availableDeploymentNodes", availableDep, ) - return true, ErrElasticsearchRemoved - } - - // the object might have not been created yet - log.Log.V(-1).Info( - "Elasticsearch cluster doesn't exist yet.", - "namespace", es.Namespace, - "name", es.Name, - ) - return false, nil - } - return false, tracing.HandleError(err, span) - } - - seen = true - availableDep := int32(0) - for _, d := range depList.Items { - if d.Status.Replicas == d.Status.AvailableReplicas { - availableDep++ - } - } - ssList := appsv1.StatefulSetList{} - if err = c.List(ctx, &ssList, opts...); err != nil { - if k8serrors.IsNotFound(err) { - // the object might have not been created yet - log.Log.V(-1).Info( - "Elasticsearch cluster doesn't exist yet.", - "namespace", es.Namespace, - "name", es.Name, - ) - return false, nil - } - return false, tracing.HandleError(err, span) - } - ssAvailableRep := int32(0) - ssReplicas := int32(0) - for _, s := range ssList.Items { - ssReplicas += *s.Spec.Replicas - ssAvailableRep += s.Status.ReadyReplicas - } - once.Do(func() { - log.Log.V(-1).Info( - "Waiting for Elasticsearch to be available", - "namespace", es.Namespace, - "name", es.Name, - "desiredESNodes", expectedSize, - "desiredStatefulSetNodes", ssReplicas, - "availableStatefulSetNodes", ssAvailableRep, - "desiredDeploymentNodes", expectedSize-ssReplicas, - "availableDeploymentNodes", availableDep, - ) - }) - return availableDep+ssAvailableRep == expectedSize, nil - }) + }) + return availableDep+ssAvailableRep == expectedSize, nil + })) } diff --git a/pkg/controller/jaeger/elasticsearch_test.go b/pkg/controller/jaeger/elasticsearch_test.go index 733d0a4f1..9d24f437b 100644 --- a/pkg/controller/jaeger/elasticsearch_test.go +++ b/pkg/controller/jaeger/elasticsearch_test.go @@ -7,8 +7,8 @@ import ( "github.com/spf13/viper" "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/reconcile" esv1 "github.com/openshift/elasticsearch-operator/apis/logging/v1" @@ -26,7 +26,7 @@ func TestElasticsearchesCreate(t *testing.T) { Name: "TestElasticsearchesCreate", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), } @@ -78,7 +78,7 @@ func TestElasticsearchesUpdate(t *testing.T) { "app.kubernetes.io/part-of": "jaeger", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), &orig, } @@ -124,7 +124,7 @@ func TestElasticsearchesDelete(t *testing.T) { "app.kubernetes.io/part-of": "jaeger", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), &orig, } @@ -163,7 +163,7 @@ func TestElasticsearchesCreateExistingNameInAnotherNamespace(t *testing.T) { Namespace: "tenant2", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), v1.NewJaeger(nsnExisting), &esv1.Elasticsearch{ diff --git a/pkg/controller/jaeger/horizontalpodautoscaler_test.go b/pkg/controller/jaeger/horizontalpodautoscaler_test.go index bda50102f..033ac2f93 100644 --- a/pkg/controller/jaeger/horizontalpodautoscaler_test.go +++ b/pkg/controller/jaeger/horizontalpodautoscaler_test.go @@ -11,6 +11,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/reconcile" v1 "github.com/jaegertracing/jaeger-operator/apis/v1" @@ -25,7 +26,7 @@ func TestHorizontalPodAutoscalerCreateV2(t *testing.T) { Namespace: "tenant1", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), } @@ -71,7 +72,7 @@ func TestHorizontalPodAutoscalerCreateV2Beta2(t *testing.T) { Namespace: "tenant1", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), } @@ -126,7 +127,7 @@ func TestHorizontalPodAutoscalerUpdateV2(t *testing.T) { "app.kubernetes.io/managed-by": "jaeger-operator", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), &orig, } @@ -176,7 +177,7 @@ func TestHorizontalPodAutoscalerUpdateV2Beta2(t *testing.T) { "app.kubernetes.io/managed-by": "jaeger-operator", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), &orig, } @@ -223,7 +224,7 @@ func TestHorizontalPodAutoscalerDeleteV2(t *testing.T) { "app.kubernetes.io/managed-by": "jaeger-operator", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), &orig, } @@ -262,7 +263,7 @@ func TestHorizontalPodAutoscalerDeleteV2Beta2(t *testing.T) { "app.kubernetes.io/managed-by": "jaeger-operator", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), &orig, } @@ -299,7 +300,7 @@ func TestHorizontalPodAutoscalerCreateExistingNameInAnotherNamespaceV2(t *testin Namespace: "tenant2", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), v1.NewJaeger(nsnExisting), &autoscalingv2.HorizontalPodAutoscaler{ @@ -358,7 +359,7 @@ func TestHorizontalPodAutoscalerCreateExistingNameInAnotherNamespaceV2Beta2(t *t Namespace: "tenant2", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), v1.NewJaeger(nsnExisting), &autoscalingv2beta2.HorizontalPodAutoscaler{ diff --git a/pkg/controller/jaeger/ingress_test.go b/pkg/controller/jaeger/ingress_test.go index c71256590..03223c667 100644 --- a/pkg/controller/jaeger/ingress_test.go +++ b/pkg/controller/jaeger/ingress_test.go @@ -7,8 +7,8 @@ import ( "github.com/stretchr/testify/assert" networkingv1 "k8s.io/api/networking/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/reconcile" v1 "github.com/jaegertracing/jaeger-operator/apis/v1" @@ -21,7 +21,7 @@ func TestIngressesCreate(t *testing.T) { Name: "TestIngressesCreate", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), } @@ -70,7 +70,7 @@ func TestIngressesUpdate(t *testing.T) { "app.kubernetes.io/managed-by": "jaeger-operator", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), &orig, } @@ -113,7 +113,7 @@ func TestIngressesDelete(t *testing.T) { "app.kubernetes.io/managed-by": "jaeger-operator", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), &orig, } @@ -149,7 +149,7 @@ func TestIngressesCreateExistingNameInAnotherNamespace(t *testing.T) { Namespace: "tenant2", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), v1.NewJaeger(nsnExisting), &networkingv1.Ingress{ diff --git a/pkg/controller/jaeger/jaeger_controller_test.go b/pkg/controller/jaeger/jaeger_controller_test.go index 14d5cc116..d8532b371 100644 --- a/pkg/controller/jaeger/jaeger_controller_test.go +++ b/pkg/controller/jaeger/jaeger_controller_test.go @@ -15,7 +15,6 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/kubernetes/scheme" "sigs.k8s.io/controller-runtime/pkg/client" @@ -65,7 +64,7 @@ func TestReconcileSyncOnJaegerChanges(t *testing.T) { Name: "TestNewJaegerInstance", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), } @@ -97,7 +96,7 @@ func TestSyncOnJaegerChanges(t *testing.T) { Name: "my-instance", }) - objs := []runtime.Object{ + objs := []client.Object{ &corev1.Namespace{ObjectMeta: metav1.ObjectMeta{ Name: "ns-with-annotation", Annotations: map[string]string{ @@ -171,7 +170,7 @@ func TestSyncOnJaegerChanges(t *testing.T) { ) cl := &modifiedClient{ - Client: fake.NewClientBuilder().WithRuntimeObjects(objs...).Build(), + Client: fake.NewClientBuilder().WithObjects(objs...).Build(), listErr: errList, getErr: errGet, } @@ -202,7 +201,7 @@ func TestNewJaegerInstance(t *testing.T) { Name: "TestNewJaegerInstance", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), } @@ -279,7 +278,7 @@ func TestSetOwnerOnNewInstance(t *testing.T) { s := scheme.Scheme s.AddKnownTypes(v1.GroupVersion, jaeger) - cl := fake.NewClientBuilder().WithObjects(jaeger).Build() + cl := fake.NewClientBuilder().WithStatusSubresource(jaeger).WithObjects(jaeger).Build() r := &ReconcileJaeger{client: cl, scheme: s, rClient: cl} req := reconcile.Request{NamespacedName: nsn} @@ -379,7 +378,7 @@ func TestElasticsearchProvisioning(t *testing.T) { j.Spec.Storage.Elasticsearch.Name = "elasticserach" j.Spec.Storage.Elasticsearch.NodeCount = 1 - reconciler, cl := getReconciler([]runtime.Object{j}) + reconciler, cl := getReconciler([]client.Object{j}) req := reconcile.Request{NamespacedName: namespacedName} result, err := reconciler.Reconcile(req) @@ -415,7 +414,7 @@ func createSecret(secretNamespace, secretName string) corev1.Secret { } } -func getReconciler(objs []runtime.Object) (*ReconcileJaeger, client.Client) { +func getReconciler(objs []client.Object) (*ReconcileJaeger, client.Client) { s := scheme.Scheme // OpenShift Route @@ -433,7 +432,8 @@ func getReconciler(objs []runtime.Object) (*ReconcileJaeger, client.Client) { // Kafka s.AddKnownTypes(v1beta2.GroupVersion, &v1beta2.Kafka{}, &v1beta2.KafkaList{}, &v1beta2.KafkaUser{}, &v1beta2.KafkaUserList{}) - cl := fake.NewClientBuilder().WithScheme(s).WithRuntimeObjects(objs...).Build() + cl := fake.NewClientBuilder().WithScheme(s).WithStatusSubresource(objs...).WithObjects(objs...).Build() + r := New(cl, cl, s) r.certGenerationScript = "../../../scripts/cert_generation.sh" return r, cl diff --git a/pkg/controller/jaeger/kafka.go b/pkg/controller/jaeger/kafka.go index 3669ee9b0..e4f4bc2f1 100644 --- a/pkg/controller/jaeger/kafka.go +++ b/pkg/controller/jaeger/kafka.go @@ -103,56 +103,62 @@ func (r *ReconcileJaeger) waitForKafkaStability(ctx context.Context, kafka kafka seen := false once := &sync.Once{} - return wait.PollImmediate(time.Second, 5*time.Minute, func() (done bool, err error) { - k := &kafkav1beta2.Kafka{} - if err := r.client.Get(ctx, types.NamespacedName{Name: kafka.GetName(), Namespace: kafka.GetNamespace()}, k); err != nil { - if k8serrors.IsNotFound(err) { - if seen { - // we have seen this object before, but it doesn't exist anymore! - // we don't have anything else to do here, break the poll - log.Log.V(1).Info( - "kafka has been removed.", - "namespace", kafka.GetNamespace(), - "name", kafka.GetName(), - ) - return true, ErrKafkaRemoved + return wait.PollUntilContextTimeout( + ctx, + time.Second, + 5*time.Minute, + true, + wait.ConditionWithContextFunc( + func(context.Context) (done bool, err error) { + k := &kafkav1beta2.Kafka{} + if err := r.client.Get(ctx, types.NamespacedName{Name: kafka.GetName(), Namespace: kafka.GetNamespace()}, k); err != nil { + if k8serrors.IsNotFound(err) { + if seen { + // we have seen this object before, but it doesn't exist anymore! + // we don't have anything else to do here, break the poll + log.Log.V(1).Info( + "kafka has been removed.", + "namespace", kafka.GetNamespace(), + "name", kafka.GetName(), + ) + return true, ErrKafkaRemoved + } + + // the object might have not been created yet + log.Log.V(-1).Info( + "kafka doesn't exist yet.", + "namespace", kafka.GetNamespace(), + "name", kafka.GetName(), + ) + return false, nil + } + return false, tracing.HandleError(err, span) } - // the object might have not been created yet - log.Log.V(-1).Info( - "kafka doesn't exist yet.", - "namespace", kafka.GetNamespace(), - "name", kafka.GetName(), - ) - return false, nil - } - return false, tracing.HandleError(err, span) - } + seen = true + readyCondition := getReadyCondition(k.Status.Conditions) + if !strings.EqualFold(readyCondition.Status, "true") { + once.Do(func() { + log.Log.V(-1).Info( + "Waiting for kafka to stabilize", + "namespace", k.GetNamespace(), + "name", k.GetName(), + "conditionStatus", readyCondition.Status, + "conditionType", readyCondition.Type, + ) + }) + return false, nil + } - seen = true - readyCondition := getReadyCondition(k.Status.Conditions) - if !strings.EqualFold(readyCondition.Status, "true") { - once.Do(func() { log.Log.V(-1).Info( - "Waiting for kafka to stabilize", + "kafka has stabilized", "namespace", k.GetNamespace(), "name", k.GetName(), "conditionStatus", readyCondition.Status, "conditionType", readyCondition.Type, ) - }) - return false, nil - } - - log.Log.V(-1).Info( - "kafka has stabilized", - "namespace", k.GetNamespace(), - "name", k.GetName(), - "conditionStatus", readyCondition.Status, - "conditionType", readyCondition.Type, - ) - return true, nil - }) + return true, nil + })) } func getReadyCondition(conditions []kafkav1beta2.KafkaStatusCondition) kafkav1beta2.KafkaStatusCondition { diff --git a/pkg/controller/jaeger/kafka_test.go b/pkg/controller/jaeger/kafka_test.go index ff93f29ac..71f5d7c4b 100644 --- a/pkg/controller/jaeger/kafka_test.go +++ b/pkg/controller/jaeger/kafka_test.go @@ -7,8 +7,8 @@ import ( "github.com/spf13/viper" "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/reconcile" v1 "github.com/jaegertracing/jaeger-operator/apis/v1" @@ -27,7 +27,7 @@ func TestKafkaCreate(t *testing.T) { Namespace: "tenant1", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), } @@ -101,7 +101,7 @@ func TestKafkaUpdate(t *testing.T) { }, } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), &orig, } @@ -168,7 +168,7 @@ func TestKafkaDelete(t *testing.T) { }, } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), &orig, } @@ -207,7 +207,7 @@ func TestKafkaCreateExistingNameInAnotherNamespace(t *testing.T) { Namespace: "tenant2", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), v1.NewJaeger(nsnExisting), &v1beta2.Kafka{ diff --git a/pkg/controller/jaeger/kafkauser.go b/pkg/controller/jaeger/kafkauser.go index 1df888b1e..3239b1f15 100644 --- a/pkg/controller/jaeger/kafkauser.go +++ b/pkg/controller/jaeger/kafkauser.go @@ -99,54 +99,60 @@ func (r *ReconcileJaeger) waitForKafkaUserStability(ctx context.Context, kafkaUs seen := false once := &sync.Once{} - return wait.PollImmediate(time.Second, 5*time.Minute, func() (done bool, err error) { - k := &kafkav1beta2.KafkaUser{} - if err := r.client.Get(ctx, types.NamespacedName{Name: kafkaUser.GetName(), Namespace: kafkaUser.GetNamespace()}, k); err != nil { - if k8serrors.IsNotFound(err) { - if seen { - // we have seen this object before, but it doesn't exist anymore! - // we don't have anything else to do here, break the poll - log.Log.V(1).Info( - "kafka user secret has been removed.", - "namespace", kafkaUser.GetNamespace(), - "name", kafkaUser.GetName(), - ) - return true, ErrKafkaUserRemoved + return wait.PollUntilContextTimeout( + ctx, + time.Second, + 5*time.Minute, + true, + wait.ConditionWithContextFunc( + func(context.Context) (done bool, err error) { + k := &kafkav1beta2.KafkaUser{} + if err := r.client.Get(ctx, types.NamespacedName{Name: kafkaUser.GetName(), Namespace: kafkaUser.GetNamespace()}, k); err != nil { + if k8serrors.IsNotFound(err) { + if seen { + // we have seen this object before, but it doesn't exist anymore! + // we don't have anything else to do here, break the poll + log.Log.V(1).Info( + "kafka user secret has been removed.", + "namespace", kafkaUser.GetNamespace(), + "name", kafkaUser.GetName(), + ) + return true, ErrKafkaUserRemoved + } + + // the object might have not been created yet + log.Log.V(-1).Info( + "kafka user secret doesn't exist yet.", + "namespace", kafkaUser.GetNamespace(), + "name", kafkaUser.GetName(), + ) + return false, nil + } + return false, tracing.HandleError(err, span) } - // the object might have not been created yet - log.Log.V(-1).Info( - "kafka user secret doesn't exist yet.", - "namespace", kafkaUser.GetNamespace(), - "name", kafkaUser.GetName(), - ) - return false, nil - } - return false, tracing.HandleError(err, span) - } + seen = true + readyCondition := getReadyCondition(k.Status.Conditions) + if !strings.EqualFold(readyCondition.Status, "true") { + once.Do(func() { + log.Log.V(-1).Info( + "Waiting for kafka user to stabilize", + "namespace", k.GetNamespace(), + "name", k.GetName(), + "conditionStatus", readyCondition.Status, + "conditionType", readyCondition.Type, + ) + }) + return false, nil + } - seen = true - readyCondition := getReadyCondition(k.Status.Conditions) - if !strings.EqualFold(readyCondition.Status, "true") { - once.Do(func() { log.Log.V(-1).Info( - "Waiting for kafka user to stabilize", + "kafka user has stabilized", "namespace", k.GetNamespace(), "name", k.GetName(), "conditionStatus", readyCondition.Status, "conditionType", readyCondition.Type, ) - }) - return false, nil - } - - log.Log.V(-1).Info( - "kafka user has stabilized", - "namespace", k.GetNamespace(), - "name", k.GetName(), - "conditionStatus", readyCondition.Status, - "conditionType", readyCondition.Type, - ) - return true, nil - }) + return true, nil + })) } diff --git a/pkg/controller/jaeger/kafkauser_test.go b/pkg/controller/jaeger/kafkauser_test.go index 2986c47b7..f80da073c 100644 --- a/pkg/controller/jaeger/kafkauser_test.go +++ b/pkg/controller/jaeger/kafkauser_test.go @@ -7,8 +7,8 @@ import ( "github.com/spf13/viper" "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/reconcile" v1 "github.com/jaegertracing/jaeger-operator/apis/v1" @@ -27,7 +27,7 @@ func TestKafkaUserCreate(t *testing.T) { Namespace: "tenant1", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), } @@ -101,7 +101,7 @@ func TestKafkaUserUpdate(t *testing.T) { }, } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), &orig, } @@ -167,7 +167,7 @@ func TestKafkaUserDelete(t *testing.T) { }, } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), &orig, } @@ -206,7 +206,7 @@ func TestKafkaUserCreateExistingNameInAnotherNamespace(t *testing.T) { Namespace: "tenant2", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), v1.NewJaeger(nsnExisting), &v1beta2.KafkaUser{ diff --git a/pkg/controller/jaeger/route_test.go b/pkg/controller/jaeger/route_test.go index e96e7d96b..620702876 100644 --- a/pkg/controller/jaeger/route_test.go +++ b/pkg/controller/jaeger/route_test.go @@ -8,8 +8,8 @@ import ( "github.com/spf13/viper" "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/reconcile" v1 "github.com/jaegertracing/jaeger-operator/apis/v1" @@ -25,7 +25,7 @@ func TestRoutesCreate(t *testing.T) { Name: "TestRoutesCreate", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), } @@ -77,7 +77,7 @@ func TestRoutesUpdate(t *testing.T) { "app.kubernetes.io/managed-by": "jaeger-operator", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), &orig, } @@ -123,7 +123,7 @@ func TestRoutesDelete(t *testing.T) { "app.kubernetes.io/managed-by": "jaeger-operator", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), &orig, } @@ -162,7 +162,7 @@ func TestRoutesCreateExistingNameInAnotherNamespace(t *testing.T) { Namespace: "tenant2", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), v1.NewJaeger(nsnExisting), &osv1.Route{ diff --git a/pkg/controller/jaeger/secret_test.go b/pkg/controller/jaeger/secret_test.go index 7032f52ad..e03ddf3ef 100644 --- a/pkg/controller/jaeger/secret_test.go +++ b/pkg/controller/jaeger/secret_test.go @@ -7,8 +7,8 @@ import ( "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/reconcile" v1 "github.com/jaegertracing/jaeger-operator/apis/v1" @@ -21,7 +21,7 @@ func TestSecretsCreate(t *testing.T) { Name: "TestSecretsCreate", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), } @@ -70,7 +70,7 @@ func TestSecretsUpdate(t *testing.T) { "app.kubernetes.io/managed-by": "jaeger-operator", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), &orig, } @@ -113,7 +113,7 @@ func TestSecretsDelete(t *testing.T) { "app.kubernetes.io/managed-by": "jaeger-operator", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), &orig, } @@ -149,7 +149,7 @@ func TestSecretsCreateExistingNameInAnotherNamespace(t *testing.T) { Namespace: "tenant2", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), v1.NewJaeger(nsnExisting), &corev1.Secret{ diff --git a/pkg/controller/jaeger/service_test.go b/pkg/controller/jaeger/service_test.go index 3efc5f710..f00a08406 100644 --- a/pkg/controller/jaeger/service_test.go +++ b/pkg/controller/jaeger/service_test.go @@ -7,8 +7,8 @@ import ( "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/reconcile" v1 "github.com/jaegertracing/jaeger-operator/apis/v1" @@ -21,7 +21,7 @@ func TestServicesCreate(t *testing.T) { Name: "TestServicesCreate", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), } @@ -70,7 +70,7 @@ func TestServicesUpdate(t *testing.T) { "app.kubernetes.io/managed-by": "jaeger-operator", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), &orig, } @@ -113,7 +113,7 @@ func TestServicesDelete(t *testing.T) { "app.kubernetes.io/managed-by": "jaeger-operator", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), &orig, } @@ -149,7 +149,7 @@ func TestServicesCreateExistingNameInAnotherNamespace(t *testing.T) { Namespace: "tenant2", } - objs := []runtime.Object{ + objs := []client.Object{ v1.NewJaeger(nsn), v1.NewJaeger(nsnExisting), &corev1.Service{ diff --git a/pkg/upgrade/upgrade_test.go b/pkg/upgrade/upgrade_test.go index 3bb752012..7da66756a 100644 --- a/pkg/upgrade/upgrade_test.go +++ b/pkg/upgrade/upgrade_test.go @@ -31,12 +31,12 @@ func TestVersionUpgradeToLatest(t *testing.T) { cl := fake.NewClientBuilder().WithScheme(s).WithRuntimeObjects(objs...).Build() // test - assert.NoError(t, ManagedInstances(context.Background(), cl, cl, opver.Get().Jaeger)) + assert.NoError(t, ManagedInstances(context.Background(), cl, cl, "1.12.0")) // verify persisted := &v1.Jaeger{} assert.NoError(t, cl.Get(context.Background(), nsn, persisted)) - assert.Equal(t, opver.Get().Jaeger, persisted.Status.Version) + assert.Equal(t, "1.12.0", persisted.Status.Version) } func TestVersionUpgradeToLatestMultinamespace(t *testing.T) { @@ -59,12 +59,12 @@ func TestVersionUpgradeToLatestMultinamespace(t *testing.T) { cl := fake.NewClientBuilder().WithScheme(s).WithRuntimeObjects(objs...).Build() // test - assert.NoError(t, ManagedInstances(context.Background(), cl, cl, opver.Get().Jaeger)) + assert.NoError(t, ManagedInstances(context.Background(), cl, cl, "1.12.0")) // verify persisted := &v1.Jaeger{} assert.NoError(t, cl.Get(context.Background(), nsn, persisted)) - assert.Equal(t, opver.Get().Jaeger, persisted.Status.Version) + assert.Equal(t, "1.12.0", persisted.Status.Version) } func TestVersionUpgradeToLatestOwnedResource(t *testing.T) { @@ -87,12 +87,12 @@ func TestVersionUpgradeToLatestOwnedResource(t *testing.T) { cl := fake.NewClientBuilder().WithScheme(s).WithRuntimeObjects(objs...).Build() // test - assert.NoError(t, ManagedInstances(context.Background(), cl, cl, opver.Get().Jaeger)) + assert.NoError(t, ManagedInstances(context.Background(), cl, cl, "1.12.0")) // verify persisted := &v1.Jaeger{} assert.NoError(t, cl.Get(context.Background(), nsn, persisted)) - assert.Equal(t, opver.Get().Jaeger, persisted.Status.Version) + assert.Equal(t, "1.12.0", persisted.Status.Version) } func TestUnknownVersion(t *testing.T) { @@ -109,7 +109,7 @@ func TestUnknownVersion(t *testing.T) { cl := fake.NewClientBuilder().WithScheme(s).WithRuntimeObjects(objs...).Build() // test - assert.NoError(t, ManagedInstances(context.Background(), cl, cl, opver.Get().Jaeger)) + assert.NoError(t, ManagedInstances(context.Background(), cl, cl, "1.12.0")) // verify persisted := &v1.Jaeger{} diff --git a/tests/assert-jobs/utils/testhttp.go b/tests/assert-jobs/utils/testhttp.go index 7ed74bd76..0b4114034 100644 --- a/tests/assert-jobs/utils/testhttp.go +++ b/tests/assert-jobs/utils/testhttp.go @@ -1,6 +1,7 @@ package utils import ( + "context" "crypto/tls" "fmt" "io" @@ -44,69 +45,75 @@ func TestGetHTTP(url string, params *TestParams, testFn func(response *http.Resp logrus.Info("Polling to ", url) - return wait.Poll(params.RetryInterval, params.Timeout, func() (done bool, err error) { - logrus.Info("Doing request number ", retries) - - res, err := client.Do(req) - if err != nil && strings.Contains(err.Error(), "Timeout exceeded") { - failed = true - logrus.Warn("Timeout exceeded!") - } else if res != nil && res.StatusCode != http.StatusOK { - err = fmt.Errorf("unexpected status code %d", res.StatusCode) - failed = true - logrus.Warn("Status code: ", res.StatusCode) - } else if err != nil { - failed = true - logrus.Warn("Something failed during doing the request: ", err.Error()) - } - - if failed { - failed = false - retries++ - if retries > maxRetries { - return false, err - } - return false, nil - } - - body, err := io.ReadAll(res.Body) - if len(body) == 0 { - failed = true - err = fmt.Errorf("empty body response") - logrus.Warn("Empty body response") - } else if err != nil { - failed = true - logrus.Warn("Something failed reading the response: ", err.Error()) - } - - if failed { - failed = false - retries++ - if retries > maxRetries { - return false, err - } - return false, nil - } - - ok, err := testFn(res, body) - if ok { - return true, nil - } - retries++ - - if retries > maxRetries { - logrus.Warn("Something failed while executing the test function: ", err.Error()) - return false, err - } - - if err == nil { - logrus.Warn("The condition of the test function was not accomplished") - } else { - logrus.Warn("There test function returned an error:", err.Error()) - } - - return false, nil - }) + return wait.PollUntilContextTimeout( + context.Background(), + params.RetryInterval, + params.Timeout, + true, + wait.ConditionWithContextFunc( + func(context.Context) (done bool, err error) { + logrus.Info("Doing request number ", retries) + + res, err := client.Do(req) + if err != nil && strings.Contains(err.Error(), "Timeout exceeded") { + failed = true + logrus.Warn("Timeout exceeded!") + } else if res != nil && res.StatusCode != http.StatusOK { + err = fmt.Errorf("unexpected status code %d", res.StatusCode) + failed = true + logrus.Warn("Status code: ", res.StatusCode) + } else if err != nil { + failed = true + logrus.Warn("Something failed during doing the request: ", err.Error()) + } + + if failed { + failed = false + retries++ + if retries > maxRetries { + return false, err + } + return false, nil + } + + body, err := io.ReadAll(res.Body) + if len(body) == 0 { + failed = true + err = fmt.Errorf("empty body response") + logrus.Warn("Empty body response") + } else if err != nil { + failed = true + logrus.Warn("Something failed reading the response: ", err.Error()) + } + + if failed { + failed = false + retries++ + if retries > maxRetries { + return false, err + } + return false, nil + } + + ok, err := testFn(res, body) + if ok { + return true, nil + } + retries++ + + if retries > maxRetries { + logrus.Warn("Something failed while executing the test function: ", err.Error()) + return false, err + } + + if err == nil { + logrus.Warn("The condition of the test function was not accomplished") + } else { + logrus.Warn("There test function returned an error:", err.Error()) + } + + return false, nil + })) } // WaitUntilRestAPIAvailable blocks the execution until the Jaeger REST API is @@ -124,33 +131,39 @@ func WaitUntilRestAPIAvailable(jaegerEndpoint string) error { maxRetries := 5 retries := 0 - err := wait.Poll(time.Second*5, time.Minute*5, func() (done bool, err error) { - req, err := http.NewRequest(http.MethodGet, jaegerEndpoint, nil) - if err != nil { - return false, err - } - - resp, err := client.Do(req) - - // The GET HTTP verb is not supported by the Jaeger Collector REST API - // enpoint. An error 404 or 405 means the REST API is there - if resp != nil && (resp.StatusCode == 404 || resp.StatusCode == 405) { - logrus.Debugln("Endpoint available!") - return true, nil - } - - if err != nil { - logrus.Warningln("Something failed while reaching", jaegerEndpoint, ":", err) - - if retries < maxRetries { - retries++ + err := wait.PollUntilContextTimeout( + context.Background(), + time.Second*5, + time.Minute*5, + true, + wait.ConditionWithContextFunc( + func(context.Context) (done bool, err error) { + req, err := http.NewRequest(http.MethodGet, jaegerEndpoint, nil) + if err != nil { + return false, err + } + + resp, err := client.Do(req) + + // The GET HTTP verb is not supported by the Jaeger Collector REST API + // enpoint. An error 404 or 405 means the REST API is there + if resp != nil && (resp.StatusCode == 404 || resp.StatusCode == 405) { + logrus.Debugln("Endpoint available!") + return true, nil + } + + if err != nil { + logrus.Warningln("Something failed while reaching", jaegerEndpoint, ":", err) + + if retries < maxRetries { + retries++ + return false, nil + } + return false, err + } + + logrus.Warningln(jaegerEndpoint, "is not available") return false, nil - } - return false, err - } - - logrus.Warningln(jaegerEndpoint, "is not available") - return false, nil - }) + })) return err } diff --git a/tests/cmd-utils/wait-cronjob/main.go b/tests/cmd-utils/wait-cronjob/main.go index 4a890ca69..1ce131264 100644 --- a/tests/cmd-utils/wait-cronjob/main.go +++ b/tests/cmd-utils/wait-cronjob/main.go @@ -39,61 +39,64 @@ func checkCronJobExists(clientset *kubernetes.Clientset) error { logrus.Debugln("Checking if the", cronjobName, "CronJob exists") - err := wait.Poll(retryInterval, timeout, func() (done bool, err error) { - ctxWithTimeout, cancel := context.WithTimeout(context.Background(), timeout) - defer cancel() - - beta1v1JobsFound := true - cronjobsV1beta1, err := clientset.BatchV1beta1().CronJobs(namespace).List(ctxWithTimeout, metav1.ListOptions{}) - if err != nil { - beta1v1JobsFound = false - if apierrors.IsNotFound(err) { - logrus.Debug("No BatchV1beta1/Cronjobs were found") - } - } - - if beta1v1JobsFound { - for _, cronjob := range cronjobsV1beta1.Items { - if cronjob.Name == cronjobName { - return true, nil + err := wait.PollUntilContextTimeout( + context.Background(), + retryInterval, + timeout, + true, + wait.ConditionWithContextFunc( + func(context.Context) (done bool, err error) { + beta1v1JobsFound := true + cronjobsV1beta1, err := clientset.BatchV1beta1().CronJobs(namespace).List(context.Background(), metav1.ListOptions{}) + if err != nil { + beta1v1JobsFound = false + if apierrors.IsNotFound(err) { + logrus.Debug("No BatchV1beta1/Cronjobs were found") + } } - } - logrus.Warningln("The BatchV1beta1/Cronjob", cronjobName, "was not found") + if beta1v1JobsFound { + for _, cronjob := range cronjobsV1beta1.Items { + if cronjob.Name == cronjobName { + return true, nil + } + } + + logrus.Warningln("The BatchV1beta1/Cronjob", cronjobName, "was not found") + + if cronjobsV1beta1.Size() > 0 { + logrus.Debugln("Found BatchV1beta1/Cronjobs:") + for _, cronjob := range cronjobsV1beta1.Items { + logrus.Debugln("\t", cronjob.Name) + } + } + } + + cronjobsV1, err := clientset.BatchV1().CronJobs(namespace).List(context.Background(), metav1.ListOptions{}) + if err != nil { + if apierrors.IsNotFound(err) { + logrus.Debug("No BatchV1/Cronjobs were found") + return false, err + } + } - if cronjobsV1beta1.Size() > 0 { - logrus.Debugln("Found BatchV1beta1/Cronjobs:") - for _, cronjob := range cronjobsV1beta1.Items { - logrus.Debugln("\t", cronjob.Name) + for _, cronjob := range cronjobsV1.Items { + if cronjob.Name == cronjobName { + return true, nil + } } - } - } - - cronjobsV1, err := clientset.BatchV1().CronJobs(namespace).List(ctxWithTimeout, metav1.ListOptions{}) - if err != nil { - if apierrors.IsNotFound(err) { - logrus.Debug("No BatchV1/Cronjobs were found") - return false, err - } - } - - for _, cronjob := range cronjobsV1.Items { - if cronjob.Name == cronjobName { - return true, nil - } - } - - logrus.Warningln("The BatchV1/Cronjob", cronjobName, "was not found") - - if cronjobsV1.Size() > 0 { - logrus.Debugln("Found BatchV/Cronjobs:") - for _, cronjob := range cronjobsV1.Items { - logrus.Debugln("\t", cronjob.Name) - } - } - - return false, nil - }) + + logrus.Warningln("The BatchV1/Cronjob", cronjobName, "was not found") + + if cronjobsV1.Size() > 0 { + logrus.Debugln("Found BatchV/Cronjobs:") + for _, cronjob := range cronjobsV1.Items { + logrus.Debugln("\t", cronjob.Name) + } + } + + return false, nil + })) logrus.Infoln("Cronjob", cronjobName, "found successfully") return err @@ -109,45 +112,48 @@ func waitForNextJob(clientset *kubernetes.Clientset) error { start := time.Now() logrus.Debugln("Waiting for the next scheduled job from", cronjobName, "cronjob") - err := wait.Poll(retryInterval, timeout, func() (done bool, err error) { - ctxWithTimeout, cancel := context.WithTimeout(context.Background(), timeout) - defer cancel() - - jobList, err := clientset.BatchV1().Jobs(namespace).List(ctxWithTimeout, metav1.ListOptions{}) - if err != nil { - if apierrors.IsNotFound(err) { - logrus.Debug("No jobs provided by the Kubernetes API") - return false, nil - } - return false, err - } - - for _, j := range jobList.Items { - for _, r := range j.OwnerReferences { - // Check if this job is related to the desired CronJob - if cronjobName != r.Name { - continue + err := wait.PollUntilContextTimeout( + context.Background(), + retryInterval, + timeout, + true, + wait.ConditionWithContextFunc( + func(context.Context) (done bool, err error) { + jobList, err := clientset.BatchV1().Jobs(namespace).List(context.Background(), metav1.ListOptions{}) + if err != nil { + if apierrors.IsNotFound(err) { + logrus.Debug("No jobs provided by the Kubernetes API") + return false, nil + } + return false, err } - // Check if the job has finished properly - if j.Status.Succeeded == 0 || j.Status.Failed != 0 || j.Status.Active != 0 { - continue - } + for _, j := range jobList.Items { + for _, r := range j.OwnerReferences { + // Check if this job is related to the desired CronJob + if cronjobName != r.Name { + continue + } - timeSinceCompleted := j.Status.CompletionTime.Sub(start) + // Check if the job has finished properly + if j.Status.Succeeded == 0 || j.Status.Failed != 0 || j.Status.Active != 0 { + continue + } - // The job finished before this program started. We are interested in a newer execution - if timeSinceCompleted <= 0 { - continue - } + timeSinceCompleted := j.Status.CompletionTime.Sub(start) - return true, nil - } - } + // The job finished before this program started. We are interested in a newer execution + if timeSinceCompleted <= 0 { + continue + } - logrus.Debugln("Waiting for next job from", cronjobName, "to succeed") - return false, nil - }) + return true, nil + } + } + + logrus.Debugln("Waiting for next job from", cronjobName, "to succeed") + return false, nil + })) logrus.Infoln("Job of owner", cronjobName, "succeeded after", cronjobName, time.Since(start)) return err }