-
Notifications
You must be signed in to change notification settings - Fork 26
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
feat: Enable prometheus merge as a configuration in the Kyma Istio CR #1232
base: main
Are you sure you want to change the base?
feat: Enable prometheus merge as a configuration in the Kyma Istio CR #1232
Conversation
Hi @jeffreylimnardy can you please look at the failing tests and let us know when they are green :) |
Sorry for the delay! Working on it, I was out sick for the last 2 weeks 🤒 , tests are green now! :) |
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
New changes are detected. LGTM label has been removed. |
I tested it with the following script:
It is able to get the application metrics exposed via istio-proxy on port 15020:
|
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.
PrometheusMergeRestartPredicate needs to compare current pod with the desired state from the Istio CR
} | ||
|
||
func (p PrometheusMergeRestartPredicate) Matches(_ v1.Pod) bool { | ||
return p.oldPrometheusMerge != p.newPrometheusMerge |
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.
This only checks the 'last applied configuration' and the current one of the Istio CR and ignores the current workload state.
So it works improperly:
- it restarts workloads endlessly if there is a configuration change in the Istio CR
- it won't restart workloads if there are subsequent Istio CR changes, so the configuration change in the Istio CR is not visible
I observed the first problem in my local environment - I changed the prometheusMerge flag in the Istio CR and my workload is restarted every minute with every Istio reconcilliation.
It should rather compare the given pod (passed to this function as a parameter) with the desired state of the Istio CR (istioCR.Spec.Config.Telemetry.Metrics.PrometheusMerge). It may just look if prometheus on pod annotations are properly set.
Description
Changes proposed in this pull request:
enablePrometheusMerge
in the Kyma Istio CR which by default is set to false. When set to true it will behave as described in this ADR.Pre-Merge Checklist
Related issues
Resolves #1185