Skip to content

Add terminationMessagePolicy and required-scc annotation for OCP 4.21 conformance#411

Open
dustman9000 wants to merge 1 commit into
openshift:masterfrom
dustman9000:termination-message-policy
Open

Add terminationMessagePolicy and required-scc annotation for OCP 4.21 conformance#411
dustman9000 wants to merge 1 commit into
openshift:masterfrom
dustman9000:termination-message-policy

Conversation

@dustman9000
Copy link
Copy Markdown
Member

@dustman9000 dustman9000 commented Apr 16, 2026

Summary

  • Adds terminationMessagePolicy: FallbackToLogsOnError to the operator container spec in both OLM (deploy/) and PKO (deploy_pko/) deployment manifests
  • Adds openshift.io/required-scc: restricted-v2 annotation to pod template metadata in both deployment manifests

These are required for OCP 4.21 conformance. The terminationMessagePolicy ensures container termination messages capture log output on error, and the required-scc annotation explicitly declares the security context constraint the pod needs.

Test plan

  • Verify YAML is valid and properly indented
  • Deploy to integration and confirm operator starts correctly
  • Confirm terminationMessagePolicy appears in pod spec via oc get pod -o yaml
  • Confirm required-scc annotation appears in pod metadata

Summary by CodeRabbit

  • Chores
    • Updated operator deployment configuration to enforce OpenShift restricted security constraints
    • Modified pod termination message policy to fall back to container logs when errors occur for improved diagnostics

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 16, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 3b5ef347-a0c4-4dd0-9bd7-47f8e0d21a30

📥 Commits

Reviewing files that changed from the base of the PR and between aa963ef and c7623dc.

📒 Files selected for processing (2)
  • deploy/operator.yaml
  • deploy_pko/Deployment-splunk-forwarder-operator.yaml.gotmpl

Walkthrough

The changes add OpenShift security constraints and modify termination message behavior across two deployment configuration files. An annotation specifying the required Security Context Constraint is added to pod templates, and container termination message handling is configured to fall back to logs on error.

Changes

Cohort / File(s) Summary
OpenShift Security & Termination Configuration
deploy/operator.yaml, deploy_pko/Deployment-splunk-forwarder-operator.yaml.gotmpl
Added pod annotation openshift.io/required-scc: restricted-v2 and container field terminationMessagePolicy: FallbackToLogsOnError to configure OpenShift security constraints and pod termination message behavior.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 9 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Test Structure And Quality ⚠️ Warning Ginkgo tests violate quality requirements: the 'is installed' test combines 9+ unrelated behaviors into one block, 7 Expect assertions lack meaningful failure messages, and cleanup patterns are inconsistent across tests. Refactor the 'is installed' test into separate focused blocks for each resource type, add descriptive failure messages to all 7 problematic Expect statements, and standardize cleanup patterns using defer blocks consistently.
✅ Passed checks (9 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main changes: adding terminationMessagePolicy and required-scc annotation for OCP 4.21 conformance, which directly aligns with the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Stable And Deterministic Test Names ✅ Passed PR modifies only Kubernetes deployment manifests; no test files changed, so custom check for Ginkgo test names is not applicable.
Microshift Test Compatibility ✅ Passed The custom check for MicroShift Test Compatibility is not applicable to this PR as it only modifies Kubernetes deployment manifest files without adding any new Ginkgo e2e test code.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The PR modifies only YAML manifest files to add OpenShift security context annotation and termination message policy. No Ginkgo e2e tests or test code are included, making this SNO compatibility check not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed Changes introduce only security context annotation and termination message policy, not scheduling constraints. Existing configuration uses preferred infra node affinity with specific tolerations and fixed 1-replica count.
Ote Binary Stdout Contract ✅ Passed PR only modifies YAML manifest files with no Go source code changes, so cannot violate OTE Binary Stdout Contract.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PR only modifies Kubernetes deployment manifests to add OpenShift security annotations and termination policies, not Ginkgo e2e tests.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci openshift-ci Bot requested review from jaybeeunix and wshearn April 16, 2026 18:10
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 16, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dustman9000

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

The pull request process is described here

Details 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 Apr 16, 2026
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.44%. Comparing base (aa963ef) to head (c7623dc).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #411   +/-   ##
=======================================
  Coverage   72.44%   72.44%           
=======================================
  Files          11       11           
  Lines         704      704           
=======================================
  Hits          510      510           
  Misses        173      173           
  Partials       21       21           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 16, 2026

@dustman9000: The following test 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/validate c7623dc link true /test validate

Full PR test history. Your PR dashboard.

Details

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants