apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: ecr-credentials-sa
rules:
 - apiGroups: [""]
   resources: ["secrets"]
   verbs: ["get", "watch", "create", "update", "patch", "delete"]
 - apiGroups: [""]
   resources: ["serviceaccounts"]
   verbs: ["get", "patch"]