mirror of https://github.com/knative/caching.git
upgrade to latest dependencies (#368)
Signed-off-by: Knative Automation <automation@knative.team>
This commit is contained in:
parent
7646d730f2
commit
5c780278f1
4
go.mod
4
go.mod
|
@ -15,8 +15,8 @@ require (
|
|||
k8s.io/client-go v11.0.1-0.20190805182717-6502b5e7b1b5+incompatible
|
||||
k8s.io/code-generator v0.18.8
|
||||
k8s.io/kube-openapi v0.0.0-20200410145947-bcb3869e6f29
|
||||
knative.dev/pkg v0.0.0-20201021200832-f492d0877abf
|
||||
knative.dev/test-infra v0.0.0-20201021201032-c3d2f3850008
|
||||
knative.dev/pkg v0.0.0-20201023012137-324e49bc7fe1
|
||||
knative.dev/test-infra v0.0.0-20201022003632-7d3ea6019158
|
||||
)
|
||||
|
||||
replace (
|
||||
|
|
10
go.sum
10
go.sum
|
@ -1921,17 +1921,15 @@ knative.dev/pkg v0.0.0-20200505191044-3da93ebb24c2/go.mod h1:Q6sL35DdGs8hIQZKdaC
|
|||
knative.dev/pkg v0.0.0-20200515002500-16d7b963416f/go.mod h1:tMOHGbxtRz8zYFGEGpV/bpoTEM1o89MwYFC4YJXl3GY=
|
||||
knative.dev/pkg v0.0.0-20200528142800-1c6815d7e4c9/go.mod h1:QgNZTxnwpB/oSpNcfnLVlw+WpEwwyKAvJlvR3hgeltA=
|
||||
knative.dev/pkg v0.0.0-20200711004937-22502028e31a/go.mod h1:AqAJV6rYi8IGikDjJ/9ZQd9qKdkXVlesVnVjwx62YB8=
|
||||
knative.dev/pkg v0.0.0-20201021200832-f492d0877abf h1:WmepjYVvRFzJthX/t5YU6fNgkEUOcAYTFWen7nJVofs=
|
||||
knative.dev/pkg v0.0.0-20201021200832-f492d0877abf/go.mod h1:8Ryvgpx71FnHPVaB+DEXEKOJfA/sc9iO8mjoKxsrIiE=
|
||||
knative.dev/pkg v0.0.0-20201023012137-324e49bc7fe1 h1:pcTRRQhWHb2uUkqfSoRx7kWhD9NGW78Ki4eje/KHHHQ=
|
||||
knative.dev/pkg v0.0.0-20201023012137-324e49bc7fe1/go.mod h1:pc2VrtK69NrLtGMc6Gu0BL8IOfmph6KNvIDVrFqqW3Q=
|
||||
knative.dev/test-infra v0.0.0-20200407185800-1b88cb3b45a5/go.mod h1:xcdUkMJrLlBswIZqL5zCuBFOC22WIPMQoVX1L35i0vQ=
|
||||
knative.dev/test-infra v0.0.0-20200505052144-5ea2f705bb55/go.mod h1:WqF1Azka+FxPZ20keR2zCNtiQA1MP9ZB4BH4HuI+SIU=
|
||||
knative.dev/test-infra v0.0.0-20200513011557-d03429a76034/go.mod h1:aMif0KXL4g19YCYwsy4Ocjjz5xgPlseYV+B95Oo4JGE=
|
||||
knative.dev/test-infra v0.0.0-20200519015156-82551620b0a9/go.mod h1:A5b2OAXTOeHT3hHhVQm3dmtbuWvIDP7qzgtqxA3/2pE=
|
||||
knative.dev/test-infra v0.0.0-20200707183444-aed09e56ddc7/go.mod h1:RjYAhXnZqeHw9+B0zsbqSPlae0lCvjekO/nw5ZMpLCs=
|
||||
knative.dev/test-infra v0.0.0-20201020210659-8f5dc4814ac3 h1:FldGYq5wPrQqGuC8JI3a07nC0lGKqG7wtqvebxonnnE=
|
||||
knative.dev/test-infra v0.0.0-20201020210659-8f5dc4814ac3/go.mod h1:lm0U0k6ARXr8Po0LcSTCfETg63LOF3ajUxcoqy5JSH0=
|
||||
knative.dev/test-infra v0.0.0-20201021201032-c3d2f3850008 h1:sOyPbz8IyGsDsaLr+wAG5wR8Xkc53D2HxG7KIyjEjO0=
|
||||
knative.dev/test-infra v0.0.0-20201021201032-c3d2f3850008/go.mod h1:lm0U0k6ARXr8Po0LcSTCfETg63LOF3ajUxcoqy5JSH0=
|
||||
knative.dev/test-infra v0.0.0-20201022003632-7d3ea6019158 h1:i6DIeWY1imJVNS6OH+VcBvYpVOkYWDe/AR2rUYTxcxE=
|
||||
knative.dev/test-infra v0.0.0-20201022003632-7d3ea6019158/go.mod h1:lm0U0k6ARXr8Po0LcSTCfETg63LOF3ajUxcoqy5JSH0=
|
||||
mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc=
|
||||
mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4=
|
||||
mvdan.cc/unparam v0.0.0-20190720180237-d51796306d8f/go.mod h1:4G1h5nDURzA3bwVMZIVpwbkw+04kSxk3rAtzlimaUJw=
|
||||
|
|
|
@ -200,15 +200,16 @@ func createMetricsConfig(ctx context.Context, ops ExporterOptions) (*metricsConf
|
|||
if backendFromConfig, ok := m[BackendDestinationKey]; ok {
|
||||
backend = backendFromConfig
|
||||
}
|
||||
lb := metricsBackend(strings.ToLower(backend))
|
||||
switch lb {
|
||||
|
||||
switch lb := metricsBackend(strings.ToLower(backend)); lb {
|
||||
case stackdriver, prometheus, openCensus:
|
||||
mc.backendDestination = lb
|
||||
default:
|
||||
return nil, fmt.Errorf("unsupported metrics backend value %q", backend)
|
||||
}
|
||||
|
||||
if mc.backendDestination == openCensus {
|
||||
switch mc.backendDestination {
|
||||
case openCensus:
|
||||
mc.collectorAddress = ops.ConfigMap[collectorAddressKey]
|
||||
if isSecure := ops.ConfigMap[collectorSecureKey]; isSecure != "" {
|
||||
var err error
|
||||
|
@ -223,9 +224,7 @@ func createMetricsConfig(ctx context.Context, ops ExporterOptions) (*metricsConf
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if mc.backendDestination == prometheus {
|
||||
case prometheus:
|
||||
pp := ops.PrometheusPort
|
||||
if pp == 0 {
|
||||
var err error
|
||||
|
@ -241,12 +240,10 @@ func createMetricsConfig(ctx context.Context, ops ExporterOptions) (*metricsConf
|
|||
}
|
||||
|
||||
mc.prometheusPort = pp
|
||||
}
|
||||
|
||||
// If stackdriverClientConfig is not provided for stackdriver backend destination, OpenCensus will try to
|
||||
// use the application default credentials. If that is not available, Opencensus would fail to create the
|
||||
// metrics exporter.
|
||||
if mc.backendDestination == stackdriver {
|
||||
case stackdriver:
|
||||
// If stackdriverClientConfig is not provided for stackdriver backend destination, OpenCensus will try to
|
||||
// use the application default credentials. If that is not available, Opencensus would fail to create the
|
||||
// metrics exporter.
|
||||
scc := NewStackdriverClientConfigFromMap(m)
|
||||
mc.stackdriverClientConfig = *scc
|
||||
mc.isStackdriverBackend = true
|
||||
|
@ -285,7 +282,7 @@ func createMetricsConfig(ctx context.Context, ops ExporterOptions) (*metricsConf
|
|||
// For Prometheus, we will use a lower value since the exporter doesn't
|
||||
// push anything but just responds to pull requests, and shorter durations
|
||||
// do not really hurt the performance and we rely on the scraping configuration.
|
||||
if repStr, ok := m[reportingPeriodKey]; ok && repStr != "" {
|
||||
if repStr := m[reportingPeriodKey]; repStr != "" {
|
||||
repInt, err := strconv.Atoi(repStr)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("invalid %s value %q", reportingPeriodKey, repStr)
|
||||
|
@ -346,7 +343,12 @@ func prometheusPort() (int, error) {
|
|||
|
||||
// JsonToMetricsOptions converts a json string of a
|
||||
// ExporterOptions. Returns a non-nil ExporterOptions always.
|
||||
func JsonToMetricsOptions(jsonOpts string) (*ExporterOptions, error) { //nolint // No rename due to backwards incompatibility.
|
||||
// TODO(vagababov): remove after updating deps.
|
||||
func JsonToMetricsOptions(jsonOpts string) (*ExporterOptions, error) { //nolint // No rename due to backwards incompatibility. {
|
||||
return JSONToMetricsOptions(jsonOpts)
|
||||
}
|
||||
|
||||
func JSONToMetricsOptions(jsonOpts string) (*ExporterOptions, error) {
|
||||
var opts ExporterOptions
|
||||
if jsonOpts == "" {
|
||||
return nil, errors.New("json options string is empty")
|
||||
|
@ -360,15 +362,16 @@ func JsonToMetricsOptions(jsonOpts string) (*ExporterOptions, error) { //nolint
|
|||
}
|
||||
|
||||
// MetricsOptionsToJson converts a ExporterOptions to a json string.
|
||||
// TODO(vagababov): remove after updating deps.
|
||||
func MetricsOptionsToJson(opts *ExporterOptions) (string, error) { //nolint // No rename due to backwards incompatibility.
|
||||
return MetricsOptionsToJSON(opts)
|
||||
}
|
||||
|
||||
func MetricsOptionsToJSON(opts *ExporterOptions) (string, error) {
|
||||
if opts == nil {
|
||||
return "", nil
|
||||
}
|
||||
|
||||
jsonOpts, err := json.Marshal(opts)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return string(jsonOpts), nil
|
||||
return string(jsonOpts), err
|
||||
}
|
||||
|
|
|
@ -734,7 +734,7 @@ k8s.io/kube-openapi/pkg/util/sets
|
|||
k8s.io/utils/buffer
|
||||
k8s.io/utils/integer
|
||||
k8s.io/utils/trace
|
||||
# knative.dev/pkg v0.0.0-20201021200832-f492d0877abf
|
||||
# knative.dev/pkg v0.0.0-20201023012137-324e49bc7fe1
|
||||
## explicit
|
||||
knative.dev/pkg/apis
|
||||
knative.dev/pkg/apis/duck
|
||||
|
@ -762,7 +762,7 @@ knative.dev/pkg/reconciler
|
|||
knative.dev/pkg/signals
|
||||
knative.dev/pkg/system
|
||||
knative.dev/pkg/tracker
|
||||
# knative.dev/test-infra v0.0.0-20201021201032-c3d2f3850008
|
||||
# knative.dev/test-infra v0.0.0-20201022003632-7d3ea6019158
|
||||
## explicit
|
||||
knative.dev/test-infra/scripts
|
||||
knative.dev/test-infra/tools/dep-collector
|
||||
|
|
Loading…
Reference in New Issue