Skip to content

📖 Add NetworkPolicy doc #1973

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

anik120
Copy link
Contributor

@anik120 anik120 commented May 16, 2025

Description

Reviewer Checklist

  • API Go Documentation
  • Tests: Unit Tests (and E2E Tests, if appropriate)
  • Comprehensive Commit Messages
  • Links to related GitHub Issue(s)

@anik120 anik120 requested a review from a team as a code owner May 16, 2025 15:58
Copy link

netlify bot commented May 16, 2025

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit 2de220b
🔍 Latest deploy log https://app.netlify.com/projects/olmv1/deploys/682760c3d4d0f6000845db7e
😎 Deploy Preview https://deploy-preview-1973--olmv1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

openshift-ci bot commented May 16, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign michaelryanpeter for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

codecov bot commented May 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.99%. Comparing base (9a61b22) to head (2de220b).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1973      +/-   ##
==========================================
- Coverage   69.10%   68.99%   -0.12%     
==========================================
  Files          79       79              
  Lines        7011     7011              
==========================================
- Hits         4845     4837       -8     
- Misses       1885     1891       +6     
- Partials      281      283       +2     
Flag Coverage Δ
e2e 41.42% <ø> (-0.06%) ⬇️
unit 59.84% <ø> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.


If you encounter network connectivity issues after deploying OLMv1, consider the following:

* Verify NetworkPolicy support: Ensure your cluster has a CNI plugin that supports NetworkPolicy
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: If the CNI does not support NP, does this not mean that the NPs applied have no effect at all? So, I mean, if my k8s is using a CNI that does not provide this support is like it does not make any difference and no network connectivity issues could be faced. Am I right?

If you encounter network connectivity issues after deploying OLMv1, consider the following:

* Verify NetworkPolicy support: Ensure your cluster has a CNI plugin that supports NetworkPolicy
* Check pod labels: Confirm that catalogd and operator-controller pods have the correct labels for NetworkPolicy selection
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we be more specific here?
For example, could we give the kubectl commands to help the user ensure that the labels used to do the match are present?

* Verify NetworkPolicy support: Ensure your cluster has a CNI plugin that supports NetworkPolicy
* Check pod labels: Confirm that catalogd and operator-controller pods have the correct labels for NetworkPolicy selection
* Inspect logs: Check component logs for connection errors
* Test connectivity: Run test pods that attempt to communicate with OLMv1 components
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add an example here with the commands to help the user and us to know how to do those checks?

Comment on lines +81 to +87
## Future Enhancements

The operator-framework team plan to revisit improvements to network policies in the future, such as:

* More restrictive egress rules based on configured catalog image references
* Further securing metrics and webhook server access
* Dynamic network policy updates based on configured bundle image references
Copy link
Contributor

@camilamacedo86 camilamacedo86 May 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we do not need to add the FE part, when we enhance/if we enhance, then we update this doc with the changes applied

* Catalogd's HTTPS server (on port 8443)
* Image registries specified in bundle metadata

Currently, all egress traffic from operator-controller is allowed to support communication with arbitrary image registries that aren't known at install time.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about linking the code from the repo?
So, those looking can easily check the NPs by clicking on them.

* The Kubernetes API server
* Image registries specified in ClusterCatalog objects

Currently, all egress traffic from catalogd is allowed, to support communication with arbitrary image registries that aren't known at install time.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about linking the code from the repo?
So, those looking can easily check the NPs by clicking on them.

Copy link
Contributor

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work🥇
I just suggested some minor fixes and improvements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants