-
Notifications
You must be signed in to change notification settings - Fork 472
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
As part of openfaas/docs#173 this patch gives Prometheus a directive and permissions to scrape Pods in the openfaas-fn namespace, so that they can be used in HPAv2. The Prometheus kubernetes_sd_configs is updated to add the default function namespace into scope for scraping. Longer term, a ClusterRoleBinding will be needed to cover the "multiple namespaces" use-case, like there is a ClusterRole/ Binding for faas-netes as a non-default option. The Prometheus scraping may need to look for namespaces or Pods that match an annotation, or have a wildcard scan across all namespaces, instead of the two it has after this PR is merged. @LucasRoesler also raised Push Gateways as an option for future consideration. The watchdog has built-in metrics on port 8082, and will be scraped if the Prometheus scrape annotation is added. Custom HTTP servers are also supported, and you can serve on port 8080, or specify an alternative port via annotations. For instance: prometheus.io/scrape: true prometheus.io/port: 8080 Issue #621 allows the scrape annotation to be overridden, which current cannot due a default set in the controller. Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
- Loading branch information
Showing
26 changed files
with
280 additions
and
186 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Oops, something went wrong.