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

add support to ignore volumeless pods by Resiliency #137

Merged
merged 8 commits into from
Oct 4, 2022

Conversation

alikdell
Copy link
Collaborator

@alikdell alikdell commented Oct 3, 2022

Description

Ignore volumeless pods with Resiliency label.

GitHub Issues

List the GitHub issues impacted by this PR:

GitHub Issue #
#dell/csm#493

Checklist:

  • I have performed a self-review of my own code to ensure there are no formatting, vetting, linting, or security issues
  • I have verified that new and existing unit tests pass locally with my changes
  • I have not allowed coverage numbers to degenerate
  • I have maintained at least 90% code coverage
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • Backward compatibility is not broken

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration

  • Test A
  • Test B

PASS
coverage: 92.3% of statements
status 0
ok podmon/internal/monitor 8.636s coverage: 92.3% of statements

@@ -11,10 +11,12 @@ general:
- CVE-2021-44568
- CVE-2022-0778
- CVE-2022-2526
- CVE-2022-27664
# Disputed CVEs
- CVE-2019-1010022
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we take this opportunity to review this allowedList for CVEs?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We have ubi image upgrade story, we should check in that story. I will add in acceptance criteria

// podToArrayIDs returns the array IDs used by the pod, along with pvCount, and error
func (cm *PodMonitorType) podToArrayIDs(ctx context.Context, pod *v1.Pod) ([]string, int, error) {
arrayIDs := make([]string, 0)
pvlist, _ := K8sAPI.GetPersistentVolumesInPod(ctx, pod)
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this return an error that is being discarded? Should it not be checked?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Here we don't need, error will result in empty pvlist. We check for error where we need to, here for now not needed. When we add multi-array support, then we will need to check error and accordingly return error.

internal/monitor/monitor_steps_test.go Outdated Show resolved Hide resolved
internal/monitor/monitor_steps_test.go Outdated Show resolved Hide resolved
hoppea2
hoppea2 previously approved these changes Oct 4, 2022
atye
atye previously approved these changes Oct 4, 2022
sharmilarama
sharmilarama previously approved these changes Oct 4, 2022
@alikdell alikdell dismissed stale reviews from sharmilarama, atye, and hoppea2 via 6414c50 October 4, 2022 20:32
@alikdell alikdell merged commit c194f5c into main Oct 4, 2022
@alikdell alikdell deleted the krv7951-exclude-pods branch October 5, 2022 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants