Skip to content

fix(infra): pin the kubelet serving certificate approver to release v0.12.1 - #265

Merged
devantler merged 1 commit into
mainfrom
claude/infra-pin-kubelet-serving-cert-approver-264
Oct 25, 2026
Merged

devantler merged 1 commit into
mainfrom
claude/infra-pin-kubelet-serving-cert-approver-264

Conversation

@devantler

Copy link
Copy Markdown
Contributor

Why

New platforms built from this template installed the component that approves kubelet serving certificates straight from the upstream project's development branch, including a moving image. What a new platform got could change whenever upstream pushed, with no review here.

What

The production overlay now carries a reviewed copy of one upstream release, in its high-availability form (two replicas, one active and one on standby on different nodes), with a disruption budget so node drains stay safe, and the image pinned to an exact build. This matches how the reference platform runs it.

Fixes #264

🤖 Generated with Claude Code

…0.12.1

The Hetzner overlay installed the approver from the upstream project's main
branch, including the moving `:main` image, so two renders of the same
template commit could install different code. Vendor the v0.12.1 release's
HA manifest (2 leader-elected replicas, hostname anti-affinity) one document
per file with the upstream bytes unchanged, add a drain-safe PDB, and pin the
image by tag and digest.

Fixes #264

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@devantler devantler added the bug label Oct 25, 2026
@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Oct 25, 2026

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

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: ASSERTIVE
  • Plan: Advanced
  • Run ID: b241aa4a-db20-48f1-a60e-56689e07bae7
Commits

Reviewing files that changed from the base of the PR and between 679fe8b and 83b4cf9.

Files selected for processing: 12
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/cluster-role-binding.yaml
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/cluster-role-certificates.yaml
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/cluster-role-events.yaml
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/deployment.yaml
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/kustomization.yaml
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/namespace.yaml
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/pod-disruption-budget.yaml
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/role-binding-events.yaml
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/role-binding-leader-election.yaml
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/role.yaml
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/service-account.yaml
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/service.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.

Recent review details
Additional context used
Code guidelines: 1
AGENTS.md — auto-discovered
Path-based instructions: 3
Source excerpt: **This is a TEMPLATE and a PUBLIC repo** — be conservative.

CodeRabbit inference engine (AGENTS.md)

Files:

  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/service-account.yaml
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/cluster-role-binding.yaml
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/role.yaml
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/service.yaml
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/role-binding-leader-election.yaml
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/namespace.yaml
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/cluster-role-events.yaml
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/cluster-role-certificates.yaml
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/role-binding-events.yaml
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/deployment.yaml
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/pod-disruption-budget.yaml
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/kustomization.yaml
Source excerpt: Manifest naming follows the reference platform's conventions (platform#2315), enforced by the shared `devantler-tech/.github/actions/validate-naming` action (a CI gate on manifest, naming-configuration, and naming-workflow c...

CodeRabbit inference engine (AGENTS.md)

Files:

  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/service-account.yaml
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/cluster-role-binding.yaml
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/role.yaml
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/service.yaml
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/role-binding-leader-election.yaml
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/namespace.yaml
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/cluster-role-events.yaml
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/cluster-role-certificates.yaml
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/role-binding-events.yaml
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/deployment.yaml
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/pod-disruption-budget.yaml
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/kustomization.yaml
Source excerpt: Hierarchical overlays: **base** (`k8s/bases/`) → **provider** (`k8s/providers/`) → **cluster** (`k8s/clusters/`).

CodeRabbit inference engine (AGENTS.md)

Files:

  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/service-account.yaml
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/cluster-role-binding.yaml
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/role.yaml
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/service.yaml
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/role-binding-leader-election.yaml
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/namespace.yaml
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/cluster-role-events.yaml
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/cluster-role-certificates.yaml
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/role-binding-events.yaml
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/deployment.yaml
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/pod-disruption-budget.yaml
  • k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/kustomization.yaml
Checkov (3.3.25)
k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/cluster-role-certificates.yaml

[high] 1-36: Minimize ClusterRoles that grant permissions to approve CertificateSigningRequests

(CKV_K8S_156)

k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/role-binding-events.yaml

[low] 1-16: The default namespace should not be used

(CKV_K8S_21)

Trivy (0.75.0)
k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/deployment.yaml

[warning] 36-82: Restrict container images to trusted registries

Container cert-approver in deployment kubelet-serving-cert-approver (namespace: kubelet-serving-cert-approver) uses an image from an untrusted registry.

Rule: KSV-0125

Learn more

(IaC/Kubernetes)

Additional comments: 12
k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/namespace.yaml: 1

1-10: LGTM!

k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/service-account.yaml: 1

1-8: LGTM!

k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/cluster-role-certificates.yaml: 1

1-36: LGTM!

k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/cluster-role-binding.yaml: 1

1-15: LGTM!

k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/cluster-role-events.yaml: 1

1-15: LGTM!

k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/role-binding-events.yaml: 1

1-16: LGTM!

k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/role.yaml: 1

1-24: LGTM!

k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/role-binding-leader-election.yaml: 1

1-16: LGTM!

k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/deployment.yaml: 1

1-100: LGTM!

k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/service.yaml: 1

1-17: LGTM!

k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/pod-disruption-budget.yaml: 1

1-16: LGTM!

k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/kustomization.yaml: 1

4-21: LGTM!

Also applies to: 23-29

Walkthrough

The Hetzner configuration now uses vendored kubelet-serving-cert-approver v0.12.1 HA manifests instead of an upstream branch URL. It adds the namespace, ServiceAccount, RBAC resources, a two-replica Deployment, a metrics Service, and a PodDisruptionBudget. The image is pinned by tag and digest. The Deployment includes leader election, health probes, resource bounds, scheduling settings, and container and pod security settings.

Possibly related issues

  • Pin the kubelet serving certificate approver instead of installing from upstream main — replaces the moving upstream branch fetch with vendored release manifests and a tag-and-digest-pinned image.

Priority: Normal

Merge Risk: Minimal · up to 83b4c

No concrete issue remains that would prevent merging after the normal render and validation checks.

Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Linked Issues check Inconclusive Issue #264 requires a reviewed, pinned manifest and green Hetzner render plus ksail workload validate. The new kustomization vendors the v0.12.1 HA resources and pins `ghcr.io/alex1989hu/kubelet-ser… Provide reviewable successful results for the Hetzner render and ksail workload validate before deciding compliance with the second acceptance criterion.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely identifies the main change: pinning the kubelet serving certificate approver to release v0.12.1.
Description check Passed The description directly explains the change from an upstream development branch to a reviewed, high-availability release with a pinned image and disruption budget.
Out of Scope Changes check Passed The changes stay within the kubelet serving certificate approver component requested by issue #264. The added RBAC resources, HA Deployment, PodDisruptionBudget, Service, namespace, and vendored kusto…
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Full details: Out of Scope Changes check

Explanation

The changes stay within the kubelet serving certificate approver component requested by issue #264. The added RBAC resources, HA Deployment, PodDisruptionBudget, Service, namespace, and vendored kustomization resources support the pinned installation. No unrelated change is shown.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (12 skipped: 12 unsupported.)

Full details: Linked Issues check

Explanation

Issue #264 requires a reviewed, pinned manifest and green Hetzner render plus ksail workload validate. The new kustomization vendors the v0.12.1 HA resources and pins ghcr.io/alex1989hu/kubelet-serving-cert-approver to tag 0.12.1 and digest sha256:445a8e5584f659701092d2ec8b625da8929dc75fe4d45274333bd9fe6db8fb75. The reviewed evidence does not include results for the Hetzner render or ksail workload validate.

Resolution

Provide reviewable successful results for the Hetzner render and ksail workload validate before deciding compliance with the second acceptance criterion.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

🔧 Checkov (3.3.25)
k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/deployment.yaml

Checkov retry budget exhausted before isolating this batch

k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/kustomization.yaml

Checkov retry budget exhausted before isolating this batch

k8s/providers/hetzner/infrastructure/controllers/kubelet-serving-cert-approver/namespace.yaml

Checkov retry budget exhausted before isolating this batch

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

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

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer (interactive Claude Code session)

Ready for merge at 83b4cf9.

  • Review: CodeRabbit completed its review at this head ("No actionable comments were generated", status "Review completed"). 0 review threads.
  • Checks: all required checks pass; the system test, deploy and naming dry-run are skipped by design in the template.
  • Validated locally: every scripts/ gate from Validate Scaffold, ksail workload validate for both clusters (276 files), and the pinned naming gate.
  • Tried as a user (the platform a new owner gets): rendered the Hetzner controllers overlay at main and at this head and compared them. The approver's Namespace, ServiceAccount, ClusterRoles, ClusterRoleBinding and Service render identically. The Deployment changes only as intended: 1 → 2 replicas, --enable-leader-election, required hostname anti-affinity, upstream's v0.12.1 memory request, and image :main → 0.12.1@sha256:445a8e55…. The digest was read from GHCR just now and is the release's multi-arch index. The leader-election Role and RoleBinding and the PDB are new, and nothing is removed, so a platform that syncs this prunes nothing. The vendored files, concatenated, are byte-identical to the upstream v0.12.1 deploy/ha-install.yaml minus its document separators.
  • Not verified: pods scheduling on a live Hetzner cluster. The template runs no cluster by design, and this component exists only in the Hetzner overlay, which no CI job deploys. The production cluster has 3 control planes + 4 workers, and the manifest tolerates control-plane nodes, so the required anti-affinity has room for both replicas.

@devantler
devantler marked this pull request as ready for review October 25, 2026 01:54
@devantler
devantler requested a review from a team as a code owner October 25, 2026 01:54
@devantler
devantler merged commit ef2375a into main Oct 25, 2026
19 checks passed
@devantler
devantler deleted the claude/infra-pin-kubelet-serving-cert-approver-264 branch October 25, 2026 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pin the kubelet serving certificate approver instead of installing from upstream main

1 participant