|
| 1 | +# Enabling Cilium for AI DIAL Deployment Manager |
| 2 | + |
| 3 | +When `CILIUM_NETWORK_POLICIES_ENABLED` is set to `true`, the Deployment Manager allows you to enable Cilium network policies for image build and deployments. |
| 4 | + |
| 5 | +In this case, **extra RBAC roles for Cilium are required** so that the Deployment Manager can create and manage `CiliumNetworkPolicy` and `CiliumClusterwideNetworkPolicy` resources in the target namespaces. |
| 6 | + |
| 7 | +--- |
| 8 | + |
| 9 | +## Required RBAC |
| 10 | + |
| 11 | +Create the following Role and RoleBinding in **each** namespace where the Deployment Manager will manage Cilium policies: `mcp-namespace`, `nim-namespace`, or `kserve-namespace`. |
| 12 | + |
| 13 | +Replace `<mcp-namespace|nim-namespace|kserve-namespace>` with the actual target namespace for that manifest. Replace `<deployment-manager-sa-namespace>` with the namespace where the Deployment Manager ServiceAccount is located. |
| 14 | + |
| 15 | +### Role |
| 16 | + |
| 17 | +```yaml |
| 18 | +apiVersion: rbac.authorization.k8s.io/v1 |
| 19 | +kind: Role |
| 20 | +metadata: |
| 21 | + name: deployment-manager-cilium-role |
| 22 | + namespace: <mcp-namespace|nim-namespace|kserve-namespace> |
| 23 | +rules: |
| 24 | + - verbs: |
| 25 | + - create |
| 26 | + - update |
| 27 | + - deletecollection |
| 28 | + - patch |
| 29 | + - get |
| 30 | + - delete |
| 31 | + - list |
| 32 | + - watch |
| 33 | + apiGroups: |
| 34 | + - cilium.io |
| 35 | + resources: |
| 36 | + - ciliumnetworkpolicies |
| 37 | + - ciliumclusterwidenetworkpolicies |
| 38 | + - verbs: |
| 39 | + - patch |
| 40 | + - update |
| 41 | + apiGroups: |
| 42 | + - cilium.io |
| 43 | + resources: |
| 44 | + - ciliumnetworkpolicies/status |
| 45 | + - ciliumclusterwidenetworkpolicies/status |
| 46 | +``` |
| 47 | +
|
| 48 | +### RoleBinding |
| 49 | +
|
| 50 | +```yaml |
| 51 | +apiVersion: rbac.authorization.k8s.io/v1 |
| 52 | +kind: RoleBinding |
| 53 | +metadata: |
| 54 | + name: ai-dial-deployment-manager-cilium-role |
| 55 | + namespace: <mcp-namespace|nim-namespace|kserve-namespace> |
| 56 | +subjects: |
| 57 | + - kind: ServiceAccount |
| 58 | + name: ai-dial-deployment-manager |
| 59 | + namespace: <deployment-manager-sa-namespace> |
| 60 | +roleRef: |
| 61 | + apiGroup: rbac.authorization.k8s.io |
| 62 | + kind: Role |
| 63 | + name: deployment-manager-cilium-role |
| 64 | +``` |
| 65 | +
|
| 66 | +--- |
| 67 | +
|
| 68 | +## Summary |
| 69 | +
|
| 70 | +| Setting | Effect | |
| 71 | +|--------|--------| |
| 72 | +| `CILIUM_NETWORK_POLICIES_ENABLED=true` | Deployment Manager can enable Cilium network policies for image build and deployments | |
| 73 | +| Required setup | Role + RoleBinding above in each target namespace (`mcp-namespace`, `nim-namespace`, `kserve-namespace`, etc.) | |
| 74 | + |
| 75 | +Apply the manifests in each namespace where Cilium policies will be managed, then set `CILIUM_NETWORK_POLICIES_ENABLED=true` for the Deployment Manager. |
0 commit comments