aws / aws-network-policy-agent

Apache License 2.0
45 stars 29 forks source link

Avoid panic when network policy agent is disabled #323

Closed jaydeokar closed 2 weeks ago

jaydeokar commented 4 weeks ago

Issue #, if available: Fixes -> https://github.com/aws/aws-network-policy-agent/issues/258

Description of changes: When Network Policy Agent is disabled, but there are still some Policy Endpoints in the cluster, the agent fails. This was an intentional behavior to let the user know about cleaning up the stale policy endpoints in the cluster. With this change, the agent panic is removed and the reconciliation of policyendpoints is ignored when the agent is disabled. This is to support use case where a user needs to migrate from one NP implementation to another gradually.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.