Skip to content

Conversation

juzhao
Copy link
Contributor

@juzhao juzhao commented Sep 1, 2025

see https://issues.redhat.com/browse/OCPBUGS-61088, use this bug to set networkpolicy for in-cluster monitoring
this PR replaced #2645, 2645 does not include networkpolicy settings for alertmanager/prometheus/thanos-querier, since there is default deny network settings for all monitoring pods, if we don't include them, CI jobs would be failed for them

Copy link
Contributor

openshift-ci bot commented Sep 1, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: juzhao
Once this PR has been reviewed and has the lgtm label, please assign marioferh 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

@juzhao
Copy link
Contributor Author

juzhao commented Sep 1, 2025

/retitle [WIP] OCPBUGS-61088: create networkpolicy settings for in-cluster monitoring

@openshift-ci openshift-ci bot changed the title add networkpolicy settings for in-cluster monitoring [WIP] OCPBUGS-61088: create networkpolicy settings for in-cluster monitoring Sep 1, 2025
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Sep 1, 2025
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 1, 2025
@openshift-ci-robot openshift-ci-robot added the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Sep 1, 2025
@openshift-ci-robot
Copy link
Contributor

@juzhao: This pull request references Jira Issue OCPBUGS-61088, which is invalid:

  • expected the bug to target the "4.20.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

see https://issues.redhat.com/browse/OCPBUGS-61088, use this bug to set networkpolicy for in-cluster monitoring
this PR replaced #2645, 2645 does not include networkpolicy settings for alertmanager/prometheus/thanos-querier, since there is default deny network settings for all monitoring pods, if we don't include them, CI jobs would be failed for them

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.

@juzhao
Copy link
Contributor Author

juzhao commented Sep 1, 2025

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Sep 1, 2025
@openshift-ci-robot
Copy link
Contributor

@juzhao: This pull request references Jira Issue OCPBUGS-61088, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.20.0) matches configured target version for branch (4.20.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @juzhao

In response to this:

/jira refresh

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 Sep 1, 2025

@openshift-ci-robot: GitHub didn't allow me to request PR reviews from the following users: juzhao.

Note that only openshift members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

@juzhao: This pull request references Jira Issue OCPBUGS-61088, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.20.0) matches configured target version for branch (4.20.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @juzhao

In response to this:

/jira refresh

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.

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.

spec: {
podSelector: {
matchLabels: {
'app.kubernetes.io/name': 'prometheus-operator',
Copy link
Contributor

Choose a reason for hiding this comment

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

prometheus-operator-admission-webhook rather?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

typo, fixed, thanks

],
},
],
egress: [
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure that thee admission webhook needs any egress.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this allows curl admission webhook enpoint from any pod of any space

],
},
],
egress: [
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any recommendation to allow egress traffic only to the API service? This is the only destination which ksm should try to connect but I guess that it's not trivial to accommodate classic OCP (self-managed) and hosted clusters (HyperShift).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

networkpolicy applied to pod only, seems we can not define for API service, will check again.

spec: {
podSelector: {
matchLabels: {
'app.kubernetes.io/name': 'prometheus-operator-admission-webhook',
Copy link
Contributor

Choose a reason for hiding this comment

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

typo?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks, fixed

@juzhao
Copy link
Contributor Author

juzhao commented Sep 2, 2025

/retest

@juzhao
Copy link
Contributor Author

juzhao commented Sep 3, 2025

/test verify
/test rules
/test generate

@juzhao
Copy link
Contributor Author

juzhao commented Sep 5, 2025

/retest

Copy link
Contributor

openshift-ci bot commented Sep 5, 2025

@juzhao: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-ovn-techpreview 7f5102e link true /test e2e-aws-ovn-techpreview
ci/prow/rules 7f5102e link true /test rules
ci/prow/e2e-aws-ovn-single-node 7f5102e link false /test e2e-aws-ovn-single-node
ci/prow/generate 7f5102e link true /test generate
ci/prow/verify 7f5102e link true /test verify

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
do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. 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