Skip to content

[feat] Use initImage for the AppArmor wait and installer containers - #429

Open
cameronattard wants to merge 1 commit into
tryretool:mainfrom
cameronattard:feat/apparmor-wait-image
Open

cameronattard wants to merge 1 commit into
tryretool:mainfrom
cameronattard:feat/apparmor-wait-image

Conversation

@cameronattard

@cameronattard cameronattard commented Nov 23, 2026 •

Copy link
Copy Markdown

What

The wait-for-apparmor init containers on the code executor and JS executor hardcode busybox:1.37.0@sha256:... from Docker Hub. The AppArmor profile installer DaemonSet defaults to an unpinned busybox:1.37. So installs that have to pull every image from their own registry (a private mirror, an air-gapped cluster, GCP Marketplace) can't run them, even though initImage exists for exactly this.

What changes:

  • wait-for-apparmor on both executors now uses retool.initImage, like the install-seccomp init containers next to it.
  • The installer DaemonSet falls back to retool.initImage when codeExecutor.appArmorInstallerImage is unset. That override still wins.
  • The installer DaemonSet now gets image.pullSecrets, like the executors, so an initImage in a registry that needs credentials can be pulled on every node. Before this PR the installer only ever pulled public Docker Hub busybox.
  • The initImage comment in values.yaml lists the new users.

Defaults render the same pinned busybox:1.37.0@sha256:b3255e7d.... The DaemonSet's default moves from unpinned busybox:1.37 to that pinned image. The agent sandbox's wait-for-apparmor already uses rr.agentSandbox.initImage and is unchanged.

Verified

  • New .github/test_apparmor_images.py, wired into ci.yaml, checks four things: the defaults stay pinned, an initImage override reaches every AppArmor container, appArmorInstallerImage still overrides the DaemonSet, and image.pullSecrets reaches the installer as well as the executors.
  • helm lint and schema/generate.sh --check pass; the two values.yaml files are in sync.
  • Chart version bump 6.14.2 -> 6.14.3.

@greptile-apps

greptile-apps Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The change affects image selection for optional AppArmor workloads in the Helm chart.

Add registry credentials to the installer pod before merging so private-image installs can start.

Findings

  1. P1 Private image pulls fail ▶

Reviews (1) · Last reviewed commit: "[feat] Use initImage for the AppArmor wa..." · Reviewed by Greptile

initContainers:
- name: install
image: {{ .Values.codeExecutor.appArmorInstallerImage | default "busybox:1.37" }}
image: {{ .Values.codeExecutor.appArmorInstallerImage | default (include "retool.initImage" .) }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Private image pulls fail

The installer now uses initImage, but its pod never receives image.pullSecrets. If an operator points initImage.repository at a registry that requires login and supplies credentials through image.pullSecrets, the executors can pull the image but the installer cannot. On a fresh node, the AppArmor profile never loads and wait-for-apparmor waits forever.

Add the same pod-level imagePullSecrets block used by the executor deployments, and cover it in the new render test.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Fixed in 6ee5acb: the installer DaemonSet now renders image.pullSecrets the same way as the executors, and test_apparmor_images.py checks it reaches the installer and both executors (and is absent by default).

The wait-for-apparmor init containers on the code executor and JS executor
hardcoded busybox from Docker Hub, and the AppArmor installer DaemonSet
defaulted to an unpinned busybox:1.37, so installs that mirror every image
couldn't run them. Both now use initImage (codeExecutor.appArmorInstallerImage
still overrides the DaemonSet). Defaults render the same pinned busybox.

The installer DaemonSet also gets image.pullSecrets, like the executors, so
an initImage in a registry that needs credentials can be pulled on every
node.
@cameronattard
cameronattard force-pushed the feat/apparmor-wait-image branch from 68d4633 to 6ee5acb Compare November 23, 2026 03:52
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.

1 participant