-
Notifications
You must be signed in to change notification settings - Fork 34
generate network policy per operand #1246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Benedikt Bongartz <[email protected]>
Signed-off-by: Benedikt Bongartz <[email protected]>
@@ -52,6 +53,7 @@ func BuildAll(params manifestutils.Params) ([]client.Object, error) { | |||
} | |||
|
|||
var manifests []client.Object | |||
manifests = append(manifests, networking.GenerateOperandPolicies(params.Tempo)...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That should only be done on OpenShift 4.20+.
manifestutils.IngesterComponentName: { | ||
tempoGrpcConn, | ||
}, | ||
netPolicyOtelTargets: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
depending on how tight we want to make the policy, the distributor should only be reachable from the gateway if the gateway is enabled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add unit tests with the generated policy? ideally in yaml format (to be less verbose than Golang), like here: https://github.com/grafana/tempo-operator/blob/main/internal/manifests/config/build_test.go#L23-L26
y, I will do once its working. |
Downside of this approach is that we need to manually align the mapping when we change e.g. a service. But we could generate services based on this too. wdyt?