-
Notifications
You must be signed in to change notification settings - Fork 2k
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
internal/store: fix metrics slice length #1731
internal/store: fix metrics slice length #1731
Conversation
Problem: In kubernetes#1723 a potential panic in the pod metrics gathering was fixed by working around a disconnect of `Spec.Containers` and `Status.ContainerStatuses`. The slice storing the resulting metrics however was still defined based on the length of the `Status.ContainerStatuses` list. Solution: Make the slice dynamic and append metrics to it. Signed-off-by: Jan Fajerski <[email protected]>
|
Thanks. Instead of trying to guess the slice length, I think this is the more sane approach. /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fpetkovski, jan--f 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 |
In kubernetes#1731, the dynamic slice was introduced to fix potential panic under Spec.Containers scenario, however there may be same panic for Spec.InitContainers scenario. This patch fix it referring to kubernetes#1731
In kubernetes#1731, the dynamic slice was introduced to fix potential panic under Spec.Containers scenario, however there may be same panic for Spec.InitContainers scenario. This patch fix it referring to kubernetes#1731 Signed-off-by: honpey <[email protected]>
In kubernetes#1731, the dynamic slice was introduced to fix potential panic under Spec.Containers scenario, however there may be same panic for Spec.InitContainers scenario. This patch fix it referring to kubernetes#1731 Signed-off-by: honpey <[email protected]>
In kubernetes#1731, the dynamic slice was introduced to fix potential panic under Spec.Containers scenario, however there may be same panic for Spec.InitContainers scenario. This patch fix it referring to kubernetes#1731 Signed-off-by: honpey <[email protected]>
Problem: In #1723 a
potential panic in the pod metrics gathering was fixed by working around
a disconnect of
Spec.Containers
andStatus.ContainerStatuses
. Theslice storing the resulting metrics however was still defined based on
the length of the
Status.ContainerStatuses
list.Solution: Make the slice dynamic and append metrics to it.
Signed-off-by: Jan Fajerski [email protected]
What this PR does / why we need it:
How does this change affect the cardinality of KSM: (increases, decreases or does not change cardinality)
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #