mirror of https://github.com/knative/caching.git
[master] Auto-update dependencies (#317)
Produced via: `./hack/update-deps.sh --upgrade && ./hack/update-codegen.sh` /assign n3wscott vagababov /cc n3wscott vagababov
This commit is contained in:
parent
c814ce7cbf
commit
bb62d94135
4
go.mod
4
go.mod
|
@ -16,8 +16,8 @@ require (
|
||||||
k8s.io/client-go v11.0.1-0.20190805182717-6502b5e7b1b5+incompatible
|
k8s.io/client-go v11.0.1-0.20190805182717-6502b5e7b1b5+incompatible
|
||||||
k8s.io/code-generator v0.18.6
|
k8s.io/code-generator v0.18.6
|
||||||
k8s.io/kube-openapi v0.0.0-20200410145947-bcb3869e6f29
|
k8s.io/kube-openapi v0.0.0-20200410145947-bcb3869e6f29
|
||||||
knative.dev/pkg v0.0.0-20200822174146-f0f096d81292
|
knative.dev/pkg v0.0.0-20200825005048-1fe808911e69
|
||||||
knative.dev/test-infra v0.0.0-20200820231346-543fe3e80c03
|
knative.dev/test-infra v0.0.0-20200825022047-cb4bb218c5e5
|
||||||
)
|
)
|
||||||
|
|
||||||
replace (
|
replace (
|
||||||
|
|
6
go.sum
6
go.sum
|
@ -1868,8 +1868,8 @@ 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-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-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-20200711004937-22502028e31a/go.mod h1:AqAJV6rYi8IGikDjJ/9ZQd9qKdkXVlesVnVjwx62YB8=
|
||||||
knative.dev/pkg v0.0.0-20200822174146-f0f096d81292 h1:PPGDq/mWT0FhqsmJL9B3rO2I+/wgN48sfGlWyqSx3Bk=
|
knative.dev/pkg v0.0.0-20200825005048-1fe808911e69 h1:brp6D7fuJ0Wyn4gM0Axa9QByFSOvYLsbIQQKNnt3Iv4=
|
||||||
knative.dev/pkg v0.0.0-20200822174146-f0f096d81292/go.mod h1:VK46K0GB3wrFYqDinB5gh79csrWKBtd1GchBYVvtwkY=
|
knative.dev/pkg v0.0.0-20200825005048-1fe808911e69/go.mod h1:VK46K0GB3wrFYqDinB5gh79csrWKBtd1GchBYVvtwkY=
|
||||||
knative.dev/test-infra v0.0.0-20200407185800-1b88cb3b45a5/go.mod h1:xcdUkMJrLlBswIZqL5zCuBFOC22WIPMQoVX1L35i0vQ=
|
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-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-20200513011557-d03429a76034/go.mod h1:aMif0KXL4g19YCYwsy4Ocjjz5xgPlseYV+B95Oo4JGE=
|
||||||
|
@ -1877,6 +1877,8 @@ knative.dev/test-infra v0.0.0-20200519015156-82551620b0a9/go.mod h1:A5b2OAXTOeHT
|
||||||
knative.dev/test-infra v0.0.0-20200707183444-aed09e56ddc7/go.mod h1:RjYAhXnZqeHw9+B0zsbqSPlae0lCvjekO/nw5ZMpLCs=
|
knative.dev/test-infra v0.0.0-20200707183444-aed09e56ddc7/go.mod h1:RjYAhXnZqeHw9+B0zsbqSPlae0lCvjekO/nw5ZMpLCs=
|
||||||
knative.dev/test-infra v0.0.0-20200820231346-543fe3e80c03 h1:tBz8QL+H4chihsWHGDJ8/1xwHiFMDqRWHHid/qlfSoo=
|
knative.dev/test-infra v0.0.0-20200820231346-543fe3e80c03 h1:tBz8QL+H4chihsWHGDJ8/1xwHiFMDqRWHHid/qlfSoo=
|
||||||
knative.dev/test-infra v0.0.0-20200820231346-543fe3e80c03/go.mod h1:Pmg2c7Z7q7BGFUV/GOpU5BlrD3ePJft4MPqx8AYBplc=
|
knative.dev/test-infra v0.0.0-20200820231346-543fe3e80c03/go.mod h1:Pmg2c7Z7q7BGFUV/GOpU5BlrD3ePJft4MPqx8AYBplc=
|
||||||
|
knative.dev/test-infra v0.0.0-20200825022047-cb4bb218c5e5 h1:iqbpe5rccMW2r1Mu1Prw4gJ9xi7yqahmtxzckTUHBeI=
|
||||||
|
knative.dev/test-infra v0.0.0-20200825022047-cb4bb218c5e5/go.mod h1:Pmg2c7Z7q7BGFUV/GOpU5BlrD3ePJft4MPqx8AYBplc=
|
||||||
modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw=
|
modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw=
|
||||||
modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk=
|
modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk=
|
||||||
modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k=
|
modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k=
|
||||||
|
|
|
@ -108,7 +108,7 @@ func newLoggerFromConfig(configJSON string, levelOverride string, opts []zap.Opt
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.Info("Successfully created the logger.")
|
logger.Info("Successfully created the logger.")
|
||||||
logger.Sugar().Infof("Logging level set to %v", loggingCfg.Level)
|
logger.Info("Logging level set to: " + loggingCfg.Level.String())
|
||||||
return logger, loggingCfg.Level, nil
|
return logger, loggingCfg.Level, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -232,11 +232,10 @@ func UpdateLevelFromConfigMap(logger *zap.SugaredLogger, atomicLevel zap.AtomicL
|
||||||
|
|
||||||
// ConfigMapName gets the name of the logging ConfigMap
|
// ConfigMapName gets the name of the logging ConfigMap
|
||||||
func ConfigMapName() string {
|
func ConfigMapName() string {
|
||||||
cm := os.Getenv(configMapNameEnv)
|
if cm := os.Getenv(configMapNameEnv); cm != "" {
|
||||||
if cm == "" {
|
|
||||||
return "config-logging"
|
|
||||||
}
|
|
||||||
return cm
|
return cm
|
||||||
|
}
|
||||||
|
return "config-logging"
|
||||||
}
|
}
|
||||||
|
|
||||||
// JsonToLoggingConfig converts a json string of a Config.
|
// JsonToLoggingConfig converts a json string of a Config.
|
||||||
|
|
|
@ -17,8 +17,8 @@ limitations under the License.
|
||||||
package metrics
|
package metrics
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
|
||||||
texttemplate "text/template"
|
texttemplate "text/template"
|
||||||
|
|
||||||
corev1 "k8s.io/api/core/v1"
|
corev1 "k8s.io/api/core/v1"
|
||||||
|
@ -28,12 +28,16 @@ import (
|
||||||
const (
|
const (
|
||||||
// The following is used to set the default log url template
|
// The following is used to set the default log url template
|
||||||
DefaultLogURLTemplate = "http://localhost:8001/api/v1/namespaces/knative-monitoring/services/kibana-logging/proxy/app/kibana#/discover?_a=(query:(match:(kubernetes.labels.knative-dev%2FrevisionUID:(query:'${REVISION_UID}',type:phrase))))"
|
DefaultLogURLTemplate = "http://localhost:8001/api/v1/namespaces/knative-monitoring/services/kibana-logging/proxy/app/kibana#/discover?_a=(query:(match:(kubernetes.labels.knative-dev%2FrevisionUID:(query:'${REVISION_UID}',type:phrase))))"
|
||||||
|
// DefaultRequestLogTemplate is the default format for emitting request logs.
|
||||||
|
DefaultRequestLogTemplate = `{"httpRequest": {"requestMethod": "{{.Request.Method}}", "requestUrl": "{{js .Request.RequestURI}}", "requestSize": "{{.Request.ContentLength}}", "status": {{.Response.Code}}, "responseSize": "{{.Response.Size}}", "userAgent": "{{js .Request.UserAgent}}", "remoteIp": "{{js .Request.RemoteAddr}}", "serverIp": "{{.Revision.PodIP}}", "referer": "{{js .Request.Referer}}", "latency": "{{.Response.Latency}}s", "protocol": "{{.Request.Proto}}"}, "traceId": "{{index .Request.Header "X-B3-Traceid"}}"}`
|
||||||
|
|
||||||
// The following is used to set the default metrics backend
|
// The following is used to set the default metrics backend
|
||||||
defaultRequestMetricsBackend = "prometheus"
|
defaultRequestMetricsBackend = "prometheus"
|
||||||
|
|
||||||
// The env var name for config-observability
|
// The env var name for config-observability
|
||||||
configMapNameEnv = "CONFIG_OBSERVABILITY_NAME"
|
configMapNameEnv = "CONFIG_OBSERVABILITY_NAME"
|
||||||
|
reqLogTemplateKey = "logging.request-log-template"
|
||||||
|
enableReqLogKey = "logging.enable-request-log"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ObservabilityConfig contains the configuration defined in the observability ConfigMap.
|
// ObservabilityConfig contains the configuration defined in the observability ConfigMap.
|
||||||
|
@ -72,6 +76,7 @@ type ObservabilityConfig struct {
|
||||||
func defaultConfig() *ObservabilityConfig {
|
func defaultConfig() *ObservabilityConfig {
|
||||||
return &ObservabilityConfig{
|
return &ObservabilityConfig{
|
||||||
LoggingURLTemplate: DefaultLogURLTemplate,
|
LoggingURLTemplate: DefaultLogURLTemplate,
|
||||||
|
RequestLogTemplate: DefaultRequestLogTemplate,
|
||||||
RequestMetricsBackend: defaultRequestMetricsBackend,
|
RequestMetricsBackend: defaultRequestMetricsBackend,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -83,7 +88,8 @@ func NewObservabilityConfigFromConfigMap(configMap *corev1.ConfigMap) (*Observab
|
||||||
if err := cm.Parse(configMap.Data,
|
if err := cm.Parse(configMap.Data,
|
||||||
cm.AsBool("logging.enable-var-log-collection", &oc.EnableVarLogCollection),
|
cm.AsBool("logging.enable-var-log-collection", &oc.EnableVarLogCollection),
|
||||||
cm.AsString("logging.revision-url-template", &oc.LoggingURLTemplate),
|
cm.AsString("logging.revision-url-template", &oc.LoggingURLTemplate),
|
||||||
cm.AsString("logging.request-log-template", &oc.RequestLogTemplate),
|
cm.AsString(reqLogTemplateKey, &oc.RequestLogTemplate),
|
||||||
|
cm.AsBool(enableReqLogKey, &oc.EnableRequestLog),
|
||||||
cm.AsBool("logging.enable-probe-request-log", &oc.EnableProbeRequestLog),
|
cm.AsBool("logging.enable-probe-request-log", &oc.EnableProbeRequestLog),
|
||||||
cm.AsString("metrics.request-metrics-backend-destination", &oc.RequestMetricsBackend),
|
cm.AsString("metrics.request-metrics-backend-destination", &oc.RequestMetricsBackend),
|
||||||
cm.AsBool("profiling.enable", &oc.EnableProfiling),
|
cm.AsBool("profiling.enable", &oc.EnableProfiling),
|
||||||
|
@ -92,15 +98,8 @@ func NewObservabilityConfigFromConfigMap(configMap *corev1.ConfigMap) (*Observab
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
if raw, ok := configMap.Data["logging.enable-request-log"]; ok {
|
if oc.RequestLogTemplate == "" && oc.EnableRequestLog {
|
||||||
if strings.EqualFold(raw, "true") && oc.RequestLogTemplate != "" {
|
return nil, fmt.Errorf("%q was set to true, but no %q was specified", enableReqLogKey, reqLogTemplateKey)
|
||||||
oc.EnableRequestLog = true
|
|
||||||
}
|
|
||||||
} else if oc.RequestLogTemplate != "" {
|
|
||||||
// TODO: remove this after 0.17 cuts, this is meant only for smooth transition to the new flag.
|
|
||||||
// Once 0.17 cuts we should set a proper default value and users will need to set the flag explicitly
|
|
||||||
// to enable request logging.
|
|
||||||
oc.EnableRequestLog = true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if oc.RequestLogTemplate != "" {
|
if oc.RequestLogTemplate != "" {
|
||||||
|
@ -115,9 +114,8 @@ func NewObservabilityConfigFromConfigMap(configMap *corev1.ConfigMap) (*Observab
|
||||||
|
|
||||||
// ConfigMapName gets the name of the metrics ConfigMap
|
// ConfigMapName gets the name of the metrics ConfigMap
|
||||||
func ConfigMapName() string {
|
func ConfigMapName() string {
|
||||||
cm := os.Getenv(configMapNameEnv)
|
if cm := os.Getenv(configMapNameEnv); cm != "" {
|
||||||
if cm == "" {
|
|
||||||
return "config-observability"
|
|
||||||
}
|
|
||||||
return cm
|
return cm
|
||||||
|
}
|
||||||
|
return "config-observability"
|
||||||
}
|
}
|
||||||
|
|
|
@ -129,15 +129,15 @@ function fail_test() {
|
||||||
|
|
||||||
SKIP_TEARDOWNS=0
|
SKIP_TEARDOWNS=0
|
||||||
SKIP_ISTIO_ADDON=0
|
SKIP_ISTIO_ADDON=0
|
||||||
|
E2E_SCRIPT=""
|
||||||
|
|
||||||
# Parse flags and initialize the test cluster.
|
# Parse flags and initialize the test cluster.
|
||||||
function initialize() {
|
function initialize() {
|
||||||
local run_tests=0
|
local run_tests=0
|
||||||
local extra_kubetest2_flags=()
|
local extra_kubetest2_flags=()
|
||||||
local extra_cluster_creation_flags=()
|
local extra_cluster_creation_flags=()
|
||||||
local e2e_script
|
E2E_SCRIPT="$(get_canonical_path "$0")"
|
||||||
e2e_script="$(get_canonical_path "$0")"
|
local e2e_script_command=( "${E2E_SCRIPT}" "--run-tests" )
|
||||||
local e2e_script_command=( "${e2e_script}" "--run-tests" )
|
|
||||||
|
|
||||||
cd "${REPO_ROOT_DIR}"
|
cd "${REPO_ROOT_DIR}"
|
||||||
while [[ $# -ne 0 ]]; do
|
while [[ $# -ne 0 ]]; do
|
||||||
|
|
|
@ -752,7 +752,7 @@ k8s.io/kube-openapi/pkg/util/sets
|
||||||
k8s.io/utils/buffer
|
k8s.io/utils/buffer
|
||||||
k8s.io/utils/integer
|
k8s.io/utils/integer
|
||||||
k8s.io/utils/trace
|
k8s.io/utils/trace
|
||||||
# knative.dev/pkg v0.0.0-20200822174146-f0f096d81292
|
# knative.dev/pkg v0.0.0-20200825005048-1fe808911e69
|
||||||
## explicit
|
## explicit
|
||||||
knative.dev/pkg/apis
|
knative.dev/pkg/apis
|
||||||
knative.dev/pkg/apis/duck/ducktypes
|
knative.dev/pkg/apis/duck/ducktypes
|
||||||
|
@ -776,7 +776,7 @@ knative.dev/pkg/metrics/metricskey
|
||||||
knative.dev/pkg/network
|
knative.dev/pkg/network
|
||||||
knative.dev/pkg/reconciler
|
knative.dev/pkg/reconciler
|
||||||
knative.dev/pkg/system
|
knative.dev/pkg/system
|
||||||
# knative.dev/test-infra v0.0.0-20200820231346-543fe3e80c03
|
# knative.dev/test-infra v0.0.0-20200825022047-cb4bb218c5e5
|
||||||
## explicit
|
## explicit
|
||||||
knative.dev/test-infra/scripts
|
knative.dev/test-infra/scripts
|
||||||
knative.dev/test-infra/tools/dep-collector
|
knative.dev/test-infra/tools/dep-collector
|
||||||
|
|
Loading…
Reference in New Issue