TMP: do not merge - #83123
Conversation
|
Skipping CI for Draft Pull Request. |
WalkthroughAdds s390x CI configuration for the ClusterResourceOverride admission operator. It defines build inputs, release candidates, resource defaults, repository metadata, and a scheduled libvirt workflow that installs the operator and runs e2e tests. Changess390x operator CI
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant CIWorkflow
participant OpenShiftCluster
participant CatalogSource
participant OperatorDeployment
participant E2ETests
CIWorkflow->>OpenShiftCluster: create namespace
CIWorkflow->>CatalogSource: create Subscription from redhat-operators
CatalogSource-->>OpenShiftCluster: install operator CSV
OpenShiftCluster-->>OperatorDeployment: create operator deployment
OperatorDeployment-->>CIWorkflow: report readiness
CIWorkflow->>OpenShiftCluster: apply ClusterResourceOverride
CIWorkflow->>E2ETests: run make e2e with upgrades skipped
E2ETests->>OpenShiftCluster: execute e2e tests
Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error, 1 warning, 1 inconclusive)
✅ Passed checks (12 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: maxcao13 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/pj-rehearse pull-ci-openshift-cluster-resource-override-admission-operator-main-s390x-e2e-s390x-operator |
|
@maxcao13: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@ci-operator/config/openshift/cluster-resource-override-admission-operator/openshift-cluster-resource-override-admission-operator-main__s390x.yaml`:
- Around line 57-124: Run make update to regenerate the derived Prow
configuration for the new e2e-s390x-operator job, commit all generated output,
and avoid manually editing zz_generated_metadata.
- Around line 33-36: Update the s390x image overrides in the generated cluster
resource override admission operator configuration so PR validation uses the
pipeline-built operator image rather than the released ocp-s390x:5.0 image.
Ensure the operator pullspec resolves to the PR-built image, and document the
job’s released-image compatibility purpose instead if that behavior is
intentional.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: f159f863-0eb1-4ac5-9c4f-4b4ec6fce5b3
⛔ Files ignored due to path filters (1)
ci-operator/jobs/openshift/cluster-resource-override-admission-operator/openshift-cluster-resource-override-admission-operator-main-presubmits.yamlis excluded by!ci-operator/jobs/**
📒 Files selected for processing (1)
ci-operator/config/openshift/cluster-resource-override-admission-operator/openshift-cluster-resource-override-admission-operator-main__s390x.yaml
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@ci-operator/config/openshift/cluster-resource-override-admission-operator/openshift-cluster-resource-override-admission-operator-main__s390x.yaml`:
- Around line 134-146: Remove the metadata.namespace field from the
ClusterResourceOverride manifest in the oc apply block, while preserving
metadata.name and the existing spec so this cluster-scoped resource applies
successfully.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: eaf1b16b-7f17-4623-b231-b0aafde2facd
⛔ Files ignored due to path filters (2)
ci-operator/jobs/openshift/cluster-resource-override-admission-operator/openshift-cluster-resource-override-admission-operator-main-periodics.yamlis excluded by!ci-operator/jobs/**ci-operator/jobs/openshift/cluster-resource-override-admission-operator/openshift-cluster-resource-override-admission-operator-main-presubmits.yamlis excluded by!ci-operator/jobs/**
📒 Files selected for processing (1)
ci-operator/config/openshift/cluster-resource-override-admission-operator/openshift-cluster-resource-override-admission-operator-main__s390x.yaml
| cat <<EOF | oc apply -f - | ||
| apiVersion: operator.autoscaling.openshift.io/v1 | ||
| kind: ClusterResourceOverride | ||
| metadata: | ||
| name: cluster | ||
| namespace: ${NS} | ||
| spec: | ||
| podResourceOverride: | ||
| spec: | ||
| memoryRequestToLimitPercent: 50 | ||
| cpuRequestToLimitPercent: 25 | ||
| limitCPUToMemoryPercent: 200 | ||
| EOF |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Remove the namespace from the cluster-scoped resource.
ClusterResourceOverride is cluster-scoped. metadata.namespace: ${NS} makes oc apply reject the object. set -euo pipefail then stops the install step before e2e starts. The canonical workflow applies the same resource without a namespace.
Proposed fix
metadata:
name: cluster
- namespace: ${NS}
spec:📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| cat <<EOF | oc apply -f - | |
| apiVersion: operator.autoscaling.openshift.io/v1 | |
| kind: ClusterResourceOverride | |
| metadata: | |
| name: cluster | |
| namespace: ${NS} | |
| spec: | |
| podResourceOverride: | |
| spec: | |
| memoryRequestToLimitPercent: 50 | |
| cpuRequestToLimitPercent: 25 | |
| limitCPUToMemoryPercent: 200 | |
| EOF | |
| cat <<EOF | oc apply -f - | |
| apiVersion: operator.autoscaling.openshift.io/v1 | |
| kind: ClusterResourceOverride | |
| metadata: | |
| name: cluster | |
| spec: | |
| podResourceOverride: | |
| spec: | |
| memoryRequestToLimitPercent: 50 | |
| cpuRequestToLimitPercent: 25 | |
| limitCPUToMemoryPercent: 200 | |
| EOF |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In
`@ci-operator/config/openshift/cluster-resource-override-admission-operator/openshift-cluster-resource-override-admission-operator-main__s390x.yaml`
around lines 134 - 146, Remove the metadata.namespace field from the
ClusterResourceOverride manifest in the oc apply block, while preserving
metadata.name and the existing spec so this cluster-scoped resource applies
successfully.
|
/pj-rehearse periodic-ci-openshift-cluster-resource-override-admission-operator-main-s390x-e2e-s390x-operator |
|
@maxcao13: your |
|
/pj-rehearse periodic-ci-openshift-cluster-resource-override-admission-operator-main-s390x-e2e-s390x-operator |
|
@maxcao13: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
@maxcao13, If the problem persists, please contact Test Platform. |
Signed-off-by: Max Cao <macao@redhat.com>
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@ci-operator/config/openshift/cluster-resource-override-admission-operator/openshift-cluster-resource-override-admission-operator-main__s390x.yaml`:
- Around line 58-82: Add a least-privilege NetworkPolicy to the heredoc applied
after namespace creation for `${NS}`, targeting the OLM-managed operator pods
and allowing only the ingress and egress traffic required by the test. Keep the
existing OperatorGroup and Subscription resources unchanged, and ensure the
policy is defined within `${NS}`.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: ddde6f06-484b-4bee-8303-883def3f5438
⛔ Files ignored due to path filters (1)
ci-operator/jobs/openshift/cluster-resource-override-admission-operator/openshift-cluster-resource-override-admission-operator-main-periodics.yamlis excluded by!ci-operator/jobs/**
📒 Files selected for processing (1)
ci-operator/config/openshift/cluster-resource-override-admission-operator/openshift-cluster-resource-override-admission-operator-main__s390x.yaml
| NS=openshift-cluster-resource-override | ||
| oc create ns "${NS}" | ||
|
|
||
| cat <<EOF | oc apply -f - | ||
| apiVersion: operators.coreos.com/v1 | ||
| kind: OperatorGroup | ||
| metadata: | ||
| name: clusterresourceoverride-operator | ||
| namespace: ${NS} | ||
| spec: | ||
| targetNamespaces: | ||
| - ${NS} | ||
| --- | ||
| apiVersion: operators.coreos.com/v1alpha1 | ||
| kind: Subscription | ||
| metadata: | ||
| name: clusterresourceoverride | ||
| namespace: ${NS} | ||
| spec: | ||
| channel: stable | ||
| installPlanApproval: Automatic | ||
| name: clusterresourceoverride | ||
| source: redhat-operators | ||
| sourceNamespace: openshift-marketplace | ||
| EOF |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift
Define a NetworkPolicy for ${NS}.
Line 59 creates a namespace for OLM-managed pods. The configuration does not define a NetworkPolicy for that namespace. Add a least-privilege NetworkPolicy that permits only the operator traffic that the test requires.
As per path instructions, “NetworkPolicy defined for the namespace.”
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In
`@ci-operator/config/openshift/cluster-resource-override-admission-operator/openshift-cluster-resource-override-admission-operator-main__s390x.yaml`
around lines 58 - 82, Add a least-privilege NetworkPolicy to the heredoc applied
after namespace creation for `${NS}`, targeting the OLM-managed operator pods
and allowing only the ingress and egress traffic required by the test. Keep the
existing OperatorGroup and Subscription resources unchanged, and ensure the
policy is defined within `${NS}`.
Source: Path instructions
|
[REHEARSALNOTIFIER]
Interacting with pj-rehearseComment: Once you are satisfied with the results of the rehearsals, comment: |
|
/pj-rehearse periodic-ci-openshift-cluster-resource-override-admission-operator-main-s390x-e2e-s390x-operator |
|
@maxcao13: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
@maxcao13: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
POC of s390x tests for clusterresourceoverride
Summary by CodeRabbit
This PR adds s390x CI configuration for the ClusterResourceOverride admission operator. The configuration supports RHEL 9 builds, s390x release candidates, and a scheduled libvirt-based end-to-end workflow. The workflow installs the operator from a CatalogSource, verifies readiness, creates a
ClusterResourceOverrideresource, and runs e2e tests without upgrades.