Provide enhanced error messages for NetworkPolicy violations
What is the nature and description of the request?
A customer’s sysadmins recently noted to us that they’ve invested time in writing a knowledgebase for their cluster’s developers to use when deploying and troubleshooting apps, and they frequently refer developers to it when devs come to them for help.
In the case of Network Policy, it might be useful to provide a way for NetworkPolicy authors to specify a custom error message to log when connections are refused or violations are logged. They could use this to provide the developer with a URL that points to the KB article explaining how to effectively work within the constraints of the network policy in question.
Would need to ensure that the log specifies which rule lead to the drop
Why does the customer need this?
Reduce the amount of repetitive, easily-solved debugging that developer users ask sysadmins to intervene on.
Easily point developers towards custom documentation or best practices.