Skip to content

feat: add default_container_group_namespace to isolate job pod execution#2122

Open
TheRealHaoLiu wants to merge 2 commits into
ansible:develfrom
TheRealHaoLiu:worktree-default-container-group-namespace
Open

feat: add default_container_group_namespace to isolate job pod execution#2122
TheRealHaoLiu wants to merge 2 commits into
ansible:develfrom
TheRealHaoLiu:worktree-default-container-group-namespace

Conversation

@TheRealHaoLiu

Copy link
Copy Markdown
Member
SUMMARY

Add a new default_container_group_namespace field to the AWX CR that allows
users to specify a dedicated namespace for Container Group job pods.

When set:

  • The operator creates the target namespace (if it doesn't exist)
  • A Role and RoleBinding are created in the target namespace granting the AWX
    service account pod and secret permissions for job execution
  • Pod/secret permissions are removed from the AWX namespace Role, enforcing
    workload isolation
  • AWX_CONTAINER_GROUP_DEFAULT_NAMESPACE is set in the AWX settings configmap

When not set, behavior is unchanged from today.

Also adds:

  • namespaces (get/create) to the operator's own Role
  • serviceaccounts/token (create) to the operator's own Role
ISSUE TYPE
  • New or Enhanced Feature
ADDITIONAL INFORMATION

This follows the principle of least privilege by allowing administrators to
separate job execution workloads from the AWX control plane namespace.

🤖 Generated with Claude Code

TheRealHaoLiu and others added 2 commits June 17, 2026 17:05
Allow users to specify a dedicated namespace for Container Group job
pods via the new `default_container_group_namespace` CR field. When set,
the operator creates the namespace, grants the AWX service account
pod/secret permissions there, and strips those permissions from the AWX
namespace to enforce workload isolation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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