Summary
The container-platform-environments repo handles RBAC bindings (RoleBindings via app-baseline) and authentication (EKS access entries via identity/terraform/), but has no mechanism for BU teams to define custom Kubernetes Roles or ClusterRoles. Teams can only reference built-in ClusterRoles (view, edit, admin).
Problem
BU teams will need scoped-down or purpose-built roles that don't match the broad built-in ones:
- CI/CD deployer — can update Deployments and Services but not read Secrets
- Readonly debugger — can view pods, logs, and events but not exec into containers
- Namespace admin — full access within namespaces but no cluster-scoped permissions
- Restricted editor — edit minus certain resources (e.g. NetworkPolicies, ResourceQuotas)
Without this, teams get overly broad access or must raise manual requests — defeating the self-service GitOps model.
Proposed Solution
Extend the app-baseline chart with an optional roles: field in product.yaml:
access:
- group: ci-deployer
role: my-product-deployer
clusters:
- container-platform-octo-nonlive
roles:
- name: my-product-deployer
rules:
- apiGroups: ["apps"]
resources: ["deployments", "replicasets"]
verbs: ["get", "list", "watch", "create", "update", "patch"]
- apiGroups: [""]
resources: ["services", "configmaps"]
verbs: ["get", "list", "watch", "create", "update", "patch"]
Implementation
- New template
charts/app-baseline/templates/clusterrole.yaml — creates ClusterRoles from .Values.roles
- Naming convention — prefix with product name (
<product>-<role-name>) to avoid collisions
- Gatekeeper constraint — block roles that grant wildcard
* on all apiGroups/resources/verbs
- Documentation — update README with common role pattern examples
Why not a separate Terraform module?
- Roles are product-driven and BU-specific — they belong in
product.yaml
- The platform AppProjects already permit ClusterRole creation
- No new pipeline or infrastructure needed
- Same self-service GitOps model as namespaces and RoleBindings
Acceptance Criteria
Related
container-platform-environments — charts/app-baseline/
container-platform-terraform-gatekeeper — guardrail constraint
- ADR-015: GitOps Repository Structure
Summary
The
container-platform-environmentsrepo handles RBAC bindings (RoleBindings viaapp-baseline) and authentication (EKS access entries viaidentity/terraform/), but has no mechanism for BU teams to define custom Kubernetes Roles or ClusterRoles. Teams can only reference built-in ClusterRoles (view,edit,admin).Problem
BU teams will need scoped-down or purpose-built roles that don't match the broad built-in ones:
Without this, teams get overly broad access or must raise manual requests — defeating the self-service GitOps model.
Proposed Solution
Extend the
app-baselinechart with an optionalroles:field inproduct.yaml:Implementation
charts/app-baseline/templates/clusterrole.yaml— creates ClusterRoles from.Values.roles<product>-<role-name>) to avoid collisions*on all apiGroups/resources/verbsWhy not a separate Terraform module?
product.yamlAcceptance Criteria
app-baselinechart supports optionalroles:list in valuesroles:field with common examplesroles:work unchangedRelated
container-platform-environments—charts/app-baseline/container-platform-terraform-gatekeeper— guardrail constraint