Skip to content

Retire standalone Alertmanager and pin initializer base images - #1259

Merged
ti-chi-bot[bot] merged 1 commit into
masterfrom
codex/retire-alertmanager-pin-initializer
Nov 10, 2026
Merged

ti-chi-bot[bot] merged 1 commit into
masterfrom
codex/retire-alertmanager-pin-initializer

Conversation

@csuzhangxc

@csuzhangxc csuzhangxc commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Remove the retired standalone Alertmanager Deployment, Service, and configuration. TiDB Operator continues to send alerts to an externally managed Alertmanager through TidbMonitor.spec.alertmanagerURL.
  • Pin BusyBox 1.37.0 by its multi-platform image index digest in the initializer generator and both current operator build templates.
  • Keep the historical versioned build directories under monitor/ as release records.

Validation

  • Ran the initializer CLI, DM rule installation, and rule persistence tests.
  • Ran the build security test suite and git diff --check.
  • Ran the TiDB Operator TestRenderPrometheusConfig* tests to check external Alertmanager configuration and rule generation.
  • Verified the pinned OCI index includes linux/amd64 and linux/arm64. The arm64 initializer smoke test confirmed that a custom Kubernetes Prometheus URL is provisioned with editable: false and that node/pod dashboards and rule files are installed.

Summary by CodeRabbit

  • Changes
    • Removed the Kubernetes manifests that provisioned Alertmanager, including its configuration, deployment, and service. Alertmanager is no longer deployed through these manifests.
  • Chores
    • Pinned BusyBox container images to specific digests for more consistent builds.

@ti-chi-bot ti-chi-bot Bot added the size/L label Nov 10, 2026
@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

This change removes the Alertmanager Secret, Deployment, and Service manifests. It also pins BusyBox image references in three Dockerfiles to version 1.37.0 and a SHA-256 digest.

Changes: Alertmanager Resource Removal

Layer / File(s) Summary
Remove Alertmanager resources
alertmanager/alertmanager-config.yaml, alertmanager/alertmanager-deployment.yaml, alertmanager/alertmanger-service.yaml
The Alertmanager Secret, Deployment, and Service manifests were removed.

BusyBox Image Pinning

Layer / File(s) Summary
Pin BusyBox image references
cmd/Dockerfile, monitor-snapshot/master/operator/Dockerfile, platform-monitoring/operator/Dockerfile
The Dockerfiles now pin BusyBox 1.37.0 to a SHA-256 digest.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Suggested reviewers: qiffang

Merge Risk: Minimal · up to 058a9

Alert delivery requires a configured external Alertmanager. No merge-blocking issue is established.

Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly summarizes both main changes: retiring the standalone Alertmanager and pinning initializer base images.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (3 skipped: 3 unsupported.)

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

A rabbit checks the image tag,
Then pins its hash inside the file.
Three Dockerfiles now match the stamp,
Alertmanager manifests leave the stack.
The rabbit hops and checks once more.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c5db6e38-0828-4489-9dd4-a221e2b8b05c
Commits

Reviewing files that changed from the base of the PR and between 85f3384 and 058a9e4.

Files selected for processing: 6

  • alertmanager/alertmanager-config.yaml
  • alertmanager/alertmanager-deployment.yaml
  • alertmanager/alertmanger-service.yaml
  • cmd/Dockerfile
  • monitor-snapshot/master/operator/Dockerfile
  • platform-monitoring/operator/Dockerfile
Files with no reviewable changes: 3

  • alertmanager/alertmanger-service.yaml
  • alertmanager/alertmanager-deployment.yaml
  • alertmanager/alertmanager-config.yaml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@fgksgf fgksgf left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM.

Verified:

  • No remaining references to the deleted alertmanager/ manifests outside the historical monitor/v* directories.
  • busybox:1.37.0@sha256:a7dbc319... matches the current Docker Hub index digest for the tag and includes linux/amd64 and linux/arm64.
  • Renovate (config:recommended) will keep the pinned digest updated.

Non-blocking:

  1. reload/Dockerfile and reload/Dockerfile_buildx still use busybox:1.37.0 without a digest. Out of scope for the initializer, but worth a follow-up if the goal is to pin all base images.
  2. Removing alertmanager/ breaks anyone applying those manifests by raw URL. Consider noting the replacement (TidbMonitor.spec.alertmanagerURL pointing to an externally managed Alertmanager) in the PR description or release notes.

@ti-chi-bot

ti-chi-bot Bot commented Nov 10, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fgksgf

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

@ti-chi-bot ti-chi-bot Bot added the lgtm label Nov 10, 2026
@ti-chi-bot

ti-chi-bot Bot commented Nov 10, 2026

Copy link
Copy Markdown

[LGTM Timeline notifier]

Timeline:

  • 2026-11-10 03:05:47.135767398 +0000 UTC m=+1154271.760917668: ☑️ agreed by fgksgf.

@ti-chi-bot ti-chi-bot Bot added the approved label Nov 10, 2026
@ti-chi-bot
ti-chi-bot Bot merged commit 1dcb34a into master Nov 10, 2026
5 checks passed
@ti-chi-bot
ti-chi-bot Bot deleted the codex/retire-alertmanager-pin-initializer branch November 10, 2026 03:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants