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

Projects
None yet
5 participants
@simonpasquier
Copy link
Member

simonpasquier commented Feb 13, 2019

Closes #5210
Closes #5221

@gouthamve

This comment has been minimized.

Copy link
Member

gouthamve commented Feb 14, 2019

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

@simonpasquier

This comment has been minimized.

Copy link
Member Author

simonpasquier commented Feb 14, 2019

@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.

@simonpasquier simonpasquier force-pushed the simonpasquier:fix-5210 branch from 220ef94 to 0199a49 Feb 14, 2019

simonpasquier added some commits Feb 13, 2019

discovery/kubernetes: fix support for password_file
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
Create and pass custom RoundTripper to Kubernetes client
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
Use inline HTTPClientConfig
Signed-off-by: Simon Pasquier <spasquie@redhat.com>

@simonpasquier simonpasquier force-pushed the simonpasquier:fix-5210 branch from c5f045a to df6bd69 Feb 15, 2019

@simonpasquier simonpasquier requested a review from brancz Feb 15, 2019

@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

This comment has been minimized.

Copy link
Member

brian-brazil commented Feb 19, 2019

👍

@simonpasquier simonpasquier merged commit c8a1a5a into prometheus:master Feb 20, 2019

3 checks passed

ci/circleci: build Your tests passed on CircleCI!
Details
ci/circleci: test Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@simonpasquier simonpasquier deleted the simonpasquier:fix-5210 branch Feb 20, 2019

@tkornai

This comment has been minimized.

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

This comment has been minimized.

Copy link
Member Author

simonpasquier commented Feb 21, 2019

@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

This comment has been minimized.

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

This comment has been minimized.

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

This comment has been minimized.

Copy link
Member Author

simonpasquier commented Feb 22, 2019

#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
You can’t perform that action at this time.