|
| 1 | +--- |
| 2 | +apiVersion: v1 |
| 3 | +kind: ServiceAccount |
| 4 | +metadata: |
| 5 | + namespace: cabotage |
| 6 | + name: cabotage-tailscale-operator-manager-account |
| 7 | +--- |
| 8 | +apiVersion: rbac.authorization.k8s.io/v1 |
| 9 | +kind: ClusterRole |
| 10 | +metadata: |
| 11 | + name: cabotage-tailscale-operator-manager-role-cluster |
| 12 | +rules: |
| 13 | + |
| 14 | + # Framework: knowing which other operators are running (i.e. peering). |
| 15 | + - apiGroups: [kopf.dev] |
| 16 | + resources: [clusterkopfpeerings] |
| 17 | + verbs: [list, watch, patch, get] |
| 18 | + |
| 19 | + # Framework: runtime observation of namespaces & CRDs (addition/deletion). |
| 20 | + - apiGroups: [apiextensions.k8s.io] |
| 21 | + resources: [customresourcedefinitions] |
| 22 | + verbs: [get, list, watch] |
| 23 | + - apiGroups: [""] |
| 24 | + resources: [namespaces] |
| 25 | + verbs: [list, watch] |
| 26 | + |
| 27 | + # Framework: posting the events about the handlers progress/errors. |
| 28 | + - apiGroups: [""] |
| 29 | + resources: [events] |
| 30 | + verbs: [create] |
| 31 | + |
| 32 | + # Application: watch the CabotageTailscaleOperatorConfig CRD cluster-wide. |
| 33 | + - apiGroups: [cabotage.io] |
| 34 | + resources: [cabotagetailscaleoperatorconfigs, cabotagetailscaleoperatorconfigs/status] |
| 35 | + verbs: [list, watch, patch, get] |
| 36 | + |
| 37 | + # Manage Tailnet CRDs and ProxyGroups (cluster-scoped). |
| 38 | + - apiGroups: [tailscale.com] |
| 39 | + resources: [tailnets, proxygroups] |
| 40 | + verbs: [get, create, delete] |
| 41 | +--- |
| 42 | +apiVersion: rbac.authorization.k8s.io/v1 |
| 43 | +kind: Role |
| 44 | +metadata: |
| 45 | + namespace: cabotage |
| 46 | + name: cabotage-tailscale-operator-manager-role-namespaced |
| 47 | +rules: |
| 48 | + |
| 49 | + # Framework: knowing which other operators are running (i.e. peering). |
| 50 | + - apiGroups: [kopf.dev] |
| 51 | + resources: [kopfpeerings] |
| 52 | + verbs: [list, watch, patch, get] |
| 53 | + |
| 54 | + # Framework: posting the events about the handlers progress/errors. |
| 55 | + - apiGroups: [""] |
| 56 | + resources: [events] |
| 57 | + verbs: [create] |
| 58 | + |
| 59 | + # Application: watching & handling for the custom resource we declare. |
| 60 | + - apiGroups: [cabotage.io] |
| 61 | + resources: [cabotagetailscaleoperatorconfigs] |
| 62 | + verbs: [list, watch, patch] |
| 63 | +--- |
| 64 | +apiVersion: rbac.authorization.k8s.io/v1 |
| 65 | +kind: ClusterRoleBinding |
| 66 | +metadata: |
| 67 | + name: cabotage-tailscale-operator-manager-rolebinding-cluster |
| 68 | +roleRef: |
| 69 | + apiGroup: rbac.authorization.k8s.io |
| 70 | + kind: ClusterRole |
| 71 | + name: cabotage-tailscale-operator-manager-role-cluster |
| 72 | +subjects: |
| 73 | + - kind: ServiceAccount |
| 74 | + name: cabotage-tailscale-operator-manager-account |
| 75 | + namespace: cabotage |
| 76 | +--- |
| 77 | +apiVersion: rbac.authorization.k8s.io/v1 |
| 78 | +kind: RoleBinding |
| 79 | +metadata: |
| 80 | + namespace: cabotage |
| 81 | + name: cabotage-tailscale-operator-manager-rolebinding-namespaced |
| 82 | +roleRef: |
| 83 | + apiGroup: rbac.authorization.k8s.io |
| 84 | + kind: Role |
| 85 | + name: cabotage-tailscale-operator-manager-role-namespaced |
| 86 | +subjects: |
| 87 | + - kind: ServiceAccount |
| 88 | + name: cabotage-tailscale-operator-manager-account |
0 commit comments