Skip to content

Added observability-termination-policy to noobaa-operator#1694

Merged
aayushchouhan09 merged 1 commit intonoobaa:masterfrom
aayushchouhan09:telco-fix
Sep 4, 2025
Merged

Added observability-termination-policy to noobaa-operator#1694
aayushchouhan09 merged 1 commit intonoobaa:masterfrom
aayushchouhan09:telco-fix

Conversation

@aayushchouhan09
Copy link
Member

@aayushchouhan09 aayushchouhan09 commented Sep 2, 2025

Explain the changes

  1. Added terminationMessagePolicy: FallbackToLogsOnError to the containers (operator, endpoint, core and postgress-db).

Issues: Fixed #xxx / Gap #xxx

  1. Fixed: https://issues.redhat.com/browse/RHSTOR-7380

Testing Instructions:

  • Doc added/updated
  • Tests added

Summary by CodeRabbit

  • Chores
    • Improved crash diagnostics by configuring pods to fall back to container logs for termination messages when the standard termination file is unavailable.
    • Applied consistently to operator, core services, endpoint, and database pods for standardized termination reporting.
    • No functional changes to workloads; runtime behavior is unchanged aside from clearer termination output.

@coderabbitai
Copy link

coderabbitai bot commented Sep 2, 2025

Walkthrough

Added terminationMessagePolicy: FallbackToLogsOnError to several container specs in deployment/statefulset/operator YAMLs and updated embedded YAML string constants and their SHA256 checksums in pkg/bundle/deploy.go. No other fields or behaviors changed.

Changes

Cohort / File(s) Summary of Changes
Kubernetes manifests: terminationMessagePolicy
deploy/internal/deployment-endpoint.yaml, deploy/internal/statefulset-core.yaml, deploy/internal/statefulset-postgres-db.yaml, deploy/operator.yaml
Added terminationMessagePolicy: FallbackToLogsOnError to container specs (endpoint, core, noobaa-log-processor, postgres, noobaa-operator).
Bundle constants & embedded YAML
pkg/bundle/deploy.go
Updated four SHA256 constants and the corresponding File_... YAML string constants to reflect the manifest edits above.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels

size/L

Suggested reviewers

  • nimrod-becker
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
deploy/internal/statefulset-core.yaml (1)

60-60: LGTM: terminationMessagePolicy added to core and log-processor

Correct field/value and placement under each container spec. Small operational note: with FallbackToLogsOnError, up to ~4KiB of recent logs may surface in pod status on failures—ensure sensitive data isn’t logged at error time.

Also applies to: 171-171

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between f43cb97 and 45e5631.

📒 Files selected for processing (5)
  • deploy/internal/deployment-endpoint.yaml (1 hunks)
  • deploy/internal/statefulset-core.yaml (2 hunks)
  • deploy/internal/statefulset-postgres-db.yaml (1 hunks)
  • deploy/operator.yaml (1 hunks)
  • pkg/bundle/deploy.go (9 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (13)
  • GitHub Check: run-hac-test
  • GitHub Check: cnpg-deployment-test
  • GitHub Check: run-kms-tls-sa-test
  • GitHub Check: run-operator-tests
  • GitHub Check: run-cli-tests
  • GitHub Check: run-core-config-map-tests
  • GitHub Check: run-kms-tls-token-test
  • GitHub Check: run-kms-dev-test
  • GitHub Check: run-kms-kmip-test
  • GitHub Check: golangci-lint
  • GitHub Check: run-azure-vault-test
  • GitHub Check: run-kms-key-rotate-test
  • GitHub Check: run-admission-test
🔇 Additional comments (7)
deploy/operator.yaml (1)

44-44: LGTM: operator crash context will be captured on failure

Appropriate use of FallbackToLogsOnError for the operator to aid troubleshooting while keeping default terminationMessagePath.

deploy/internal/statefulset-postgres-db.yaml (1)

28-28: LGTM: postgres container now falls back to logs on error

Matches the policy applied elsewhere; helpful for postmortems of DB pod crashes.

deploy/internal/deployment-endpoint.yaml (1)

60-60: LGTM: endpoint container gains FallbackToLogsOnError

Consistent with other manifests and useful for capturing last-error context.

pkg/bundle/deploy.go (4)

4051-4051: Good addition: terminationMessagePolicy on endpoint container

Setting terminationMessagePolicy: FallbackToLogsOnError improves debuggability for crash scenarios without altering normal behavior.


5160-5160: Consistent policy for core and log-processor containers

Both core and noobaa-log-processor now fallback to logs on error, matching the PR goal and aiding post-mortem analysis.

Also applies to: 5271-5271


5337-5337: Postgres container covered as well

Applying FallbackToLogsOnError to db ensures DB crash loops surface useful logs via the termination message.


6241-6241: Operator container policy aligned

Operator container now uses FallbackToLogsOnError too; this is especially helpful for early init failures.

Signed-off-by: Aayush Chouhan <achouhan@redhat.com>
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 45e5631 and ec3f09d.

📒 Files selected for processing (5)
  • deploy/internal/deployment-endpoint.yaml (1 hunks)
  • deploy/internal/statefulset-core.yaml (2 hunks)
  • deploy/internal/statefulset-postgres-db.yaml (1 hunks)
  • deploy/operator.yaml (1 hunks)
  • pkg/bundle/deploy.go (9 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • deploy/internal/statefulset-core.yaml
  • deploy/operator.yaml
  • deploy/internal/statefulset-postgres-db.yaml
  • deploy/internal/deployment-endpoint.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (13)
  • GitHub Check: run-core-config-map-tests
  • GitHub Check: run-azure-vault-test
  • GitHub Check: run-admission-test
  • GitHub Check: run-cli-tests
  • GitHub Check: run-kms-dev-test
  • GitHub Check: run-operator-tests
  • GitHub Check: run-hac-test
  • GitHub Check: golangci-lint
  • GitHub Check: run-kms-kmip-test
  • GitHub Check: run-kms-tls-sa-test
  • GitHub Check: run-kms-key-rotate-test
  • GitHub Check: cnpg-deployment-test
  • GitHub Check: run-kms-tls-token-test
🔇 Additional comments (5)
pkg/bundle/deploy.go (5)

4043-4043: Good addition: endpoint now captures error logs on termination.

Setting terminationMessagePolicy: FallbackToLogsOnError on the endpoint container is correct and helps surface failure context via the pod’s termination message. No other spec changes introduced.


5152-5152: Good addition: core container termination messages fallback to logs.

This aligns with the PR goal and is supported on all modern K8s/OCP versions.


5263-5263: Confirm intent: also applied to noobaa-log-processor.

The PR description mentions operator, endpoint, core, and postgres-db. You also added it to noobaa-log-processor. If intentional, nothing else to do; otherwise, please confirm whether this should be reverted.


5329-5329: Good addition: postgres db container covered.

Matches the stated scope and improves failure diagnostics on DB container exits.


6233-6233: Good addition: operator container covered.

Termination messages will now fallback to logs for operator pod exits.

@aayushchouhan09 aayushchouhan09 merged commit b9cb9f0 into noobaa:master Sep 4, 2025
16 of 21 checks passed
@aayushchouhan09 aayushchouhan09 deleted the telco-fix branch September 4, 2025 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants