mirror of https://github.com/knative/caching.git
upgrade to latest dependencies (#694)
bumping knative.dev/pkg 9823d96...6ce976c: > 6ce976c Default observability config if nil (# 2614) > ff95684 make METRICS_DOMAIN optional when backend is not OpenCensus (# 2617) > b2a3a39 upgrade to latest dependencies (# 2616) Signed-off-by: Knative Automation <automation@knative.team> Signed-off-by: Knative Automation <automation@knative.team>
This commit is contained in:
parent
f651e0c8c1
commit
33f18a6a8d
2
go.mod
2
go.mod
|
@ -12,7 +12,7 @@ require (
|
|||
k8s.io/code-generator v0.25.2
|
||||
k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1
|
||||
knative.dev/hack v0.0.0-20221024013916-9d2ae47c16b2
|
||||
knative.dev/pkg v0.0.0-20221024013716-9823d960ed40
|
||||
knative.dev/pkg v0.0.0-20221025200856-6ce976ce9255
|
||||
)
|
||||
|
||||
require (
|
||||
|
|
4
go.sum
4
go.sum
|
@ -803,8 +803,8 @@ k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed h1:jAne/RjBTyawwAy0utX5eqigAwz/l
|
|||
k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
|
||||
knative.dev/hack v0.0.0-20221024013916-9d2ae47c16b2 h1:DvWcy2c6wvjDo+rPRWe9Rn5QEH8fiq/j4QWOka0wMvQ=
|
||||
knative.dev/hack v0.0.0-20221024013916-9d2ae47c16b2/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q=
|
||||
knative.dev/pkg v0.0.0-20221024013716-9823d960ed40 h1:zuRFh9ZF32nf0m4veznmh27WD/lRDQBSZIl3W4cdqUU=
|
||||
knative.dev/pkg v0.0.0-20221024013716-9823d960ed40/go.mod h1:DMTRDJ5WRxf/DrlOPzohzfhSuJggscLZ8EavOq9O/x8=
|
||||
knative.dev/pkg v0.0.0-20221025200856-6ce976ce9255 h1:zTqomdMAkcKojViE1zh7AYhmJRaL9GYzMhmXhFPZxA8=
|
||||
knative.dev/pkg v0.0.0-20221025200856-6ce976ce9255/go.mod h1:j5kO7gKmWGj2DJpefCEiPbItToiYf+2bCtI+A6REkQo=
|
||||
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=
|
||||
|
|
|
@ -124,12 +124,7 @@ func (mc *metricsConfig) record(ctx context.Context, mss []stats.Measurement, ro
|
|||
|
||||
func createMetricsConfig(_ context.Context, ops ExporterOptions) (*metricsConfig, error) {
|
||||
var mc metricsConfig
|
||||
|
||||
if ops.Domain == "" {
|
||||
return nil, errors.New("metrics domain cannot be empty")
|
||||
}
|
||||
mc.domain = ops.Domain
|
||||
|
||||
if ops.Component == "" {
|
||||
return nil, errors.New("metrics component name cannot be empty")
|
||||
}
|
||||
|
@ -159,6 +154,9 @@ func createMetricsConfig(_ context.Context, ops ExporterOptions) (*metricsConfig
|
|||
|
||||
switch mc.backendDestination {
|
||||
case openCensus:
|
||||
if ops.Domain == "" {
|
||||
return nil, errors.New("metrics domain cannot be empty")
|
||||
}
|
||||
mc.collectorAddress = ops.ConfigMap[collectorAddressKey]
|
||||
if isSecure := ops.ConfigMap[collectorSecureKey]; isSecure != "" {
|
||||
var err error
|
||||
|
@ -221,22 +219,7 @@ func Domain() string {
|
|||
if domain := os.Getenv(DomainEnv); domain != "" {
|
||||
return domain
|
||||
}
|
||||
|
||||
panic(fmt.Sprintf(`The environment variable %q is not set
|
||||
|
||||
If this is a process running on Kubernetes, then it should be specifying
|
||||
this via:
|
||||
|
||||
env:
|
||||
- name: %s
|
||||
value: knative.dev/some-repository
|
||||
|
||||
If this is a Go unit test consuming metric.Domain() then it should add the
|
||||
following import:
|
||||
|
||||
import (
|
||||
_ "knative.dev/pkg/metrics/testing"
|
||||
)`, DomainEnv, DomainEnv))
|
||||
return ""
|
||||
}
|
||||
|
||||
// prometheusPort returns the TCP port number configured via the environment
|
||||
|
|
|
@ -110,6 +110,9 @@ func defaultConfig() *ObservabilityConfig {
|
|||
// NewObservabilityConfigFromConfigMap creates a ObservabilityConfig from the supplied ConfigMap
|
||||
func NewObservabilityConfigFromConfigMap(configMap *corev1.ConfigMap) (*ObservabilityConfig, error) {
|
||||
oc := defaultConfig()
|
||||
if configMap == nil {
|
||||
return oc, nil
|
||||
}
|
||||
|
||||
if err := cm.Parse(configMap.Data,
|
||||
cm.AsBool("logging.enable-var-log-collection", &oc.EnableVarLogCollection),
|
||||
|
|
|
@ -690,7 +690,7 @@ k8s.io/utils/trace
|
|||
# knative.dev/hack v0.0.0-20221024013916-9d2ae47c16b2
|
||||
## explicit; go 1.18
|
||||
knative.dev/hack
|
||||
# knative.dev/pkg v0.0.0-20221024013716-9823d960ed40
|
||||
# knative.dev/pkg v0.0.0-20221025200856-6ce976ce9255
|
||||
## explicit; go 1.18
|
||||
knative.dev/pkg/apis
|
||||
knative.dev/pkg/apis/duck
|
||||
|
|
Loading…
Reference in New Issue