747 B · text History 442a476
# libcluster's Cluster.Strategy.Kubernetes queries the API for pods
# matching our selector and reads their pod IPs / hostnames to build the
# peer list. This ServiceAccount + Role grants exactly that.
apiVersion: v1
kind: ServiceAccount
metadata:
  name: ircd
  namespace: ircd
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: ircd-cluster
  namespace: ircd
rules:
  - apiGroups: [""]
    resources: ["pods", "endpoints"]
    verbs: ["get", "list", "watch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: ircd-cluster
  namespace: ircd
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: ircd-cluster
subjects:
  - kind: ServiceAccount
    name: ircd
    namespace: ircd