Skip to content

kubernetes: replace the deprecated AppArmor annotation - #4083

Merged
AkihiroSuda merged 1 commit into
docker:masterfrom
crazy-max:fix-kubernetes-apparmor-profile
Sep 16, 2026
Merged

AkihiroSuda merged 1 commit into
docker:masterfrom
crazy-max:fix-kubernetes-apparmor-profile

Conversation

@crazy-max

Copy link
Copy Markdown
Member

fixes #3211

Use securityContext.appArmorProfile for rootless Kubernetes builders to avoid the deprecated AppArmor annotation warning while preserving the existing unconfined behavior. Remove any conflicting legacy annotation supplied through driver options, matching the previous behavior of overriding it.

Rootless mode now requires Kubernetes v1.30 or later with AppArmor field support, which is stable in v1.31. Existing builders must be recreated to adopt the change.

Use the container AppArmor profile for rootless builders and remove conflicting legacy annotations.
Document the Kubernetes version requirement and cover both workload types.

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
@crazy-max
crazy-max requested review from AkihiroSuda and a lite review from Copilot and removed request for Copilot September 16, 2026 14:24
@crazy-max
crazy-max marked this pull request as ready for review September 16, 2026 14:32
@crazy-max crazy-max added this to the v0.38.0 milestone Sep 16, 2026
@AkihiroSuda
AkihiroSuda merged commit 68bd3ca into docker:master Sep 16, 2026
264 of 266 checks passed
@crazy-max
crazy-max deleted the fix-kubernetes-apparmor-profile branch September 16, 2026 17:35
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.

Kubernetes apparmor annotation deprecated since kubernetes v1.30

2 participants