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

Fix auto-discovery for latest versions on Kubernetes #9574

Merged
merged 3 commits into from
Jul 1, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions kube_scheduler/assets/configuration/spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,31 @@ files:
options: []
- template: instances
options:
- name: prometheus_url
- name: prometheus_possible_urls
required: true
description: The URL where your application metrics are exposed by Prometheus.
description: |
The URLs to try to get your application metrics that are exposed by Prometheus.
The check will try each URLs in the list and will use the first working one.
One of prometheus_possible_urls or prometheus_url parameter is required.
value:
type: array
items:
type: string
example:
- https://%%host%%:10259/metrics
- https://localhost:10259/metrics
- http://%%host%%:10251/metrics
- http://localhost:10251/metrics
- name: prometheus_url
required: false
description: |
The URL where your application metrics are exposed by Prometheus.
One of prometheus_possible_urls or prometheus_url parameter is required.
value:
example: http://%%host%%:10251/metrics
type: string
- name: bearer_token_auth
required: true
description: |
Used if you are using RBACs and need the Agent to authenticate
against the APIServer to retrieve metrics. Default to true.
Expand All @@ -59,6 +77,7 @@ files:
type: string
example: /var/run/secrets/kubernetes.io/serviceaccount/token
- name: ssl_verify
required: true
description: Used to verify self signed certificates.
value:
type: boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,35 @@ init_config:
#
instances:

## @param prometheus_url - string - required
## @param prometheus_possible_urls - list of strings - required
## The URLs to try to get your application metrics that are exposed by Prometheus.
## The check will try each URLs in the list and will use the first working one.
## One of prometheus_possible_urls or prometheus_url parameter is required.
#
- prometheus_possible_urls:
- https://%%host%%:10259/metrics
- https://localhost:10259/metrics
- http://%%host%%:10251/metrics
- http://localhost:10251/metrics

## @param prometheus_url - string - optional - default: http://%%host%%:10251/metrics
## The URL where your application metrics are exposed by Prometheus.
## One of prometheus_possible_urls or prometheus_url parameter is required.
#
- prometheus_url: http://%%host%%:10251/metrics
# prometheus_url: http://%%host%%:10251/metrics

## @param bearer_token_auth - boolean - optional - default: true
## @param bearer_token_auth - boolean - required
## Used if you are using RBACs and need the Agent to authenticate
## against the APIServer to retrieve metrics. Default to true.
#
# bearer_token_auth: true
bearer_token_auth: true

## @param bearer_token_path - string - optional - default: /var/run/secrets/kubernetes.io/serviceaccount/token
## Used to specify the path where the service account token is located.
#
# bearer_token_path: /var/run/secrets/kubernetes.io/serviceaccount/token

## @param ssl_verify - boolean - optional - default: false
## @param ssl_verify - boolean - required
## Used to verify self signed certificates.
#
# ssl_verify: false
ssl_verify: false