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

Commit

Permalink
bump knative serving to 0.37.1
Browse files Browse the repository at this point in the history
Signed-off-by: Kenny Leung <kleung@chainguard.dev>
  • Loading branch information
k4leung4 committed May 9, 2023
1 parent d52e56d commit fa5db1e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ require (
knative.dev/net-istio v0.36.2
knative.dev/networking v0.0.0-20230419144338-e5d04e805e50
knative.dev/pkg v0.0.0-20230418073056-dfad48eaa5d0
knative.dev/serving v0.37.0
knative.dev/serving v0.37.1
)

require (
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -850,8 +850,8 @@ knative.dev/networking v0.0.0-20230419144338-e5d04e805e50 h1:X9rPBYr7Vrm075q0iXT
knative.dev/networking v0.0.0-20230419144338-e5d04e805e50/go.mod h1:o2MyGpGfU5DoSAWCE2f/jnSC9GjGOplCslbA99yDkGo=
knative.dev/pkg v0.0.0-20230418073056-dfad48eaa5d0 h1:EFQcoUo8I4bc+U3y6tR1B3ONYZSHWUdAfI7Vh7dae8g=
knative.dev/pkg v0.0.0-20230418073056-dfad48eaa5d0/go.mod h1:2qWPP9Gjh9Q7ETti+WRHnBnGCSCq+6q7m3p/nmUQviE=
knative.dev/serving v0.37.0 h1:hp/HconGRzv0kh2az9I/af1K1DY3NG3zcyiVc2rHyOk=
knative.dev/serving v0.37.0/go.mod h1:v0Xbfp7olb0Gljm5l4qNuLsIf8/2p1rIt/mphxvx1z0=
knative.dev/serving v0.37.1 h1:msn1sJ9yVBVWu/5slqkpSXXqCEQRIysHR+fKMO4EXlI=
knative.dev/serving v0.37.1/go.mod h1:v0Xbfp7olb0Gljm5l4qNuLsIf8/2p1rIt/mphxvx1z0=
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
17 changes: 16 additions & 1 deletion vendor/knative.dev/serving/pkg/reconciler/revision/resolve.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ const (
// Kubernetes CA certificate bundle is mounted into the pod here, see:
// https://kubernetes.io/docs/tasks/tls/managing-tls-in-a-cluster/#trusting-tls-in-a-cluster
k8sCertPath = "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"

tlsMinVersionEnvKey = "TAG_TO_DIGEST_TLS_MIN_VERSION"
)

// newResolverTransport returns an http.Transport that appends the certs bundle
Expand All @@ -64,13 +66,26 @@ func newResolverTransport(path string, maxIdleConns, maxIdleConnsPerHost int) (*
transport.MaxIdleConns = maxIdleConns
transport.MaxIdleConnsPerHost = maxIdleConnsPerHost
transport.TLSClientConfig = &tls.Config{
MinVersion: tls.VersionTLS13,
MinVersion: tlsMinVersionFromEnv(tls.VersionTLS12),
RootCAs: pool,
}

return transport, nil
}

func tlsMinVersionFromEnv(defaultTLSMinVersion uint16) uint16 {
switch tlsMinVersion := os.Getenv(tlsMinVersionEnvKey); tlsMinVersion {
case "1.2":
return tls.VersionTLS12
case "1.3":
return tls.VersionTLS13
case "":
return defaultTLSMinVersion
default:
panic(fmt.Sprintf("the environment variable %q has to be either '1.2' or '1.3'", tlsMinVersionEnvKey))
}
}

// Resolve resolves the image references that use tags to digests.
func (r *digestResolver) Resolve(
ctx context.Context,
Expand Down
2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1293,7 +1293,7 @@ knative.dev/pkg/webhook/resourcesemantics/defaulting
knative.dev/pkg/webhook/resourcesemantics/validation
knative.dev/pkg/webhook/testing
knative.dev/pkg/websocket
# knative.dev/serving v0.37.0
# knative.dev/serving v0.37.1
## explicit; go 1.18
knative.dev/serving/cmd/activator
knative.dev/serving/cmd/autoscaler
Expand Down

0 comments on commit fa5db1e

Please sign in to comment.