-
Notifications
You must be signed in to change notification settings - Fork 14
feat(network): enable internal ingress network policy #208
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4fc35da to
7ddb61a
Compare
ebaron
reviewed
Nov 21, 2024
Member
ebaron
left a comment
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.
When testing on OpenShift, I seem to be getting 503 errors when trying to access Cryostat through its Route. When the Network Policy is disabled, the route works fine. Not sure why
tthvo
reviewed
Nov 22, 2024
tthvo
reviewed
Nov 22, 2024
12c39b4 to
735dd80
Compare
This was referenced Jan 14, 2025
ebaron
approved these changes
Apr 3, 2025
mergify bot
pushed a commit
that referenced
this pull request
Apr 7, 2025
(cherry picked from commit c7fb4f2)
andrewazores
added a commit
that referenced
this pull request
Apr 7, 2025
(cherry picked from commit c7fb4f2) Co-authored-by: Andrew Azores <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Related to #205
To test on OpenShift:
helm install --set core.route.enabled=true --set authentication.openshift.enabled=true cryostat ./charts/cryostatoc run runner --image=registry.access.redhat.com/ubi8/ubi --rm -it /bin/bash. This runs an additional Pod in the same installation namespace, but one which is not part of Cryostat and does not have the same selector labels. Once this comes up and you have a shell,curl -v http://cryostat:8181orcurl -v http://cryostat-storage:8333. These should time out.echo https://$(oc get route -n cryostat cryostat -o jsonpath="{.status.ingress[0].host}")) and ensure Cryostat UI behaves as usual. Create alocalhost:0custom target, start and archive a recording, etc.helm uninstall cryostathelm install --set core.route.enabled=true --set authentication.openshift.enabled=true --set networkPolicy.ingress.enabled=false cryostat ./charts/cryostatoc run runner --image=registry.access.redhat.com/ubi8/ubi --rm -it /bin/bash. Once this comes up and you have a shell,curl -v http://cryostat:8181orcurl -v http://cryostat-storage:8333. These should succeed and return HTTP responses quickly.Similar testing on other types of cluster (
kind,minikube) should also work, with the usual adjustments (don't usecore.route.enabledorauthentication.openshift.enabled, etc.).I also spent some time trying to define Egress policies. I thought this would be interesting along the same lines as cryostatio/cryostat-agent#242 and cryostatio/cryostat#323 - we could add network-level restrictions (firewall rules) to prevent Cryostat from being made to open network connections to unexpected destinations, ie. namespaces outside of the admin's chosen list of target namespaces. However, I ran into issues where this interrupted Cryostat's ability to connect to its own database deployment, and I was also not completely sure the right approach to allow Cryostat and the openshift-oauth-proxy to have traffic egress to the k8s API server (for doing RBAC checks, or Endpoints discovery). I'm holding off on that idea for now, but it may be worth following up with again later.