# ServiceAccount for Helm upgrade operations
apiVersion: v1
kind: ServiceAccount
metadata:
  name: helm-upgrader
  namespace: mission-control
---
# RoleBinding for namespace-scoped permissions
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: helm-release-upgrader
  namespace: mission-control
subjects:
  - kind: ServiceAccount
    name: helm-upgrader
    namespace: mission-control
roleRef:
  kind: Role
  name: helm-release-upgrader
  apiGroup: rbac.authorization.k8s.io
---
# ClusterRoleBinding for CRD management
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: helm-crd-upgrader
subjects:
  - kind: ServiceAccount
    name: helm-upgrader
    namespace: mission-control
roleRef:
  kind: ClusterRole
  name: helm-crd-upgrader
  apiGroup: rbac.authorization.k8s.io
