-
Notifications
You must be signed in to change notification settings - Fork 368
[MON-2208] Add Oauth2 settings to prometheusK8s.remoteWrite config #1617
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MON-2208] Add Oauth2 settings to prometheusK8s.remoteWrite config #1617
Conversation
/retest |
8f26c62
to
bfe6e19
Compare
/retest |
/lgtm |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/label docs-approved |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
12 similar comments
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
13 similar comments
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/skip |
Ping @Senthamilarasu-STA for px approval. |
/label px-approved |
7f4a64b
to
e63ae8d
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JoaoBraveCoding, raptorsun, simonpasquier The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@raptorsun: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
@@ -164,6 +164,8 @@ type RemoteWriteSpec struct { | |||
QueueConfig *monv1.QueueConfig `json:"queueConfig,omitempty"` | |||
// MetadataConfig configures the sending of series metadata to remote storage. | |||
MetadataConfig *monv1.MetadataConfig `json:"metadataConfig,omitempty"` | |||
// OAuth2 configures OAuth2 authentication for remote write. | |||
OAuth2 *monv1.OAuth2 `json:"oauth2,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@raptorsun for monv1.OAuth2
, checked in https://github.com/openshift/cluster-monitoring-operator/blob/release-4.11/vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1/types.go#L1171-L1183
the OAuth2 struct
do not have tls_config
field as listed in
https://prometheus.io/docs/prometheus/latest/configuration/configuration/#oauth2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good point. I'm going to submit a PR to add this field to the upstream Prometheus Operator 👍
In OAuth2 the necessary configurations are Client ID, Client Secret and TokenURL.
TLSConfig sets TLS for requesting token from TokenURL, which is not required on all endpoints of TokenURL, so this still works on most systems. We can live without that field :)
/label qe-approved |
This PR addes Oauth2 settings to PrometheusK8s.remoteWrite config, allowing prometheus remoteWrite use client secret to access the remote write server. An example config can be: