diff --git a/go.mod b/go.mod index e0bc490c3..1b279e87b 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( k8s.io/apimachinery v0.27.1 k8s.io/client-go v0.26.5 knative.dev/hack v0.0.0-20230815012940-044c02b7a447 - knative.dev/networking v0.0.0-20230815014240-ed0534b4ef83 + knative.dev/networking v0.0.0-20230817140742-4bfcc9fb6012 knative.dev/pkg v0.0.0-20230815132840-4f651e092853 sigs.k8s.io/yaml v1.3.0 ) diff --git a/go.sum b/go.sum index 5999b05de..94ba237a9 100644 --- a/go.sum +++ b/go.sum @@ -712,8 +712,8 @@ k8s.io/utils v0.0.0-20230209194617-a36077c30491 h1:r0BAOLElQnnFhE/ApUsg3iHdVYYPB k8s.io/utils v0.0.0-20230209194617-a36077c30491/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= knative.dev/hack v0.0.0-20230815012940-044c02b7a447 h1:Lr4O/WEyZHuUBFbqATYdQlfLXvhPUCluF4zlgRi59T4= knative.dev/hack v0.0.0-20230815012940-044c02b7a447/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q= -knative.dev/networking v0.0.0-20230815014240-ed0534b4ef83 h1:F1tP5OIXfk2YX/0KE+8DyuFw8bNrWzQSWXRba6k/aVQ= -knative.dev/networking v0.0.0-20230815014240-ed0534b4ef83/go.mod h1:Ao0oO/s5ARZP2jllEoGWbLgpCb2nI4OCUutylpSyxpw= +knative.dev/networking v0.0.0-20230817140742-4bfcc9fb6012 h1:eaeZPgJzsJMnJaekbG8TYAfF/PUX8Xmdb8Oqnb+QO1k= +knative.dev/networking v0.0.0-20230817140742-4bfcc9fb6012/go.mod h1:iGxfnvUJ3gGqtKnoOXhLzNCZeGxVnH4xdClYuh5vB4o= knative.dev/pkg v0.0.0-20230815132840-4f651e092853 h1:OyAYpXLa/jQWClFxRegCccGySyX2/1BVRtKaAWRE/xM= knative.dev/pkg v0.0.0-20230815132840-4f651e092853/go.mod h1:Y5Tis5nMoapB9iTZywW20Qnv/7LBahrtHz9Sm6+l3LE= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/vendor/knative.dev/networking/pkg/config/config.go b/vendor/knative.dev/networking/pkg/config/config.go index 47cf440cd..a4534fc51 100644 --- a/vendor/knative.dev/networking/pkg/config/config.go +++ b/vendor/knative.dev/networking/pkg/config/config.go @@ -25,6 +25,7 @@ import ( "strings" "text/template" + corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/utils/lru" cm "knative.dev/pkg/configmap" @@ -321,6 +322,14 @@ func defaultConfig() *Config { } } +// NewConfigFromConfigMap returns a Config for the given configmap +func NewConfigFromConfigMap(config *corev1.ConfigMap) (*Config, error) { + if config == nil { + return NewConfigFromMap(nil) + } + return NewConfigFromMap(config.Data) +} + // NewConfigFromMap creates a Config from the supplied data. func NewConfigFromMap(data map[string]string) (*Config, error) { nc := defaultConfig() @@ -436,6 +445,11 @@ func NewConfigFromMap(data map[string]string) (*Config, error) { return nc, nil } +// InternalTLSEnabled returns whether or not dataplane-trust is disabled +func (c *Config) InternalTLSEnabled() bool { + return c.DataplaneTrust != TrustDisabled +} + // GetDomainTemplate returns the golang Template from the config map // or panics (the value is validated during CM validation and at // this point guaranteed to be parseable). diff --git a/vendor/modules.txt b/vendor/modules.txt index bb5150592..15ded7709 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -892,7 +892,7 @@ k8s.io/utils/trace # knative.dev/hack v0.0.0-20230815012940-044c02b7a447 ## explicit; go 1.18 knative.dev/hack -# knative.dev/networking v0.0.0-20230815014240-ed0534b4ef83 +# knative.dev/networking v0.0.0-20230817140742-4bfcc9fb6012 ## explicit; go 1.18 knative.dev/networking/config knative.dev/networking/pkg