-
Notifications
You must be signed in to change notification settings - Fork 455
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
[GEP-19] Migrate aggregate Prometheus deployment and configuration #9200
[GEP-19] Migrate aggregate Prometheus deployment and configuration #9200
Conversation
3720257
to
875e090
Compare
`Ingress`, rules and configs are still missing. Will follow in separate commits.
875e090
to
eadc93d
Compare
The `metering.rules.stateful.yaml` file is exactly the same as used in the cache Prometheus. There is a bash script generating it (https://github.com/gardener/gardener/blob/master/pkg/component/monitoring/prometheus/cache/assets/prometheusrules/metering.rules.stateful.sh). Let's simply copy it from there and reuse it.
We use a `ScrapeConfig` resource here because we explicitly want to have the `role=service` in the `kubernetes_sd_configs`
We already follow this approach for optimizing the transitive imports for other components, see - pkg/component/coredns/constants - pkg/component/etcd/constants - pkg/component/kubeapiserver/constants - pkg/component/nodelocaldns/constants - pkg/component/resourcemanager/constants - pkg/component/vpa/constants Without this, we would introduce some undesired transitive package imports, requiring to update the skaffold config: ``` >> Checking defined dependencies in Skaffold config 'provider-local' for 'gardener-extension-provider-local' in 'skaffold.yaml'... >>> The following actual dependencies are missing (need to be added): pkg/component/etcd pkg/component/etcd/constants pkg/component/monitoring pkg/component/monitoring/alertmanager pkg/component/monitoring/prometheus pkg/component/monitoring/prometheus/cache >>> The following dependencies are not needed actually (need to be removed): >>> Run './hack/update-skaffold-deps.sh' to fix. >> Checking defined dependencies in Skaffold config 'gardenlet' for 'gardener-node-agent' in 'skaffold.yaml'... >>> The following actual dependencies are missing (need to be added): pkg/component/etcd pkg/component/etcd/constants pkg/component/monitoring pkg/component/monitoring/alertmanager pkg/component/monitoring/prometheus pkg/component/monitoring/prometheus/cache pkg/extensions pkg/utils/kubernetes/unstructured >> Checking defined dependencies in Skaffold config 'gardener-operator' for 'gardener-operator' in 'skaffold-operator.yaml'... >>> The following actual dependencies are missing (need to be added): pkg/component/monitoring pkg/component/monitoring/alertmanager pkg/component/monitoring/prometheus >>> The following dependencies are not needed actually (need to be removed): >>> Run './hack/update-skaffold-deps.sh' to fix. ``` This approach actually allows us to drop some package dependencies.
eadc93d
to
594573d
Compare
/assign |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the awesome pull request. I have a few questions/comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
LGTM label has been added. Git tree hash: 53303ded216535207b1afe4f3fa29b429f9e473f
|
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rfranzke The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
How to categorize this PR?
/area dev-productivity monitoring
/kind enhancement
What this PR does / why we need it:
Similar to #9128 and #9180, this PR migrates management of the aggregate Prometheus deployment and its configuration to
prometheus-operator
.The learnings/follow-ups from #9189 and #9195 are already incorporated.
Which issue(s) this PR fixes:
Part of #9065
Special notes for your reviewer:
/cc @oliver-goetz @ScheererJ
FYI @istvanballok @rickardsjp
Release note:
It is now possible to provide configuration for the aggregate Prometheus running in seed clusters' `garden` namespaces. Read all about it [here](https://github.com/gardener/gardener/tree/master/docs/extensions/logging-and-monitoring.md#aggregate-prometheus).