Skip to content
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

discovery/kubernetes: fix support for password_file and bearer_token_file #5211

Merged
merged 3 commits into from Feb 20, 2019

Conversation

simonpasquier
Copy link
Member

@simonpasquier simonpasquier commented Feb 13, 2019

Closes #5210
Closes #5221

@gouthamve
Copy link
Member

Shouldn't this target the release-2.7 branch? I'll release a 2.7.2 with this fix.

@simonpasquier
Copy link
Member Author

@gouthamve this isn't a regression from the previous minor release so I'd say that it can wait for v2.8.0 but it is up to you if you want to get it fixed in release-2.7.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
@simonpasquier simonpasquier changed the title discovery/kubernetes: fix support for password_file discovery/kubernetes: fix support for password_file and bearer_token_file Feb 19, 2019
@brian-brazil
Copy link
Contributor

👍

@simonpasquier simonpasquier merged commit c8a1a5a into prometheus:master Feb 20, 2019
@simonpasquier simonpasquier deleted the fix-5210 branch February 20, 2019 10:22
@tkornai
Copy link

tkornai commented Feb 21, 2019

Hi @gouthamve, do you still plan to release a new minor version with this fix by any chance? Or can we expect a 2.8 release any time soon? Thanks!

@simonpasquier
Copy link
Member Author

@tkornai the first RC of 2.8 is slated for the end of the month, see https://github.com/prometheus/prometheus/blob/master/RELEASE.md#release-schedule

@adamdecaf
Copy link
Contributor

adamdecaf commented Feb 21, 2019

Is api_server required now? Prometheus's kubernetes discovery works fine without specifying this, but promtool complains that api_server isn't set.

Edit: I'm on promtool from master (commit 5fbda4c)

The current docs mention it can be left off: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#kubernetes_sd_config

FAILED: parsing YAML file infra/14-prometheus.yml: to use custom HTTP client configuration please provide the 'api_server' URL explicitly
    global:
      scrape_interval: 15s
      scrape_timeout: 10s
      evaluation_interval: 15s
    rule_files:
      - /opt/prometheus-rules/*.yml
    scrape_configs:
      - job_name: 'kubernetes-pods'
        kubernetes_sd_configs:
          - role: pod
        relabel_configs:
          - action: labelmap
            regex: __meta_kubernetes_pod_label_(.+)
          - source_labels: [__meta_kubernetes_namespace]
            action: replace
            target_label: kubernetes_namespace
          - source_labels: [__meta_kubernetes_pod_name]
            action: replace
            target_label: kubernetes_pod_name
          - action: labeldrop
            regex: '(pod_template_hash)'

@simonpasquier
Copy link
Member Author

simonpasquier commented Feb 22, 2019

Is api_server required now?

No this shouldn't change with this PR. I'll have a look...

@simonpasquier
Copy link
Member Author

#5256 should fix it. Thanks for reporting @adamdecaf!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants