Skip to content

Commit

Permalink
upgrade to latest dependencies (#274)
Browse files Browse the repository at this point in the history
bumping knative.dev/pkg 4a03844...9d7bd23:
  > 9d7bd23 [release-1.7] Fix nil pointer deref in drain when it's reset (# 2652)
  > 5f92031 [release-1.7] gofmt with go1.19 (# 2650)
  > 3b65316 [release-1.7] Function AllowRestrictedPodSecurityStandard for modifying test pods (# 2636)
bumping knative.dev/operator 2cd27fd...0c153ec:
  > 0c153ec [release-1.7] Refactor the ingress service for istio (# 1243)
  > b85644c [release-1.7] Update the fetcher to pick the correct kafka sources (# 1239)
  > 181137c [release-1.7] Update the manifests for 1.7 (# 1203)

Signed-off-by: Knative Automation <[email protected]>
  • Loading branch information
knative-automation authored Apr 19, 2023
1 parent 91be5e3 commit 03d6abb
Show file tree
Hide file tree
Showing 12 changed files with 66 additions and 60 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ require (
k8s.io/apimachinery v0.23.9
k8s.io/client-go v0.23.9
knative.dev/hack v0.0.0-20220823140917-8d1e4ccf9dc3
knative.dev/operator v0.34.0
knative.dev/pkg v0.0.0-20220818004048-4a03844c0b15
knative.dev/operator v0.34.2
knative.dev/pkg v0.0.0-20221123011941-9d7bd235ceed
)

require (
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1306,10 +1306,10 @@ k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 h1:HNSDgDCrr/6Ly3WEGKZftiE7IY19V
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
knative.dev/hack v0.0.0-20220823140917-8d1e4ccf9dc3 h1:umaeMRecA0g5g48L9tnEAkTBIitr9eKWMyJYo9YttAA=
knative.dev/hack v0.0.0-20220823140917-8d1e4ccf9dc3/go.mod h1:t/azP8I/Cygaw+87O7rkAPrNRjCelmtfSzWzu/9TM7I=
knative.dev/operator v0.34.0 h1:2ESasSzUJNyP1/qL7uyqUB+KejtKDDwT5YYjTojRntE=
knative.dev/operator v0.34.0/go.mod h1:ckL4a4vE9L1Pt+jL4o2NgCOUcBYoZicEVIENA204+ec=
knative.dev/pkg v0.0.0-20220818004048-4a03844c0b15 h1:GNmzHVaUo3zoi/wtIN71LPQaWy6DdoYzmb+GIq2s4fw=
knative.dev/pkg v0.0.0-20220818004048-4a03844c0b15/go.mod h1:YLjXbkQLlGHok+u0FLfMbBHFzY9WGu3GHhnrptoAy8I=
knative.dev/operator v0.34.2 h1:d60TzrmN3t/R4qYD6Z0bJ5xDebdcyU99vtmiCf8Bbm0=
knative.dev/operator v0.34.2/go.mod h1:ckL4a4vE9L1Pt+jL4o2NgCOUcBYoZicEVIENA204+ec=
knative.dev/pkg v0.0.0-20221123011941-9d7bd235ceed h1:Xk4DRdbRdI7Ky8vOGQK4S3nUHTRRpTjRMsK+9Zif94s=
knative.dev/pkg v0.0.0-20221123011941-9d7bd235ceed/go.mod h1:M+Amt1YZl5Nkl6+5FDFVIPaivsk2o5K/cIzOVq6Nsg0=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
Expand Down
6 changes: 3 additions & 3 deletions vendor/knative.dev/pkg/apis/duck/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ type Populatable = ducktypes.Populatable
// the provided Implementable duck type. It is expected that under the resource
// definition implementing a particular "Fooable" that one would write:
//
// type ConcreteResource struct { ... }
// type ConcreteResource struct { ... }
//
// // Check that ConcreteResource properly implement Fooable.
// err := duck.VerifyType(&ConcreteResource{}, &something.Fooable{})
// // Check that ConcreteResource properly implement Fooable.
// err := duck.VerifyType(&ConcreteResource{}, &something.Fooable{})
//
// This will return an error if the duck typing is not satisfied.
func VerifyType(instance interface{}, iface Implementable) error {
Expand Down
52 changes: 29 additions & 23 deletions vendor/knative.dev/pkg/apis/field_error.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,12 @@ var _ error = (*FieldError)(nil)

// ViaField is used to propagate a validation error along a field access.
// For example, if a type recursively validates its "spec" via:
// if err := foo.Spec.Validate(); err != nil {
// // Augment any field paths with the context that they were accessed
// // via "spec".
// return err.ViaField("spec")
// }
//
// if err := foo.Spec.Validate(); err != nil {
// // Augment any field paths with the context that they were accessed
// // via "spec".
// return err.ViaField("spec")
// }
func (fe *FieldError) ViaField(prefix ...string) *FieldError {
if fe == nil {
return nil
Expand All @@ -114,11 +115,12 @@ func (fe *FieldError) ViaField(prefix ...string) *FieldError {

// ViaIndex is used to attach an index to the next ViaField provided.
// For example, if a type recursively validates a parameter that has a collection:
// for i, c := range spec.Collection {
// if err := doValidation(c); err != nil {
// return err.ViaIndex(i).ViaField("collection")
// }
// }
//
// for i, c := range spec.Collection {
// if err := doValidation(c); err != nil {
// return err.ViaIndex(i).ViaField("collection")
// }
// }
func (fe *FieldError) ViaIndex(index int) *FieldError {
return fe.ViaField(asIndex(index))
}
Expand All @@ -130,11 +132,12 @@ func (fe *FieldError) ViaFieldIndex(field string, index int) *FieldError {

// ViaKey is used to attach a key to the next ViaField provided.
// For example, if a type recursively validates a parameter that has a collection:
// for k, v := range spec.Bag {
// if err := doValidation(v); err != nil {
// return err.ViaKey(k).ViaField("bag")
// }
// }
//
// for k, v := range spec.Bag {
// if err := doValidation(v); err != nil {
// return err.ViaKey(k).ViaField("bag")
// }
// }
func (fe *FieldError) ViaKey(key string) *FieldError {
return fe.ViaField(asKey(key))
}
Expand All @@ -145,7 +148,8 @@ func (fe *FieldError) ViaFieldKey(field, key string) *FieldError {
}

// At is a way to alter the level of the diagnostics held in this FieldError.
// ErrMissingField("foo").At(WarningLevel)
//
// ErrMissingField("foo").At(WarningLevel)
func (fe *FieldError) At(l DiagnosticLevel) *FieldError {
if fe == nil {
return nil
Expand All @@ -166,9 +170,10 @@ func (fe *FieldError) At(l DiagnosticLevel) *FieldError {
}

// Filter is a way to access the set of diagnostics having a particular level.
// if err := x.Validate(ctx).Filter(ErrorLevel); err != nil {
// return err
// }
//
// if err := x.Validate(ctx).Filter(ErrorLevel); err != nil {
// return err
// }
func (fe *FieldError) Filter(l DiagnosticLevel) *FieldError {
if fe == nil {
return nil
Expand Down Expand Up @@ -282,10 +287,11 @@ func asKey(key string) string {

// flatten takes in a array of path components and looks for chances to flatten
// objects that have index prefixes, examples:
// err([0]).ViaField(bar).ViaField(foo) -> foo.bar.[0] converts to foo.bar[0]
// err(bar).ViaIndex(0).ViaField(foo) -> foo.[0].bar converts to foo[0].bar
// err(bar).ViaField(foo).ViaIndex(0) -> [0].foo.bar converts to [0].foo.bar
// err(bar).ViaIndex(0).ViaIndex(1).ViaField(foo) -> foo.[1].[0].bar converts to foo[1][0].bar
//
// err([0]).ViaField(bar).ViaField(foo) -> foo.bar.[0] converts to foo.bar[0]
// err(bar).ViaIndex(0).ViaField(foo) -> foo.[0].bar converts to foo[0].bar
// err(bar).ViaField(foo).ViaIndex(0) -> [0].foo.bar converts to [0].foo.bar
// err(bar).ViaIndex(0).ViaIndex(1).ViaField(foo) -> foo.[1].[0].bar converts to foo[1][0].bar
func flatten(path []string) string {
var newPath []string
for _, part := range path {
Expand Down
4 changes: 2 additions & 2 deletions vendor/knative.dev/pkg/configmap/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ limitations under the License.

// Package configmap exists to facilitate consuming Kubernetes ConfigMap
// resources in various ways, including:
// - Watching them for changes over time, and
// - Loading them from a VolumeMount.
// - Watching them for changes over time, and
// - Loading them from a VolumeMount.
package configmap
3 changes: 1 addition & 2 deletions vendor/knative.dev/pkg/configmap/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ limitations under the License.
package configmap

import (
"io/ioutil"
"os"
"path"
"path/filepath"
Expand Down Expand Up @@ -47,7 +46,7 @@ func Load(p string) (map[string]string, error) {
if info.IsDir() {
return nil
}
b, err := ioutil.ReadFile(p)
b, err := os.ReadFile(p)
if err != nil {
return err
}
Expand Down
4 changes: 2 additions & 2 deletions vendor/knative.dev/pkg/configmap/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type Logger interface {
// Constructors is a map for specifying configmap names to
// their function constructors
//
// The values of this map must be functions with the definition
// # The values of this map must be functions with the definition
//
// func(*k8s.io/api/core/v1.ConfigMap) (... , error)
//
Expand All @@ -60,7 +60,7 @@ type UntypedStore struct {
// NewUntypedStore creates an UntypedStore with given name,
// Logger and Constructors
//
// The Logger must not be nil
// # The Logger must not be nil
//
// The values in the Constructors map must be functions with
// the definition
Expand Down
6 changes: 4 additions & 2 deletions vendor/knative.dev/pkg/test/ingress/ingress.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ const (
// GetIngressEndpoint gets the ingress public IP or hostname.
// address - is the endpoint to which we should actually connect.
// portMap - translates the request's port to the port on address to which the caller
// should connect. This is used when the resolution to address goes through some
// sort of port-mapping, e.g. Kubernetes node ports.
//
// should connect. This is used when the resolution to address goes through some
// sort of port-mapping, e.g. Kubernetes node ports.
//
// err - an error when address/portMap cannot be established.
func GetIngressEndpoint(ctx context.Context, kubeClientset kubernetes.Interface, endpointOverride string) (address string, portMap func(string) string, err error) {
ingressName := istioIngressName
Expand Down
3 changes: 1 addition & 2 deletions vendor/knative.dev/pkg/test/spoof/spoof.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
"errors"
"fmt"
"io"
"io/ioutil"
"net"
"net/http"
"net/url"
Expand Down Expand Up @@ -188,7 +187,7 @@ func (sc *SpoofingClient) Poll(req *http.Request, inState ResponseChecker, check
}
defer rawResp.Body.Close()

body, err := ioutil.ReadAll(rawResp.Body)
body, err := io.ReadAll(rawResp.Body)
if err != nil {
return true, err
}
Expand Down
7 changes: 3 additions & 4 deletions vendor/knative.dev/pkg/test/zipkin/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@ This package exposes following methods:
A general flow for a Test Suite to use Zipkin Tracing support is as follows:
1. Call SetupZipkinTracing(kubernetes.Interface) in TestMain.
2. Use SpoofingClient to make HTTP requests.
3. Call CleanupZipkinTracingSetup on cleanup after tests are executed.
1. Call SetupZipkinTracing(kubernetes.Interface) in TestMain.
2. Use SpoofingClient to make HTTP requests.
3. Call CleanupZipkinTracingSetup on cleanup after tests are executed.
*/
package zipkin
25 changes: 13 additions & 12 deletions vendor/knative.dev/pkg/test/zipkin/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"context"
"encoding/json"
"fmt"
"io/ioutil"
"io"
"net/http"
"net/url"
"strconv"
Expand Down Expand Up @@ -110,9 +110,10 @@ func SetupZipkinTracingFromConfigTracingOrFail(ctx context.Context, t testing.TB
}

// SetupZipkinTracing sets up zipkin tracing which involves:
// 1. Setting up port-forwarding from localhost to zipkin pod on the cluster
// (pid of the process doing Port-Forward is stored in a global variable).
// 2. Enable AlwaysSample config for tracing for the SpoofingClient.
// 1. Setting up port-forwarding from localhost to zipkin pod on the cluster
// (pid of the process doing Port-Forward is stored in a global variable).
// 2. Enable AlwaysSample config for tracing for the SpoofingClient.
//
// The zipkin deployment must have the label app=zipkin
func SetupZipkinTracing(ctx context.Context, kubeClientset kubernetes.Interface, logf logging.FormatLogger, zipkinRemotePort int, zipkinNamespace string) (err error) {
setupOnce.Do(func() {
Expand Down Expand Up @@ -152,13 +153,13 @@ func SetupZipkinTracingOrFail(ctx context.Context, t testing.TB, kubeClientset k
// CleanupZipkinTracingSetup cleans up the Zipkin tracing setup on the machine. This involves killing the process performing port-forward.
// This should be called exactly once in TestMain. Likely in the form:
//
// func TestMain(m *testing.M) {
// os.Exit(func() int {
// // Any setup required for the tests.
// defer zipkin.CleanupZipkinTracingSetup(logger)
// return m.Run()
// }())
// }
// func TestMain(m *testing.M) {
// os.Exit(func() int {
// // Any setup required for the tests.
// defer zipkin.CleanupZipkinTracingSetup(logger)
// return m.Run()
// }())
// }
func CleanupZipkinTracingSetup(logf logging.FormatLogger) {
teardownOnce.Do(func() {
// Because CleanupZipkinTracingSetup only runs once, make sure that now that it has been
Expand Down Expand Up @@ -226,7 +227,7 @@ func jsonTrace(traceID string) ([]model.SpanModel, error) {
}
defer resp.Body.Close()

body, err := ioutil.ReadAll(resp.Body)
body, err := io.ReadAll(resp.Body)
if err != nil {
return empty, err
}
Expand Down
4 changes: 2 additions & 2 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ k8s.io/utils/trace
# knative.dev/hack v0.0.0-20220823140917-8d1e4ccf9dc3
## explicit; go 1.17
knative.dev/hack
# knative.dev/operator v0.34.0
# knative.dev/operator v0.34.2
## explicit; go 1.18
knative.dev/operator/pkg/apis/operator
knative.dev/operator/pkg/apis/operator/base
Expand All @@ -527,7 +527,7 @@ knative.dev/operator/pkg/client/clientset/versioned/scheme
knative.dev/operator/pkg/client/clientset/versioned/typed/operator/v1beta1
knative.dev/operator/test
knative.dev/operator/test/client
# knative.dev/pkg v0.0.0-20220818004048-4a03844c0b15
# knative.dev/pkg v0.0.0-20221123011941-9d7bd235ceed
## explicit; go 1.18
knative.dev/pkg/apis
knative.dev/pkg/apis/duck
Expand Down

0 comments on commit 03d6abb

Please sign in to comment.