reaper: updating kubectl image, detection script, rbac - #5444
Merged
Conversation
smatting
previously requested changes
Aug 14, 2026
jschaul
dismissed
smatting’s stale review
August 17, 2026 10:16
Feedback has been addressed in latest commits.
This was referenced Aug 20, 2026
This was referenced Aug 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://wearezeta.atlassian.net/browse/WPB-27995
charts/reaper: replace unmaintained image, drop cluster-admin
Why
The chart pinned
docker.io/bitnamilegacy/kubectland bound itsServiceAccount to
cluster-adminvia a fixed-name ClusterRoleBinding, giving thepod read access to every Secret in the cluster.
Changes
Image
docker.io/bitnamilegacy/kubectl:1.32.4→docker.io/alpine/kubectl:1.36.3scripts/reaper.shrewritten in POSIX sh so it runs under busyboxashregistry(may be""),repository,tag,digest(wins over tag),pullPolicy, plusimagePullSecretsRBAC
cluster-adminreplaced by a namespaced Role grantingget,list,watch,deleteon pods.<release>-reaper), so multiple reaper releasescould coexist in one cluster.
Other
podSecurityContextvalues are now actually applied; the deployment neverreferenced them, so the container ran with cluster defaults
nodeSelector,tolerations,affinity, and a configmap checksum annotationcheckIntervalSeconds, default 15s (was onepod LIST per second against the API server)
include the underlying error; both previously printed
Failed to list pods. Skipping this iteration...Testing
Verified end to end on
sde-dev-1(galaxy, k8s 1.34.4, 3 cannons + redis-ephemeral)by installing the currently pinned chart
5.14.0-pre.6and upgrading to this one.Role/RoleBinding/SA created, image swapped, securityContext and resources applied
pods: [get list watch delete];noon secrets in-namespace, secrets cross-namespace, cluster-wide pod list,cross-namespace deletes, creating ClusterRoleBindings, and
* *deleted in sequence and recreated, then the reaper returned to steady state
helm rollbackrestores the old chart and its ClusterRoleBinding;rolling forward re-prunes cleanly
(ClusterRoleBinding ownership conflict); this chart installs into two namespaces
simultaneously with zero cluster-scoped objects
alpine/kubectl:1.36.3image itself as uid 65534 with aread-only rootfs, across six scenarios (redis oldest, cannon oldest, no cannons,
no redis, list failure, delete failure);
shellcheck -s shclean;helm lintandhelm templateclean on kube-version 1.23 and 1.34Operator notes
imagemust update the override. The image must contain aPOSIX shell at
/bin/sh, distroless kubectl images will not start.helm upgraderemoves the oldreaper-roleClusterRoleBinding and ServiceAccount.Checklist
changelog.d