Add support for reporting destination Kubernetes service #145
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.
Description
This PR adds the capability for the network mapper to keep the information it gets regarding pod-to-service connections. Previously, when the network mapper saw a Kubernetes service, it would resolve through the service to the destination pods. This additional information is useful for display and makes it easier to understand which Kubernetes service the intents are referring to. In addition, it is designed to be used with a new experimental feature in the intents-operator, which enables you to specify a Kubernetes service in intents. This is not only more readable, but it also makes it possible to add a port restriction to the network policy. The target port specified by the Kubernetes service will be used in the resulting network policy.
Coupled with an accompanying change in the Otterize network-mapper CLI, it will be possible to export intents that target Kubernetes services.
References
Intents operator pull request: otterize/intents-operator#256
Testing
Checklist
This change is experimental and API-only at this time, as we are still figuring out the schema for the ClientIntents.