apiVersion: v1
kind: ServiceAccount
metadata:
  name: ignite
  namespace: development
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: ignite-endpoint-access
  namespace: development
  labels:
    app: ignite
rules:
  - apiGroups: [""]
    resources: ["endpoints","pods"]
    resourceNames: ["ignite"]
    verbs: ["get","list","watch","post"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: ignite-role-binding
  namespace: development
  labels:
    app: ignite
subjects:
  - kind: ServiceAccount
    name: ignite
roleRef:
  kind: Role
  name: ignite-endpoint-access
  apiGroup: rbac.authorization.k8s.io
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: ignite-rbac
subjects:
    - kind: ServiceAccount
      name: default
      namespace: development
roleRef:
    kind: ClusterRole
    name: cluster-admin
    apiGroup: rbac.authorization.k8s.io
