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

[GEP-19] Migrate seed Prometheus deployment and configuration #9180

Merged
merged 12 commits into from
Feb 21, 2024

Conversation

rfranzke
Copy link
Member

How to categorize this PR?

/area dev-productivity monitoring
/kind enhancement

What this PR does / why we need it:
Similar to #9128, this PR migrates management of the seed Prometheus deployment and its configuration to prometheus-operator.

As part of this, I adapted the VerticalPodAutoscaler spec for Prometheis in the pkg/componen/tmonitoring/prometheus package to reflect the changes from #9175.

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 seed 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#seed-prometheus).

@gardener-prow gardener-prow bot added area/dev-productivity Developer productivity related (how to improve development) area/monitoring Monitoring (including availability monitoring and alerting) related kind/enhancement Enhancement, improvement, extension cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Feb 16, 2024
@gardener-prow gardener-prow bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 16, 2024
@gardener-prow gardener-prow bot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Feb 19, 2024
Copy link
Contributor

@ScheererJ ScheererJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for this nicely structured improvement.

@gardener-prow gardener-prow bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 19, 2024
@rfranzke rfranzke force-pushed the gep19/seed-prometheus branch 2 times, most recently from 6dbd32c to b99221f Compare February 19, 2024 16:08
Copy link
Contributor

@ScheererJ ScheererJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for the explanations.

/lgtm

@gardener-prow gardener-prow bot added the lgtm Indicates that a PR is ready to be merged. label Feb 20, 2024
Copy link
Contributor

gardener-prow bot commented Feb 20, 2024

LGTM label has been added.

Git tree hash: 1b19ef1289dd91a58938c9b91d7a148d83fc7361

@oliver-goetz
Copy link
Member

/assign

Copy link
Member

@oliver-goetz oliver-goetz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice PR, thanks 🚀

pkg/component/monitoring/prometheus/seed/scrapeconfigs.go Outdated Show resolved Hide resolved
pkg/component/monitoring/prometheus/seed/podmonitors.go Outdated Show resolved Hide resolved
@@ -43,11 +44,15 @@ func (p *prometheus) vpa() *vpaautoscalingv1.VerticalPodAutoscaler {
},
ResourcePolicy: &vpaautoscalingv1.PodResourcePolicy{
ContainerPolicies: []vpaautoscalingv1.ContainerResourcePolicy{
{
ContainerName: "*",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does VPA merge ContainerPolicies? Otherwise, there won't be a match. Afaik prometheus runs 2 container only (prometheus, config-reloader) which have already dedicated policies.
I suggest to include this setting into prometheus container, config-reloader is not scaled anyway.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, we just talked about this a few hours ago with @voelzmo 😄 Actually, we don't know for sure. I was just reflecting the change from #9175 so that it also gets applied when Prometheus is managed via prometheus-operator. In the scope of this PR, this is correct/what we should do. If we think this VPA definition is wrong, then let's fix it separately (my goal is just to translate/refactor the Helm charts to "mgmt via prom-operator", not to change/add/remove/reinvent things). :) OK?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure now, that VPA does not merge ContainerPolicy (ref).
Anyway, we can fix it in an own PR too.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for checking @oliver-goetz!
@voelzmo @nickytd Would you like to open a PR that addresses these concerns?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done: #9192

@gardener-prow gardener-prow bot removed the lgtm Indicates that a PR is ready to be merged. label Feb 20, 2024
@rfranzke
Copy link
Member Author

I added a new commit which adapts the seed-care controller to incorporate the health of the new prometheus-seed ManagedResource when computing the seed conditions (similar to #9189) :)

@oliver-goetz
Copy link
Member

/lgtm
/approve

@gardener-prow gardener-prow bot added the lgtm Indicates that a PR is ready to be merged. label Feb 20, 2024
Copy link
Contributor

gardener-prow bot commented Feb 20, 2024

LGTM label has been added.

Git tree hash: 9dd09ae768678b31d23323dd896e0bd9837d3390

Copy link
Contributor

gardener-prow bot commented Feb 20, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: oliver-goetz

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@gardener-prow gardener-prow bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Feb 20, 2024
@gardener-prow gardener-prow bot removed lgtm Indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Feb 21, 2024
@oliver-goetz
Copy link
Member

/lgtm
🚀

@gardener-prow gardener-prow bot added the lgtm Indicates that a PR is ready to be merged. label Feb 21, 2024
Copy link
Contributor

gardener-prow bot commented Feb 21, 2024

LGTM label has been added.

Git tree hash: e2e301c6b81b4932a1b893c3b8424fc7cd409a02

@gardener-prow gardener-prow bot merged commit a0af468 into gardener:master Feb 21, 2024
16 checks passed
@rfranzke rfranzke deleted the gep19/seed-prometheus branch February 21, 2024 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/dev-productivity Developer productivity related (how to improve development) area/monitoring Monitoring (including availability monitoring and alerting) related cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. kind/enhancement Enhancement, improvement, extension lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants