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

Merged

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 f412606
🔍 Latest deploy log https://app.netlify.com/projects/olmv1/deploys/682df00b0fc224000869e8b0
😎 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

codecov bot commented May 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.10%. Comparing base (9a61b22) to head (f412606).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1973      +/-   ##
==========================================
- Coverage   69.10%   69.10%   -0.01%     
==========================================
  Files          79       79              
  Lines        7011     7023      +12     
==========================================
+ Hits         4845     4853       +8     
- Misses       1885     1888       +3     
- Partials      281      282       +1     
Flag Coverage Δ
e2e 43.11% <ø> (+1.63%) ⬆️
unit 59.96% <ø> (+0.03%) ⬆️

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.

* 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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd actually started doing this, but it got very complicated very soon. That made me lean towards removing this line altogether, to keep this doc simple for now. We could either

  1. keep this out till we see the need to add this point with enhanced examples because end users are getting into this situation a lot, or
  2. add this section in a follow up PR.

I'm definitely leaning toward 1 over 2.

* 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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know how I feel about that tbh. If we just link the yaml file, that's self documenting 😄.

This doc is to expand on that yaml file, in words.

I feel like users who're adept enough at reading yaml files will find that file and know how to read it anyway, and this is for those users who will need help understanding that yaml file.

Which is why I didn't include the link to the yaml file in the first place.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know how I feel about that tbh. If we just link the yaml file, that's self documenting 😄.
Yes, can we link the YAMLs?

For me, for example, it would be much easier to check the NP directly rather than reading the documentation.
As a new contributor and user, I might not even know where they live in the repo.

So the suggestion here is simply to add a direct link to the YAML files.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added links to the NetworkPolicy yaml files from the repo in the overview section 👍🏽

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.

@anik120 anik120 force-pushed the networkpolicy-docs branch from 2de220b to 5f35624 Compare May 20, 2025 20:03
@anik120 anik120 force-pushed the networkpolicy-docs branch from 5f35624 to f412606 Compare May 21, 2025 15:23
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.

Great 👍 🥇

It seems great for me to 🪰
Thank you for your amazing contribution 🥇

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 21, 2025
Copy link

openshift-ci bot commented May 21, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: camilamacedo86

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

The pull request process is described 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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 21, 2025
@openshift-merge-bot openshift-merge-bot bot merged commit 10314ff into operator-framework:main May 21, 2025
22 checks passed
@@ -0,0 +1,94 @@
# NetworkPolicy in OLMv1
Copy link
Contributor

Choose a reason for hiding this comment

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

@michaelryanpeter I think it would be nice to get your help with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants