# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: dynamo-role
  namespace: ${NAMESPACE}
rules:
  # DynamoGraphDeployment custom resources - needed for create/get/delete operations
  - apiGroups: ["nvidia.com"]
    resources: ["dynamographdeployments"]
    verbs: ["get", "create", "delete"]
  # Pods - needed for listing pods by label selector and getting logs
  - apiGroups: [""]
    resources: ["pods"]
    verbs: ["list"]
  - apiGroups: [""]
    resources: ["pods/log"]
    verbs: ["get"]
  # Services and Deployments - needed for vLLM deployments
  - apiGroups: [""]
    resources: ["services"]
    verbs: ["get", "create", "delete"]
  - apiGroups: ["apps"]
    resources: ["deployments"]
    verbs: ["get", "create", "delete"]
