-
Notifications
You must be signed in to change notification settings - Fork 374
CNTRLPLANE-206: Add NetworkPolicy to shared-ingress #6173
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
WalkthroughA new Kubernetes NetworkPolicy for router pods was introduced, along with logic to reconcile and manage this policy based on cluster capabilities and network configuration. The SharedIngressReconciler struct now includes a capability checker, and the controller setup was updated to initialize this new field. Changes
Sequence Diagram(s)sequenceDiagram
participant Controller
participant Capabilities
participant ClusterConfig
participant K8sAPI
Controller->>Capabilities: Check for Networks/DNS capabilities
alt Networks capability present
Controller->>ClusterConfig: Fetch management cluster network config
end
Controller->>K8sAPI: Get or create Router NetworkPolicy
Controller->>K8sAPI: Reconcile NetworkPolicy (ingress/egress rules)
K8sAPI-->>Controller: Success/Error
Poem
Note ⚡️ AI Code Reviews for VS Code, Cursor, WindsurfCodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback. Note ⚡️ Faster reviews with cachingCodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (4)
🧰 Additional context used🧬 Code Graph Analysis (1)hypershift-operator/controllers/sharedingress/sharedingress_controller.go (2)
⏰ Context from checks skipped due to timeout of 90000ms (4)
🔇 Additional comments (8)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: muraee 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 |
Test Resultse2e-aws
e2e-aks
|
/retest-required |
1 similar comment
/retest-required |
@muraee: This pull request references CNTRLPLANE-206 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.20.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
This restricts internal egress traffic to only the KAS of the HostedClusters and allow external internet access for the External DNS case.
@muraee: all tests passed! Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
What this PR does / why we need it:
This restricts internal egress traffic to only the KAS of the HostedClusters and allow external internet access for the External DNS case.
Which issue(s) this PR fixes (optional, use
fixes #<issue_number>(, fixes #<issue_number>, ...)
format, where issue_number might be a GitHub issue, or a Jira story:Fixes #
Checklist
Summary by CodeRabbit
New Features
Chores