apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  creationTimestamp: null
  labels:
    addon.kops.k8s.io/name: leader-migration.rbac.addons.k8s.io
    app.kubernetes.io/managed-by: kops
    k8s-addon: leader-migration.rbac.addons.k8s.io
  name: system::leader-locking-migration
  namespace: kube-system
rules:
- apiGroups:
  - coordination.k8s.io
  resourceNames:
  - cloud-provider-extraction-migration
  resources:
  - leases
  verbs:
  - create
  - list
  - get
  - update

---

apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  creationTimestamp: null
  labels:
    addon.kops.k8s.io/name: leader-migration.rbac.addons.k8s.io
    app.kubernetes.io/managed-by: kops
    k8s-addon: leader-migration.rbac.addons.k8s.io
  name: system::leader-locking-migration
  namespace: kube-system
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: system::leader-locking-migration
subjects:
- apiGroup: rbac.authorization.k8s.io
  kind: User
  name: system:kube-controller-manager
- kind: ServiceAccount
  name: kube-controller-manager
  namespace: kube-system
- kind: ServiceAccount
  name: aws-cloud-controller-manager
  namespace: kube-system
- kind: ServiceAccount
  name: cloud-controller-manager
  namespace: kube-system