Without this access the logs of metrics-server will show the following error line:
```
unable to fully scrape metrics from source kubelet_summary:k8s-1: unable to fetch metrics from Kubelet k8s-1 (10.8.10.14): request failed - "403 Forbidden", response: "Forbidden (user=system:serviceaccount:kube-system:metrics-server, verb=get, resource=nodes, subresource=stats)",
```
and `kubectl top nodes` will give no results
When handling big Kubernetes objects, marshalling objects is memory
intense. This can be reproduced with the end-to-end test
`TestPrometheusRulesExceedingConfigMapLimit`. This patch doubles the
memory request and limit of the Prometheus Operator deployment to 100mb
and 200mb.
As requested, this updates the resource specification to live directly in config.kubeStateMetrics
It also clarifies the config variables. These names are what google uses in some of their tooling.
(And a slight tweak to the way collectors are specified)
As I work with kube-state-metrics in a large cluster, I found I needed to make some adjustments.
- Expose the collectors, allowing one to configure exclusions.
- Expose the addon_resizer parameters, facilitating reproduce adjustments
- Allow adjusting scrapeTimeout and scrapeInterval
Previously the `manifests` and `vendor` folder content has been build
via `manifests/**` and `vendor/**` target definitions. This results in
two issues:
1. The GNU Make recipe is executed for every single file in the folders.
2. Not all timestamps inside the `manifests` folder would be updated on
every run, thereby needing to be rerun on all following target
executions.
Solution:
1. Define the target based on the folder, not individual files
2. Remove target folder before execution recipe to ensure all timestamps
are updated.
- Move prometheus-config-reloader to cmd/
- Refactor Makefile & contrib/kube-prometheus/Makefile
- Only execute a target if its dependencies changed
- Create empty target file for docker builds
- Replace promu with plain static `go build`