Skip to content

OTA-1521: Add a default-deny network policy for CVO namespace #1198

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

petr-muller
Copy link
Member

@petr-muller petr-muller commented May 27, 2025

Add a baseline NetworkPolicy to deny all network communication (both ingress and egress) to all pods in the namespace. Any necessary network traffic needs to be allowed by an additional NetworkPolicy resource (they are additive).

At the moment, the default deny all policy should be the only one needed:

See OTA Network Policies Working Document for more information.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label May 27, 2025
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented May 27, 2025

@petr-muller: This pull request references OTA-1531 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:

For now just a testing PR to see what blows up.

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.

Copy link
Contributor

openshift-ci bot commented May 27, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: petr-muller

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 27, 2025
@petr-muller petr-muller changed the title OTA-1531: Add a default-deny network policy for CVO namespace OTA-1521: Add a default-deny network policy for CVO namespace May 27, 2025
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented May 27, 2025

@petr-muller: This pull request references OTA-1521 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:

For now just a testing PR to see what blows up.

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.

@hongkailiu
Copy link
Member

hongkailiu commented Jun 3, 2025

what blows up

I was expected none of the e2e would succeed (as CVO would broken up to "Deny ALL") but the situation is much better.
Because of hostNetwork: true?

@hongkailiu
Copy link
Member

/cc

@openshift-ci openshift-ci bot requested a review from hongkailiu June 3, 2025 14:04
@petr-muller
Copy link
Member Author

I was expected none of the e2e would succeed (as CVO would broken up to "Deny ALL") but the situation is much better.
Because of hostNetwork: true?

Yeah, checkout the Pragmatic (CVO uses host network) section of the working doc. Network Policies do not affect most host-networked pods traffic. It definitely does not affect the core functionality (being a k8s controller=talking to the apiserver). We will need to test all functionality that uses network communication (see the working doc) to be sure though - it is also possible that we simply do not have tests that exercise the functionality.

@petr-muller petr-muller changed the title OTA-1521: Add a default-deny network policy for CVO namespace OTA-1499: Add a default-deny network policy for CVO namespace Jun 3, 2025
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Jun 3, 2025

@petr-muller: This pull request references OTA-1499 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 spike to target the "4.20.0" version, but no target version was set.

In response to this:

For now just a testing PR to see what blows up.

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.

Add a baseline NetworkPolicy to deny all network communication (both
ingress and egress) to all pods in the namespace. Any necessary network
traffic needs to be allowed by an additional NetworkPolicy resource
(they are additive).

At the moment, the default deny all policy should be the only one needed:
- CVO is host-networked so it is [not affected by network policies](https://docs.redhat.com/en/documentation/openshift_container_platform/4.18/html/networking/network-security#network-policy)
- Bare `version` pods spawned by CVO do not require any network communication

See [OTA Network Policies Working Document](https://docs.google.com/document/d/1Dzr3eYGVl6OBxqfUohugJLsbsn7sYrC3fN6yCe8zTRQ/edit?tab=t.0#heading=h.9vehq2liufe) for more information.
@petr-muller petr-muller force-pushed the ota-1521-add-deny-all-network-policy branch from 76b22be to 07c6b5c Compare June 10, 2025 15:55
@petr-muller petr-muller changed the title OTA-1499: Add a default-deny network policy for CVO namespace OTA-1521: Add a default-deny network policy for CVO namespace Jun 10, 2025
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Jun 10, 2025

@petr-muller: This pull request references OTA-1499 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 spike to target the "4.20.0" version, but no target version was set.

In response to this:

Add a baseline NetworkPolicy to deny all network communication (both
ingress and egress) to all pods in the namespace. Any necessary network
traffic needs to be allowed by an additional NetworkPolicy resource
(they are additive).

At the moment, the default deny all policy should be the only one needed:

See OTA Network Policies Working Document for more information.

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.

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Jun 10, 2025

@petr-muller: This pull request references OTA-1521 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:

Add a baseline NetworkPolicy to deny all network communication (both
ingress and egress) to all pods in the namespace. Any necessary network
traffic needs to be allowed by an additional NetworkPolicy resource
(they are additive).

At the moment, the default deny all policy should be the only one needed:

See OTA Network Policies Working Document for more information.

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.

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Jun 10, 2025

@petr-muller: This pull request references OTA-1521 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:

Add a baseline NetworkPolicy to deny all network communication (both ingress and egress) to all pods in the namespace. Any necessary network traffic needs to be allowed by an additional NetworkPolicy resource (they are additive).

At the moment, the default deny all policy should be the only one needed:

See OTA Network Policies Working Document for more information.

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.

Copy link
Contributor

openshift-ci bot commented Jun 10, 2025

@petr-muller: 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.

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. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants