diff --git a/CHANGELOG.md b/CHANGELOG.md index 1227ec717afc..1c9456632ef9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,8 @@ Main (unreleased) network. As a result of this change, the `client_config` field has been removed. (@rfratto) +- Enable `proxy_url` support on `oauth2` for metrics and logs (update **prometheus/common** dependency to `v0.33.0`). (@martin-jaeger-maersk) + - `extra-scrape-metrics` can now be enabled with the `--enable-features=extra-scrape-metrics` feature flag. See https://prometheus.io/docs/prometheus/2.31/feature_flags/#extra-scrape-metrics for details. (@rlankfo) ### Bugfixes diff --git a/go.mod b/go.mod index 406974777626..e206e0edd2ef 100644 --- a/go.mod +++ b/go.mod @@ -67,7 +67,7 @@ require ( github.com/prometheus-operator/prometheus-operator v0.55.0 github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.55.0 github.com/prometheus/client_golang v1.12.1 - github.com/prometheus/common v0.32.1 + github.com/prometheus/common v0.33.0 github.com/prometheus/consul_exporter v0.7.2-0.20210127095228-584c6de19f23 github.com/prometheus/memcached_exporter v0.9.0 github.com/prometheus/mysqld_exporter v0.13.0 @@ -94,7 +94,7 @@ require ( go.uber.org/atomic v1.9.0 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 - golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd + golang.org/x/net v0.0.0-20220225172249-27dd8689420f golang.org/x/sys v0.0.0-20220222172238-00053529121e google.golang.org/grpc v1.44.0 gopkg.in/alecthomas/kingpin.v2 v2.2.6 @@ -439,7 +439,7 @@ require ( gocloud.dev v0.24.0 // indirect golang.org/x/crypto v0.0.0-20220214200702-86341886e292 // indirect golang.org/x/mod v0.5.1 // indirect - golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect + golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect golang.org/x/text v0.3.7 // indirect diff --git a/go.sum b/go.sum index cd940dd888db..8f1ce4dd57d2 100644 --- a/go.sum +++ b/go.sum @@ -2137,8 +2137,9 @@ github.com/prometheus/common v0.28.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+ github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.31.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/common v0.33.0 h1:rHgav/0a6+uYgGdNt3jwz8FNSesO/Hsang3O0T9A5SE= +github.com/prometheus/common v0.33.0/go.mod h1:gB3sOl7P0TvJabZpLY5uQMpUqRCPPCyRLCZYc7JZTNE= github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= github.com/prometheus/consul_exporter v0.7.2-0.20210127095228-584c6de19f23 h1:uiqUXSekO5KtYy79evDl2Nuy6M2QXrYupqNQjUbhIwA= @@ -2811,8 +2812,9 @@ golang.org/x/net v0.0.0-20211020060615-d418f374d309/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211216030914-fe4d6282115f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd h1:O7DYs+zxREGLKzKoMQrtrEacpb0ZVXA5rIwylE2Xchk= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f h1:oA4XRj0qtSt8Yo1Zms0CUlsT3KG69V2UGQWPBxujDmc= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/oauth2 v0.0.0-20170807180024-9a379c6b3e95/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -2835,8 +2837,9 @@ golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 h1:RerP+noqYHUQ8CMRcPlC2nvTa4dcBIjegkuWdcUDuqg= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b h1:clP8eMhB30EHdc0bd2Twtq6kgU7yl5ub2cQLSdrv1Dg= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= diff --git a/pkg/metrics/instance/configstore/api_test.go b/pkg/metrics/instance/configstore/api_test.go index ba5ab2b550e0..6a90b98b563d 100644 --- a/pkg/metrics/instance/configstore/api_test.go +++ b/pkg/metrics/instance/configstore/api_test.go @@ -136,6 +136,7 @@ func TestAPI_GetConfiguration_ScrubSecrets(t *testing.T) { scrape_configs: - job_name: local_scrape follow_redirects: true + enable_http2: true honor_timestamps: true metrics_path: /metrics scheme: http @@ -164,6 +165,7 @@ remote_write: min_backoff: 30ms max_backoff: 100ms follow_redirects: true + enable_http2: true metadata_config: send: true send_interval: 1m diff --git a/pkg/metrics/instance/host_filter_test.go b/pkg/metrics/instance/host_filter_test.go index 32bcd6e62623..aa53bd25b727 100644 --- a/pkg/metrics/instance/host_filter_test.go +++ b/pkg/metrics/instance/host_filter_test.go @@ -173,12 +173,15 @@ func TestHostFilter_PatchSD(t *testing.T) { metrics_path: /metrics scheme: http follow_redirects: true + enable_http2: true kubernetes_sd_configs: - role: service kubeconfig_file: "" follow_redirects: true + enable_http2: true - role: pod follow_redirects: true + enable_http2: true kubeconfig_file: "" selectors: - role: pod diff --git a/pkg/metrics/instance/marshal_test.go b/pkg/metrics/instance/marshal_test.go index 7b5356d26de5..8a4ca88d68ac 100644 --- a/pkg/metrics/instance/marshal_test.go +++ b/pkg/metrics/instance/marshal_test.go @@ -32,6 +32,7 @@ func TestMarshal_UnmarshalConfig_RetainSecrets(t *testing.T) { scrape_configs: - job_name: local_scrape follow_redirects: true + enable_http2: true honor_timestamps: true metrics_path: /metrics scheme: http @@ -60,6 +61,7 @@ remote_write: min_backoff: 30ms max_backoff: 100ms follow_redirects: true + enable_http2: true metadata_config: max_samples_per_send: 500 send: true @@ -85,6 +87,7 @@ func TestMarshal_UnmarshalConfig_ScrubSecrets(t *testing.T) { scrape_configs: - job_name: local_scrape follow_redirects: true + enable_http2: true honor_timestamps: true metrics_path: /metrics scheme: http @@ -113,6 +116,7 @@ remote_write: min_backoff: 30ms max_backoff: 100ms follow_redirects: true + enable_http2: true metadata_config: max_samples_per_send: 500 send: true