upgrade to latest dependencies (#1177)

Signed-off-by: Knative Automation <automation@knative.team>
This commit is contained in:
knative-automation 2020-12-21 00:14:03 -08:00 committed by GitHub
parent 5a0e79a357
commit 809f925a0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 67 additions and 22 deletions

6
go.mod
View File

@ -24,9 +24,9 @@ require (
k8s.io/code-generator v0.18.12
knative.dev/eventing v0.19.1-0.20201217221202-9643baffd747
knative.dev/hack v0.0.0-20201214230143-4ed1ecb8db24
knative.dev/networking v0.0.0-20201218015602-5b9803233324
knative.dev/pkg v0.0.0-20201217152402-7226f4f447a8
knative.dev/serving v0.19.1-0.20201217202302-f35443fe7801
knative.dev/networking v0.0.0-20201218160702-9c60344e49e5
knative.dev/pkg v0.0.0-20201218185703-e41409af6cff
knative.dev/serving v0.19.1-0.20201218215002-782b7f2851a4
sigs.k8s.io/yaml v1.2.0
)

21
go.sum
View File

@ -1262,32 +1262,29 @@ k8s.io/legacy-cloud-providers v0.18.8/go.mod h1:tgp4xYf6lvjrWnjQwTOPvWQE9IVqSBGP
k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
k8s.io/utils v0.0.0-20200603063816-c1c6865ac451 h1:v8ud2Up6QK1lNOKFgiIVrZdMg7MpmSnvtrOieolJKoE=
k8s.io/utils v0.0.0-20200603063816-c1c6865ac451/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
knative.dev/caching v0.0.0-20201215015243-9bd909a64850/go.mod h1:/+gGbjPMtb5Jo5PNmmwGNF/WMwTC8cuPG38GPqUqBS8=
knative.dev/caching v0.0.0-20201217015204-c3efd692dc36/go.mod h1:4ilQORs+ZBMOQWu6oWGJvQFz/NP3N63DwheA6O8UNVE=
knative.dev/eventing v0.19.1-0.20201217221202-9643baffd747 h1:Z+Jz8663U4kpTTm9i6xbc8mGVFaGqpKGCIu30ew129I=
knative.dev/eventing v0.19.1-0.20201217221202-9643baffd747/go.mod h1:i/xQcbto7Ix7K5H8IILeeJdwxatJyMd1CHRlOYNcm9Y=
knative.dev/hack v0.0.0-20201112185459-01a34c573bd8 h1:RNbZsAjhswBPtl4C5C5gEFX5/GfWIOZQxfYD9DhkHdY=
knative.dev/hack v0.0.0-20201112185459-01a34c573bd8/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
knative.dev/hack v0.0.0-20201118155651-b31d3bb6bff9/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
knative.dev/hack v0.0.0-20201201234937-fddbf732e450 h1:IyitWF7OzfunCgE4b9ZsJAeIRoQ6JOyqDrz/19X4iS4=
knative.dev/hack v0.0.0-20201201234937-fddbf732e450/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
knative.dev/hack v0.0.0-20201214230143-4ed1ecb8db24 h1:kIztWfvnIFV8Lhlea02K3YO2mIzcDyQNzrBLn0Oq9sA=
knative.dev/hack v0.0.0-20201214230143-4ed1ecb8db24/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
knative.dev/networking v0.0.0-20201215172457-b175a8d66f91/go.mod h1:CEC2okV/9UCg2PdXZWZRtEG81/jdbKZ28tfAcc2hAis=
knative.dev/networking v0.0.0-20201218015602-5b9803233324 h1:olOarveq/XKNDjYk3G6dlicz6arzUcC/YRrjfy49ybk=
knative.dev/networking v0.0.0-20201218015602-5b9803233324/go.mod h1:iWk1TS8+tKxghbJ1PlTHLkaC1ivr/6NYugeJlnGdlOg=
knative.dev/networking v0.0.0-20201217015204-ceef42482365/go.mod h1:eFbYgJ+mBmsauvUB+Kxn9tXCCdyo/TL1mkZLgJaBJ2c=
knative.dev/networking v0.0.0-20201218160702-9c60344e49e5 h1:ly1etm+T7QOdNTcRBy80f6fwNCmf7Huj4ZRTYT3w6mQ=
knative.dev/networking v0.0.0-20201218160702-9c60344e49e5/go.mod h1:iWk1TS8+tKxghbJ1PlTHLkaC1ivr/6NYugeJlnGdlOg=
knative.dev/pkg v0.0.0-20201117221452-0fccc54273ed h1:4LNEFhvD2Ya4WgCD3SC1WGXz81bjEvQgbcpe5XACI3I=
knative.dev/pkg v0.0.0-20201117221452-0fccc54273ed/go.mod h1:nxlh3CUvx6WBPr1WKD96AHxFZPD2UKRDo9RUp8ILTyQ=
knative.dev/pkg v0.0.0-20201214144644-909c15242675 h1:LoJ/axeH7J8ovl3+uELzmGUZ/hnjHeX7m6tZTrfk/P0=
knative.dev/pkg v0.0.0-20201214144644-909c15242675/go.mod h1:9Z5HV80glvuMCv9oJqkWQcYoZrPAw8oA2C5JdFrNk0A=
knative.dev/pkg v0.0.0-20201215101243-af53027cbd91/go.mod h1:VjrwVhfEZUnn6FruncHcBm854FldnRpekpyBbYtBvZM=
knative.dev/pkg v0.0.0-20201215202458-ef8048c0ba77/go.mod h1:VjrwVhfEZUnn6FruncHcBm854FldnRpekpyBbYtBvZM=
knative.dev/pkg v0.0.0-20201216162758-261c9b4624df/go.mod h1:VjrwVhfEZUnn6FruncHcBm854FldnRpekpyBbYtBvZM=
knative.dev/pkg v0.0.0-20201217014702-b0c121fb667f h1:c4fPgRAIlW0uTC2Ec3+AfkA3adPXwfjfA0NhiA/ybgs=
knative.dev/pkg v0.0.0-20201217014702-b0c121fb667f/go.mod h1:VjrwVhfEZUnn6FruncHcBm854FldnRpekpyBbYtBvZM=
knative.dev/pkg v0.0.0-20201217152402-7226f4f447a8 h1:Ti4QhRNR6WSKiobT9gWuJZT3odRQC4v8LcO5tVfsNNI=
knative.dev/pkg v0.0.0-20201217152402-7226f4f447a8/go.mod h1:hckgW978SdzPA2H5EDvRPY8xsnPuDZLJLbPf8Jte7Q0=
knative.dev/pkg v0.0.0-20201218185703-e41409af6cff h1:qLPWOSpK2Nh5r6GboAFBsWIxmaAKlq+XYWdKOhoKht8=
knative.dev/pkg v0.0.0-20201218185703-e41409af6cff/go.mod h1:hckgW978SdzPA2H5EDvRPY8xsnPuDZLJLbPf8Jte7Q0=
knative.dev/reconciler-test v0.0.0-20201124190335-83a44efcdfef/go.mod h1:YSs1y1rgnjs8w39/drLIOQbWvZUQwqApvd+EizO8UsA=
knative.dev/serving v0.19.1-0.20201217202302-f35443fe7801 h1:ospVtXbvDmYeEIKbvpR6ZyJ8q5/2EPUSTfZ/HHTy3DM=
knative.dev/serving v0.19.1-0.20201217202302-f35443fe7801/go.mod h1:+/NJ2TQkqkgYCCqYUtQtU5J5rGlzrvEav2t/L+QOV00=
knative.dev/serving v0.19.1-0.20201218215002-782b7f2851a4 h1:5UDM8ROtAY5LEwsc9GOr+tVqxa7stlOVYOraKLUwnBI=
knative.dev/serving v0.19.1-0.20201218215002-782b7f2851a4/go.mod h1:iHpwoHfNffKS46SF7ShMMA4BfL5qASbtCYOyUqOj/KA=
pgregory.net/rapid v0.3.3/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU=
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=

View File

@ -100,6 +100,10 @@ type IngressSpec struct {
// +optional
Rules []IngressRule `json:"rules,omitempty"`
// HTTPOption is the option of HTTP. It has the following two values:
// `HTTPOptionEnabled`, `HTTPOptionRedirected`
HTTPOption HTTPOption `json:"httpOption,omitempty"`
// DeprecatedVisibility was used for the fallback when spec.rules.visibility
// isn't set.
//
@ -109,6 +113,16 @@ type IngressSpec struct {
DeprecatedVisibility IngressVisibility `json:"visibility,omitempty"`
}
type HTTPOption string
const (
// The knative ingress will be able to serve HTTP connections.
HTTPOptionEnabled HTTPOption = "Enabled"
// The knative will return redirection HTTP status for the clients,
// asking the clients to redirect their requests to HTTPS.
HTTPOptionRedirected HTTPOption = "Redirected"
)
// IngressVisibility describes whether the Ingress should be exposed to
// public gateways or not.
type IngressVisibility string

View File

@ -50,6 +50,7 @@ func (is *IngressSpec) Validate(ctx context.Context) *apis.FieldError {
for idx, tls := range is.TLS {
all = all.Also(tls.Validate(ctx).ViaFieldIndex("tls", idx))
}
all = all.Also(is.HTTPOption.Validate(ctx))
return all
}
@ -166,3 +167,13 @@ func (t *IngressTLS) Validate(ctx context.Context) *apis.FieldError {
}
return all
}
func (t HTTPOption) Validate(ctx context.Context) (all *apis.FieldError) {
switch t {
case "", HTTPOptionEnabled, HTTPOptionRedirected:
break
default:
all = all.Also(apis.ErrInvalidValue(t, "httpOption"))
}
return all
}

View File

@ -208,7 +208,7 @@ func createMetricsConfig(ctx context.Context, ops ExporterOptions) (*metricsConf
}
switch lb := metricsBackend(strings.ToLower(backend)); lb {
case stackdriver, prometheus, openCensus:
case stackdriver, prometheus, openCensus, none:
mc.backendDestination = lb
default:
return nil, fmt.Errorf("unsupported metrics backend value %q", backend)

View File

@ -23,6 +23,7 @@ import (
"strings"
"sync"
"go.opencensus.io/resource"
"go.opencensus.io/stats/view"
"go.uber.org/zap"
corev1 "k8s.io/api/core/v1"
@ -161,13 +162,13 @@ func UpdateExporter(ctx context.Context, ops ExporterOptions, logger *zap.Sugare
flushGivenExporter(curMetricsExporter)
e, f, err := newMetricsExporter(newConfig, logger)
if err != nil {
logger.Errorw("Failed to update a new metrics exporter based on metric config", newConfig, zap.Error(err))
logger.Errorw("Failed to update a new metrics exporter based on metric config", zap.Error(err), "config", newConfig)
return err
}
existingConfig := curMetricsConfig
curMetricsExporter = e
if err := setFactory(f); err != nil {
logger.Errorw("Failed to update metrics factory when loading metric config", newConfig, zap.Error(err))
logger.Errorw("Failed to update metrics factory when loading metric config", zap.Error(err), "config", newConfig)
return err
}
logger.Infof("Successfully updated the metrics exporter; old config: %v; new config %v", existingConfig, newConfig)
@ -212,7 +213,10 @@ func newMetricsExporter(config *metricsConfig, logger *zap.SugaredLogger) (view.
openCensus: newOpenCensusExporter,
prometheus: newPrometheusExporter,
none: func(*metricsConfig, *zap.SugaredLogger) (view.Exporter, ResourceExporterFactory, error) {
return nil, nil, nil
noneFactory := func(*resource.Resource) (view.Exporter, error) {
return &noneExporter{}, nil
}
return &noneExporter{}, noneFactory, nil
},
}
@ -272,3 +276,10 @@ func flushGivenExporter(e view.Exporter) bool {
}
return false
}
type noneExporter struct {
}
// NoneExporter implements view.Exporter in the nil case.
func (*noneExporter) ExportView(*view.Data) {
}

View File

@ -70,6 +70,13 @@ func (rs *RouteStatus) MarkServiceNotOwned(name string) {
fmt.Sprintf("There is an existing placeholder Service %q that we do not own.", name))
}
// MarkIngressRolloutInProgress changes the IngressReady condition to be unknown to reflect
// that a gradual rollout of the latest new revision (or stacked revisions) is in progress.
func (rs *RouteStatus) MarkIngressRolloutInProgress() {
routeCondSet.Manage(rs).MarkUnknown(RouteConditionIngressReady,
"RolloutInProgress", "A gradual rollout of the latest revision(s) is in progress.")
}
// MarkIngressNotConfigured changes the IngressReady condition to be unknown to reflect
// that the Ingress does not yet have a Status
func (rs *RouteStatus) MarkIngressNotConfigured() {

View File

@ -221,6 +221,11 @@ func MarkIngressReady(r *v1.Route) {
})
}
// MarkInRollout marks the route to be in process of rolling out.
func MarkInRollout(r *v1.Route) {
r.Status.MarkIngressRolloutInProgress()
}
// MarkIngressNotConfigured calls the method of the same name on .Status
func MarkIngressNotConfigured(r *v1.Route) {
r.Status.MarkIngressNotConfigured()

6
vendor/modules.txt vendored
View File

@ -882,12 +882,12 @@ knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha2/fake
# knative.dev/hack v0.0.0-20201214230143-4ed1ecb8db24
## explicit
knative.dev/hack
# knative.dev/networking v0.0.0-20201218015602-5b9803233324
# knative.dev/networking v0.0.0-20201218160702-9c60344e49e5
## explicit
knative.dev/networking/pkg
knative.dev/networking/pkg/apis/networking
knative.dev/networking/pkg/apis/networking/v1alpha1
# knative.dev/pkg v0.0.0-20201217152402-7226f4f447a8
# knative.dev/pkg v0.0.0-20201218185703-e41409af6cff
## explicit
knative.dev/pkg/apis
knative.dev/pkg/apis/duck
@ -931,7 +931,7 @@ knative.dev/pkg/tracing/config
knative.dev/pkg/tracing/propagation
knative.dev/pkg/tracing/propagation/tracecontextb3
knative.dev/pkg/tracker
# knative.dev/serving v0.19.1-0.20201217202302-f35443fe7801
# knative.dev/serving v0.19.1-0.20201218215002-782b7f2851a4
## explicit
knative.dev/serving/pkg/apis/autoscaling
knative.dev/serving/pkg/apis/autoscaling/v1alpha1