From d85239ec696594a332f6c1a9b3c79413ba7b2909 Mon Sep 17 00:00:00 2001 From: Knative Automation Date: Tue, 18 Jul 2023 15:12:10 +0100 Subject: [PATCH] upgrade to latest dependencies (#1493) bumping knative.dev/caching 046f174...c6d1f7c: > c6d1f7c Update community files (# 765) > 1581c18 Update community files (# 764) bumping knative.dev/serving a34bfd1...294cb9c: > 294cb9c Add log example for kourier and gateway-api (# 14178) > c0556c2 EnsureCleanup can skip clean up (# 14171) > 8d87d57 Update net-gateway-api nightly (# 14158) > de37d1e Update net-istio nightly (# 14173) > ac01fdb Update community files (# 14175) > b7c6b23 Update net-kourier nightly (# 14174) > 1183ad0 Update net-certmanager nightly (# 14172) > a7613e4 Update community files (# 14169) > c68d8f8 Update net-contour nightly (# 14165) > e5ad1c4 Update net-istio nightly (# 14164) > 6673893 Update net-certmanager nightly (# 14162) bumping knative.dev/hack 12cd6a1...ddae802: > ddae802 Update community files (# 302) > 8852371 Update community files (# 301) bumping knative.dev/eventing ed05a35...de75496: > de75496 Function CopySecretWithName for creating secrets with specific name (# 7002) > 6833ee6 Convert tls secret names to constants (# 7086) > 90721ab [main] Update community files (# 7088) > 4541f4f [main] Update community files (# 7087) bumping knative.dev/pkg 5ef4812...7051d30: > 7051d30 Update community files (# 2764) > b7a11d4 Update community files (# 2763) Signed-off-by: Knative Automation --- go.mod | 10 +++++----- go.sum | 20 +++++++++---------- .../knative.dev/eventing/pkg/utils/secret.go | 19 ++++++++++++++---- vendor/knative.dev/serving/test/cleanup.go | 8 ++++---- vendor/modules.txt | 10 +++++----- 5 files changed, 39 insertions(+), 28 deletions(-) diff --git a/go.mod b/go.mod index f0a7573e44..8177b8364f 100644 --- a/go.mod +++ b/go.mod @@ -21,11 +21,11 @@ require ( k8s.io/client-go v0.26.5 k8s.io/code-generator v0.26.5 k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2 - knative.dev/caching v0.0.0-20230710201812-046f174fe866 - knative.dev/eventing v0.37.1-0.20230710092738-ed05a353ea4d - knative.dev/hack v0.0.0-20230710131339-12cd6a1f789c - knative.dev/pkg v0.0.0-20230710013638-5ef4812a4fe9 - knative.dev/serving v0.37.1-0.20230711130713-a34bfd100ad0 + knative.dev/caching v0.0.0-20230712131715-c6d1f7cc01c2 + knative.dev/eventing v0.37.1-0.20230717151218-de75496e18fd + knative.dev/hack v0.0.0-20230712131415-ddae80293c43 + knative.dev/pkg v0.0.0-20230712131115-7051d301e7f4 + knative.dev/serving v0.37.1-0.20230713131514-294cb9c08b37 sigs.k8s.io/yaml v1.3.0 ) diff --git a/go.sum b/go.sum index ddc6b27c67..1b460d2308 100644 --- a/go.sum +++ b/go.sum @@ -1437,18 +1437,18 @@ k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2 h1:GfD9OzL11kvZN5iArC6oTS7RTj7oJOIfnislxYlqTj8= k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -knative.dev/caching v0.0.0-20230710201812-046f174fe866 h1:btfVJ0VfKPT2VRHF0PXZMAj2towulWJG3zdN4daDdVM= -knative.dev/caching v0.0.0-20230710201812-046f174fe866/go.mod h1:+g+BFOksDR4KjC0PbHhVBlgUDnZXtSN8sjaJIYCfpRM= -knative.dev/eventing v0.37.1-0.20230710092738-ed05a353ea4d h1:kmrAAdim+/5YZeZBDDbaj9XlAtgw2tHm5ToZC81tueM= -knative.dev/eventing v0.37.1-0.20230710092738-ed05a353ea4d/go.mod h1:qdgFteB1E2/K0TfweX9zDX3An6PkzsQ/a4xEWkitusk= -knative.dev/hack v0.0.0-20230710131339-12cd6a1f789c h1:jd+ogsbIZTtBVFf3IdQq0uC6+COpFzQjCAWkctuITeY= -knative.dev/hack v0.0.0-20230710131339-12cd6a1f789c/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q= +knative.dev/caching v0.0.0-20230712131715-c6d1f7cc01c2 h1:gbA6Ioidy8TbePvdt7ZQtIrWGsD0lD9guOcRp5y9pvI= +knative.dev/caching v0.0.0-20230712131715-c6d1f7cc01c2/go.mod h1:+g+BFOksDR4KjC0PbHhVBlgUDnZXtSN8sjaJIYCfpRM= +knative.dev/eventing v0.37.1-0.20230717151218-de75496e18fd h1:oy1lvDGcZwHtu1rWcsU/3N4upiix9sznNg0y4wz2qyE= +knative.dev/eventing v0.37.1-0.20230717151218-de75496e18fd/go.mod h1:qdgFteB1E2/K0TfweX9zDX3An6PkzsQ/a4xEWkitusk= +knative.dev/hack v0.0.0-20230712131415-ddae80293c43 h1:3SE06uNfSFGm/5XS+0trbyCUpgsOaBeyhPQU8FPNFz8= +knative.dev/hack v0.0.0-20230712131415-ddae80293c43/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q= knative.dev/networking v0.0.0-20230710015341-b2cce924227a h1:l3yIUSoxxU+y1OBYRDirwM3XY9zturWvjiKkFha+BWk= knative.dev/networking v0.0.0-20230710015341-b2cce924227a/go.mod h1:cSrqxaHRb/SSNd19YS3tJq6YHoQIqlRpWv4v9OXmhDg= -knative.dev/pkg v0.0.0-20230710013638-5ef4812a4fe9 h1:2T60dQFvSz7MS0M2pgLNMbxtv4Rn2zskjQH8kB/wTkg= -knative.dev/pkg v0.0.0-20230710013638-5ef4812a4fe9/go.mod h1:eXobTqst4aI7CNa6W7sG73VhEsHGWPSrkefeMTb++a0= -knative.dev/serving v0.37.1-0.20230711130713-a34bfd100ad0 h1:QCZFPPUmNCRggssykSCu1bQrgVtSEYQPaco6GZzlrRc= -knative.dev/serving v0.37.1-0.20230711130713-a34bfd100ad0/go.mod h1:KzM8JVJDX87Mx4ACwG3R3TypDYiZgz6PZOdnyIcPwi8= +knative.dev/pkg v0.0.0-20230712131115-7051d301e7f4 h1:oO/BQJpVCFTSTMHF/S6u+nPtIvbHDTsvbPZvdCZAFjs= +knative.dev/pkg v0.0.0-20230712131115-7051d301e7f4/go.mod h1:eXobTqst4aI7CNa6W7sG73VhEsHGWPSrkefeMTb++a0= +knative.dev/serving v0.37.1-0.20230713131514-294cb9c08b37 h1:tzEO9XdOvGlPj9jAa61BlSi3Gq7SQ5pVnWWntVv74P4= +knative.dev/serving v0.37.1-0.20230713131514-294cb9c08b37/go.mod h1:KzM8JVJDX87Mx4ACwG3R3TypDYiZgz6PZOdnyIcPwi8= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= pgregory.net/rapid v0.3.3 h1:jCjBsY4ln4Atz78QoBWxUEvAHaFyNDQg9+WU62aCn1U= pgregory.net/rapid v0.3.3/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU= diff --git a/vendor/knative.dev/eventing/pkg/utils/secret.go b/vendor/knative.dev/eventing/pkg/utils/secret.go index b8063edd9c..f3cadedf5f 100644 --- a/vendor/knative.dev/eventing/pkg/utils/secret.go +++ b/vendor/knative.dev/eventing/pkg/utils/secret.go @@ -34,6 +34,17 @@ import ( // It'll either return a pointer to the new Secret or and error indicating // why it couldn't do it. func CopySecret(corev1Input clientcorev1.CoreV1Interface, srcNS string, srcSecretName string, tgtNS string, svcAccount string) (*corev1.Secret, error) { + return CopySecretWithName(corev1Input, + srcNS, + srcSecretName, + tgtNS, + srcSecretName, /* Use same target name as source by default */ + svcAccount) +} + +// CopySecretWithName will copy a secret from one namespace into another. +// Allows for specifying target secret name. +func CopySecretWithName(corev1Input clientcorev1.CoreV1Interface, srcNS, srcSecretName, tgtNS, tgtSecretName, svcAccount string) (*corev1.Secret, error) { tgtNamespaceSvcAcct := corev1Input.ServiceAccounts(tgtNS) srcSecrets := corev1Input.Secrets(srcNS) tgtNamespaceSecrets := corev1Input.Secrets(tgtNS) @@ -54,7 +65,7 @@ func CopySecret(corev1Input clientcorev1.CoreV1Interface, srcNS string, srcSecre context.Background(), &corev1.Secret{ ObjectMeta: metav1.ObjectMeta{ - Name: srcSecretName, + Name: tgtSecretName, }, Data: srcSecret.Data, Type: srcSecret.Type, @@ -72,14 +83,14 @@ func CopySecret(corev1Input clientcorev1.CoreV1Interface, srcNS string, srcSecre } for _, secret := range tgtSvcAccount.ImagePullSecrets { - if secret.Name == srcSecretName { + if secret.Name == tgtSecretName { return newSecret, nil } } // Prevent overwriting existing imagePullSecrets - patch := `[{"op":"add","path":"/imagePullSecrets/-","value":{"name":"` + srcSecretName + `"}}]` + patch := `[{"op":"add","path":"/imagePullSecrets/-","value":{"name":"` + tgtSecretName + `"}}]` if len(tgtSvcAccount.ImagePullSecrets) == 0 { - patch = `[{"op":"add","path":"/imagePullSecrets","value":[{"name":"` + srcSecretName + `"}]}]` + patch = `[{"op":"add","path":"/imagePullSecrets","value":[{"name":"` + tgtSecretName + `"}]}]` } _, err = tgtNamespaceSvcAcct.Patch(context.Background(), svcAccount, types.JSONPatchType, []byte(patch), metav1.PatchOptions{}) diff --git a/vendor/knative.dev/serving/test/cleanup.go b/vendor/knative.dev/serving/test/cleanup.go index b24a183226..980463b08f 100644 --- a/vendor/knative.dev/serving/test/cleanup.go +++ b/vendor/knative.dev/serving/test/cleanup.go @@ -73,6 +73,10 @@ func TearDown(clients *Clients, names *ResourceNames) { // EnsureCleanup will run the provided cleanup function when the test ends, // either via t.Cleanup or on interrupt via CleanupOnInterrupt. func EnsureCleanup(t *testing.T, cleanup func()) { + if ServingFlags.SkipCleanupOnFail { + t.Log("skipping cleanup") + return + } t.Cleanup(cleanup) CleanupOnInterrupt(cleanup) } @@ -81,10 +85,6 @@ func EnsureCleanup(t *testing.T, cleanup func()) { // t.Cleanup, or on interrupt via CleanupOnInterrupt. func EnsureTearDown(t *testing.T, clients *Clients, names *ResourceNames) { EnsureCleanup(t, func() { - if ServingFlags.SkipCleanupOnFail { - t.Log("skipping cleanup") - return - } TearDown(clients, names) }) } diff --git a/vendor/modules.txt b/vendor/modules.txt index d4220a2651..58d1d36592 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1245,11 +1245,11 @@ k8s.io/utils/net k8s.io/utils/pointer k8s.io/utils/strings/slices k8s.io/utils/trace -# knative.dev/caching v0.0.0-20230710201812-046f174fe866 +# knative.dev/caching v0.0.0-20230712131715-c6d1f7cc01c2 ## explicit; go 1.18 knative.dev/caching/pkg/apis/caching knative.dev/caching/pkg/apis/caching/v1alpha1 -# knative.dev/eventing v0.37.1-0.20230710092738-ed05a353ea4d +# knative.dev/eventing v0.37.1-0.20230717151218-de75496e18fd ## explicit; go 1.19 knative.dev/eventing/pkg/apis/config knative.dev/eventing/pkg/apis/duck @@ -1338,7 +1338,7 @@ knative.dev/eventing/test/upgrade/prober/wathola/fetcher knative.dev/eventing/test/upgrade/prober/wathola/forwarder knative.dev/eventing/test/upgrade/prober/wathola/receiver knative.dev/eventing/test/upgrade/prober/wathola/sender -# knative.dev/hack v0.0.0-20230710131339-12cd6a1f789c +# knative.dev/hack v0.0.0-20230712131415-ddae80293c43 ## explicit; go 1.18 knative.dev/hack knative.dev/hack/shell @@ -1357,7 +1357,7 @@ knative.dev/networking/pkg/http/probe knative.dev/networking/pkg/http/proxy knative.dev/networking/pkg/http/stats knative.dev/networking/pkg/k8s -# knative.dev/pkg v0.0.0-20230710013638-5ef4812a4fe9 +# knative.dev/pkg v0.0.0-20230712131115-7051d301e7f4 ## explicit; go 1.18 knative.dev/pkg/apiextensions/storageversion knative.dev/pkg/apiextensions/storageversion/cmd/migrate @@ -1437,7 +1437,7 @@ knative.dev/pkg/webhook knative.dev/pkg/webhook/certificates knative.dev/pkg/webhook/certificates/resources knative.dev/pkg/webhook/resourcesemantics/conversion -# knative.dev/serving v0.37.1-0.20230711130713-a34bfd100ad0 +# knative.dev/serving v0.37.1-0.20230713131514-294cb9c08b37 ## explicit; go 1.18 knative.dev/serving/pkg/apis/autoscaling knative.dev/serving/pkg/apis/autoscaling/v1alpha1