diff --git a/deployments/tailscale/operator/rbac.yaml b/deployments/tailscale/operator/rbac.yaml new file mode 100644 index 0000000..6b913d3 --- /dev/null +++ b/deployments/tailscale/operator/rbac.yaml @@ -0,0 +1,39 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: tailscale-operator + namespace: tailscale +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: tailscale-operator +rules: +- apiGroups: [""] + resources: ["secrets", "configmaps"] + verbs: ["create", "delete", "get", "list", "patch", "update", "watch", "patch", "list"] +- apiGroups: [""] + resources: ["pods", "services"] + verbs: ["create", "delete", "get", "list", "patch", "update", "watch", "patch", "list"] +- apiGroups: ["apps"] + resources: ["deployments", "daemonsets"] + verbs: ["create", "delete", "get", "list", "patch", "update", "watch", "patch", "list"] +- apiGroups: ["operator.tailscale.com"] + resources: ["*"] + verbs: ["create", "delete", "get", "list", "patch", "update", "watch", "patch", "list"] +- apiGroups: ["coordination.k8s.io"] + resources: ["leases"] + verbs: ["create", "delete", "get", "list", "patch", "update", "watch"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: tailscale-operator +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: tailscale-operator +subjects: +- kind: ServiceAccount + name: tailscale-operator + namespace: tailscale