Ignore pods with no IP address, this can be the case if pod is still in pending state. This will help prevent following error when injecting network fault:
{"source":"pod-network-corruption-helper-nrb8b","errorCode":"HELPER_ERROR","phase":"ChaosInject","reason":"failed to create destination ips match filters: Illegal \"match\"\n"}
I was considering getting pod IPs from SVC endpoints; however, the RBAC permissions for Chaos Helper pods don't have access to list endpoints, which would likely become a breaking change. We can consider moving to that approach when we plan to rollout the next major version.
Which issue this PR fixes(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #
What this PR does / why we need it:
Ignore pods with no IP address, this can be the case if pod is still in pending state. This will help prevent following error when injecting network fault:
I was considering getting pod IPs from SVC endpoints; however, the RBAC permissions for Chaos Helper pods don't have access to list endpoints, which would likely become a breaking change. We can consider moving to that approach when we plan to rollout the next major version.
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): fixes #Fixes https://github.com/litmuschaos/litmus/issues/4395
Special notes for your reviewer:
Checklist:
breaking-changes
tagrequires-upgrade
tag