fix: Run exec commands only on container that is nginx-ingress #216
+40
−32
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed changes
This PR addresses GitHub Issue 213.
When a customer deploys an NGINX Ingress Controller (NIC) pod with NGINX App-Protect (NAP) the exec commands such as
nginx -T
and./nginx-ingress
version throw an error when run in containers that are notnginx-ingress
such aswaf-enforcer
andwaf-config-mgr
.This PR fixes it by running the exec commands against the target container instead of all containers in the pod.
This fix only addresses the scenario for NGINX Ingress Controller (NIC), other products to follow in later PRs with further testing.
Checklist
Before creating a PR, run through this checklist and mark each as complete.