Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Commit

Permalink
upgrade to latest dependencies (#1443)
Browse files Browse the repository at this point in the history
bumping knative.dev/eventing 1e84b2e...0b45ad8:
  > 0b45ad8 Fix provisioning of sequences reply and steps audience (# 7501)
  > b81acca ContainerSource test with OIDC (# 7504)
  > 6e1fbeb [main] Upgrade to latest dependencies (# 7505)

Signed-off-by: Knative Automation <[email protected]>
  • Loading branch information
knative-automation authored Dec 13, 2023
1 parent 330e0fc commit 91b331c
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ require (
k8s.io/apimachinery v0.27.6
k8s.io/client-go v0.27.6
k8s.io/utils v0.0.0-20230209194617-a36077c30491
knative.dev/eventing v0.39.1-0.20231208055012-1e84b2e53280
knative.dev/eventing v0.39.1-0.20231212143445-0b45ad82cfd5
knative.dev/hack v0.0.0-20231201014241-7030d5bf584d
knative.dev/pkg v0.0.0-20231211072236-4914c472e81a
knative.dev/reconciler-test v0.0.0-20231205070418-c92305962aa8
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -935,8 +935,8 @@ k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f h1:2kWPakN3i/k81b0gvD5C5F
k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f/go.mod h1:byini6yhqGC14c3ebc/QwanvYwhuMWF6yz2F8uwW8eg=
k8s.io/utils v0.0.0-20230209194617-a36077c30491 h1:r0BAOLElQnnFhE/ApUsg3iHdVYYPBjNSSOMowRZxxsY=
k8s.io/utils v0.0.0-20230209194617-a36077c30491/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
knative.dev/eventing v0.39.1-0.20231208055012-1e84b2e53280 h1:tyh42CJ6uAiiJ4YI5BeqaWnDeNXP3WdYsSRG0xaSGUk=
knative.dev/eventing v0.39.1-0.20231208055012-1e84b2e53280/go.mod h1:2nV2hUJZlJmx1SB/DQgkbMVNS6cBYH+W1ywCVK5oQcI=
knative.dev/eventing v0.39.1-0.20231212143445-0b45ad82cfd5 h1:gsbWF0/itl6yfamq6NYCy6hXLdDrP3UlSL0w1lSHRuk=
knative.dev/eventing v0.39.1-0.20231212143445-0b45ad82cfd5/go.mod h1:1KXqyrFfvj1ZTStoDOzIl7mnag+hMY/NxWnl0IJ5adU=
knative.dev/hack v0.0.0-20231201014241-7030d5bf584d h1:IqXY770znXS9tLJDEh+OUcLMgtIFslSxqao3uplpUlY=
knative.dev/hack v0.0.0-20231201014241-7030d5bf584d/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q=
knative.dev/pkg v0.0.0-20231211072236-4914c472e81a h1:rvQ83jR984Ow/O6Kjo2svp1G09bSfjn+fCvo/rKiEp4=
Expand Down
17 changes: 17 additions & 0 deletions vendor/knative.dev/eventing/cmd/heartbeats/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ limitations under the License.
package main

import (
"context"
"encoding/json"
"errors"
"flag"
Expand Down Expand Up @@ -125,6 +126,11 @@ func main() {
ceOverrides = &overrides
}

oidcToken, err := os.ReadFile("/oidc/token")
if err != nil {
log.Printf("Failed to read OIDC token, client will not send Authorization header: %v", err)
}

conf, err := config.JSONToTracingConfig(env.TracingConfig)
if err != nil {
log.Printf("Failed to read tracing config, using the no-op default: %v", err)
Expand Down Expand Up @@ -206,6 +212,10 @@ func main() {
log.Printf("failed to set cloudevents msg: %s", err.Error())
}

if oidcToken != nil {
ctx = withAuthHeader(ctx, oidcToken)
}

log.Printf("sending cloudevent to %s", sink)
if res := c.Send(ctx, event); !cloudevents.IsACK(res) {
log.Printf("failed to send cloudevent: %v", res)
Expand All @@ -230,3 +240,10 @@ func maybeQuitIstioProxy() {
log.Println("[Ignore this warning if Istio proxy is not used on this pod]", err)
}
}

func withAuthHeader(ctx context.Context, oidcToken []byte) context.Context {
// Appending the auth token to the outgoing request
headers := cehttp.HeaderFrom(ctx)
headers.Set("Authorization", fmt.Sprintf("Bearer %s", oidcToken))
return cehttp.WithCustomHeader(ctx, headers)
}
2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1283,7 +1283,7 @@ k8s.io/utils/net
k8s.io/utils/pointer
k8s.io/utils/strings/slices
k8s.io/utils/trace
# knative.dev/eventing v0.39.1-0.20231208055012-1e84b2e53280
# knative.dev/eventing v0.39.1-0.20231212143445-0b45ad82cfd5
## explicit; go 1.19
knative.dev/eventing/cmd/heartbeats
knative.dev/eventing/pkg/adapter/v2
Expand Down

0 comments on commit 91b331c

Please sign in to comment.