Skip to content

fix: inherit primary security context in copilot containers - #8428

Draft
xjerod wants to merge 1 commit into
mainfrom
jerod/eng26-1566-copilot-security-context
Draft

xjerod wants to merge 1 commit into
mainfrom
jerod/eng26-1566-copilot-security-context

Conversation

@xjerod

@xjerod xjerod commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Overview

Apply the configured primary-container security context before copilot setup, then inherit the primary's effective context into generated downloader/uploader containers after accelerator and base PodTemplate merging. Explicit helper contexts, including partial and empty ones, are preserved; each inherited context is independently copied. See pod configuration ordering and copilot inheritance.

This change is scoped to Flyte 2 and keeps exported signatures and configuration keys unchanged.

Customer-Facing Change Log

Flyte 2 copilot tasks apply configured container security defaults to the primary container and inherit its effective context into downloader/uploader helpers that lack their own context.

Test Plan (required)

  • Added 18 regression scenarios for raw container and pod tasks, input/output combinations, explicit partial/empty contexts, base/device templates, custom names, disabled copilot, unrelated containers, and deep-copy isolation.
  • Demonstrated regression failures before applying the production fix.
  • Passed: go test -mod=readonly -race ./flyteplugins/go/tasks/pluginmachinery/flytek8s ./flyteplugins/go/tasks/plugins/k8s/pod -count=1.
  • After adding the partial-context cases, passed the complete flytek8s package again with -mod=readonly -race -count=1.
  • Passed formatting and git diff --check. Remote CI pending.
  • Combined Apple E2E validation is deferred until this fix, ENG26-1564, and ENG26-1565 merge.

Rollout Plan (required)

Target the current development branch, with no backport. Cloud submodule updates, runtime image builds, chart publication, and combined E2E validation belong to the shared Apple delivery follow-up.

Rollback Plan (required)

Revert this source change before shared release integration if required. Deployment rollback verification is deferred with that release work.

Issue

Ref https://linear.app/unionai/issue/ENG26-1566

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant