Skip to content

Commit 8a0e236

Browse files
upgrade to latest dependencies
bumping knative.dev/serving a4c4491...4853ead: > 4853ead Fix labels and annotations propagation to k8s service on update (# 15908) bumping knative.dev/eventing b4c0bfe...d499be4: > d499be4 [release-1.18] Fix mt-broker-ingress auth to work with structured event too (# 8714) > d952cdf [release-1.18] fix: containersource template labels are correctly set on deployment (# 8645) > 9b25049 [release-1.18] Adding addressable duck on crd (# 8604) Signed-off-by: Knative Automation <[email protected]>
1 parent 028d57f commit 8a0e236

File tree

6 files changed

+53
-40
lines changed

6 files changed

+53
-40
lines changed

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ require (
2121
k8s.io/client-go v0.32.2
2222
k8s.io/code-generator v0.32.2
2323
knative.dev/caching v0.0.0-20250415164313-8f20a1163dbf
24-
knative.dev/eventing v0.45.1
24+
knative.dev/eventing v0.45.4
2525
knative.dev/hack v0.0.0-20250331013814-c577ed9f7775
2626
knative.dev/pkg v0.0.0-20250415155312-ed3e2158b883
2727
knative.dev/reconciler-test v0.0.0-20250415170512-23f86169156f
28-
knative.dev/serving v0.45.0
28+
knative.dev/serving v0.45.1
2929
sigs.k8s.io/yaml v1.4.0
3030
)
3131

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1716,8 +1716,8 @@ k8s.io/utils v0.0.0-20241210054802-24370beab758 h1:sdbE21q2nlQtFh65saZY+rRM6x6aJ
17161716
k8s.io/utils v0.0.0-20241210054802-24370beab758/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
17171717
knative.dev/caching v0.0.0-20250415164313-8f20a1163dbf h1:qQnKB6mx+beHzsoKU8aKrRU0oWAfgzKG2JgWMzr8CrM=
17181718
knative.dev/caching v0.0.0-20250415164313-8f20a1163dbf/go.mod h1:q8ma7YxJ8Dofr+5kf3qR72A/7Zxl9uqQlOdMwNgCXY4=
1719-
knative.dev/eventing v0.45.1 h1:XhGrwcRaROkqgGnB/njAyMnpdSaWI01QQvCpjQ7Mz+4=
1720-
knative.dev/eventing v0.45.1/go.mod h1:Fz5VjV/vWVN93UfTX3lzc+uFrvJ9wxiiKrRIPhQxoj8=
1719+
knative.dev/eventing v0.45.4 h1:M0HjsFipG6AD+ZMYRXqbSsQfBK4BXlFGEQcsCDlR9mk=
1720+
knative.dev/eventing v0.45.4/go.mod h1:Fz5VjV/vWVN93UfTX3lzc+uFrvJ9wxiiKrRIPhQxoj8=
17211721
knative.dev/hack v0.0.0-20250331013814-c577ed9f7775 h1:UstB8/aowofYFHjLyZdPh1K7qB9BCx+lP1WuiCspYRE=
17221722
knative.dev/hack v0.0.0-20250331013814-c577ed9f7775/go.mod h1:R0ritgYtjLDO9527h5vb5X6gfvt5LCrJ55BNbVDsWiY=
17231723
knative.dev/networking v0.0.0-20250415164913-6268d931d247 h1:BQcW8ur+WAmj6GCpYHyUyWoaJWVTs/75W1EObUV/bdA=
@@ -1726,8 +1726,8 @@ knative.dev/pkg v0.0.0-20250415155312-ed3e2158b883 h1:UeOY7009M0EHwdyW3P35Fc1U6F
17261726
knative.dev/pkg v0.0.0-20250415155312-ed3e2158b883/go.mod h1:ptwLYr04MAyeoRvhnhhz0FFkVZTdYJV2QWnw9sZyFSM=
17271727
knative.dev/reconciler-test v0.0.0-20250415170512-23f86169156f h1:4JZHD997Yav2K6JJU93sjxvcPXNHVY4lC1dWhzyeBXg=
17281728
knative.dev/reconciler-test v0.0.0-20250415170512-23f86169156f/go.mod h1:jrNdg5OPDhfxYxXDLqA4iv9zvfLhNYpYKmaQvz4ZpRM=
1729-
knative.dev/serving v0.45.0 h1:+eOEwSE5+NmhQUUfARHGdSI1gwavddiPMKjl4+sHCjE=
1730-
knative.dev/serving v0.45.0/go.mod h1:AGpRclBUrrSx4KNiyDzAR4DlmENqLKrSNllnBP+h3yw=
1729+
knative.dev/serving v0.45.1 h1:tDbEZEzWeQ3KAhOZato5p7Jahdks9imerPBsiDUhkzk=
1730+
knative.dev/serving v0.45.1/go.mod h1:AGpRclBUrrSx4KNiyDzAR4DlmENqLKrSNllnBP+h3yw=
17311731
nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0=
17321732
pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw=
17331733
pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04=

vendor/knative.dev/eventing/pkg/auth/verifier.go

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ limitations under the License.
1717
package auth
1818

1919
import (
20-
"bytes"
2120
"context"
2221
"encoding/json"
2322
"fmt"
@@ -31,6 +30,7 @@ import (
3130
"go.opencensus.io/plugin/ochttp"
3231
corev1listers "k8s.io/client-go/listers/core/v1"
3332
"knative.dev/eventing/pkg/eventingtls"
33+
"knative.dev/eventing/pkg/utils"
3434
"knative.dev/pkg/configmap"
3535
"knative.dev/pkg/network"
3636
"knative.dev/pkg/tracing/propagation/tracecontextb3"
@@ -160,7 +160,7 @@ func (v *Verifier) verifyAuthN(ctx context.Context, audience *string, req *http.
160160
// verifyAuthZ verifies if the given idToken is allowed by the resources eventPolicyStatus
161161
func (v *Verifier) verifyAuthZ(ctx context.Context, features feature.Flags, idToken *IDToken, resourceNamespace string, policyRefs []duckv1.AppliedEventPolicyRef, req *http.Request, resp http.ResponseWriter) error {
162162
if len(policyRefs) > 0 {
163-
req, err := copyRequest(req)
163+
req, err := utils.CopyRequest(req)
164164
if err != nil {
165165
resp.WriteHeader(http.StatusInternalServerError)
166166
return fmt.Errorf("failed to copy request body: %w", err)
@@ -332,35 +332,6 @@ func (v *Verifier) getKubernetesOIDCDiscovery(features feature.Flags, client *ht
332332
return openIdConfig, nil
333333
}
334334

335-
// copyRequest makes a copy of the http request which can be consumed as needed, leaving the original request
336-
// able to be consumed as well.
337-
func copyRequest(req *http.Request) (*http.Request, error) {
338-
// check if we actually need to copy the body, otherwise we can return the original request
339-
if req.Body == nil || req.Body == http.NoBody {
340-
return req, nil
341-
}
342-
343-
var buf bytes.Buffer
344-
if _, err := buf.ReadFrom(req.Body); err != nil {
345-
return nil, fmt.Errorf("failed to read request body while copying it: %w", err)
346-
}
347-
348-
if err := req.Body.Close(); err != nil {
349-
return nil, fmt.Errorf("failed to close original request body ready while copying request: %w", err)
350-
}
351-
352-
// set the original request body to be readable again
353-
req.Body = io.NopCloser(&buf)
354-
355-
// return a new request with a readable body and same headers as the original
356-
// we don't need to set any other fields as cloudevents only uses the headers
357-
// and body to construct the Message/Event.
358-
return &http.Request{
359-
Header: req.Header,
360-
Body: io.NopCloser(bytes.NewReader(buf.Bytes())),
361-
}, nil
362-
}
363-
364335
type openIDMetadata struct {
365336
Issuer string `json:"issuer"`
366337
JWKSURI string `json:"jwks_uri"`

vendor/knative.dev/eventing/pkg/utils/utils.go

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ limitations under the License.
1717
package utils
1818

1919
import (
20+
"bytes"
21+
"fmt"
22+
"io"
23+
"net/http"
2024
"regexp"
2125
"strings"
2226

@@ -91,3 +95,32 @@ func GenerateFixedName(owner metav1.Object, prefix string) string {
9195
// A dot must be followed by [a-z0-9] to be DNS1123 compliant. Make sure we are not joining a dot and a dash.
9296
return strings.TrimSuffix(prefix, ".") + uid
9397
}
98+
99+
// CopyRequest makes a copy of the http request which can be consumed as needed, leaving the original request
100+
// able to be consumed as well.
101+
func CopyRequest(req *http.Request) (*http.Request, error) {
102+
// check if we actually need to copy the body, otherwise we can return the original request
103+
if req.Body == nil || req.Body == http.NoBody {
104+
return req, nil
105+
}
106+
107+
var buf bytes.Buffer
108+
if _, err := buf.ReadFrom(req.Body); err != nil {
109+
return nil, fmt.Errorf("failed to read request body while copying it: %w", err)
110+
}
111+
112+
if err := req.Body.Close(); err != nil {
113+
return nil, fmt.Errorf("failed to close original request body ready while copying request: %w", err)
114+
}
115+
116+
// set the original request body to be readable again
117+
req.Body = io.NopCloser(&buf)
118+
119+
// return a new request with a readable body and same headers as the original
120+
// we don't need to set any other fields as cloudevents only uses the headers
121+
// and body to construct the Message/Event.
122+
return &http.Request{
123+
Header: req.Header,
124+
Body: io.NopCloser(bytes.NewReader(buf.Bytes())),
125+
}, nil
126+
}

vendor/knative.dev/serving/pkg/testing/v1/service.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ func WithServiceAnnotation(k, v string) ServiceOption {
145145
}
146146
}
147147

148-
// WithServiceAnnotationRemoved adds the given annotation to the service.
148+
// WithServiceAnnotationRemoved removes the given annotation from the service.
149149
func WithServiceAnnotationRemoved(k string) ServiceOption {
150150
return func(svc *v1.Service) {
151151
svc.Annotations = kmeta.FilterMap(svc.Annotations, func(s string) bool {
@@ -154,6 +154,15 @@ func WithServiceAnnotationRemoved(k string) ServiceOption {
154154
}
155155
}
156156

157+
// WithServiceLabelRemoved removes the given label from the service.
158+
func WithServiceLabelRemoved(k string) ServiceOption {
159+
return func(svc *v1.Service) {
160+
svc.Labels = kmeta.FilterMap(svc.Labels, func(s string) bool {
161+
return k == s
162+
})
163+
}
164+
}
165+
157166
// WithServiceImage sets the container image to be the provided string.
158167
func WithServiceImage(img string) ServiceOption {
159168
return func(svc *v1.Service) {

vendor/modules.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1432,7 +1432,7 @@ k8s.io/utils/trace
14321432
## explicit; go 1.23.0
14331433
knative.dev/caching/pkg/apis/caching
14341434
knative.dev/caching/pkg/apis/caching/v1alpha1
1435-
# knative.dev/eventing v0.45.1
1435+
# knative.dev/eventing v0.45.4
14361436
## explicit; go 1.23.0
14371437
knative.dev/eventing/cmd/heartbeats
14381438
knative.dev/eventing/pkg/apis
@@ -1659,7 +1659,7 @@ knative.dev/reconciler-test/pkg/resources/service
16591659
knative.dev/reconciler-test/pkg/resources/serviceaccount
16601660
knative.dev/reconciler-test/pkg/state
16611661
knative.dev/reconciler-test/resources/certificate
1662-
# knative.dev/serving v0.45.0
1662+
# knative.dev/serving v0.45.1
16631663
## explicit; go 1.24.0
16641664
knative.dev/serving/pkg/apis/autoscaling
16651665
knative.dev/serving/pkg/apis/autoscaling/v1alpha1

0 commit comments

Comments
 (0)