diff --git a/k3s_rencher/infrastructure/agent-gateway/rbac.yaml b/k3s_rencher/infrastructure/agent-gateway/rbac.yaml index e725829..90d0c37 100644 --- a/k3s_rencher/infrastructure/agent-gateway/rbac.yaml +++ b/k3s_rencher/infrastructure/agent-gateway/rbac.yaml @@ -5,14 +5,108 @@ metadata: namespace: agent-gateway --- apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: agent-readonly-all-except-secrets +rules: + - apiGroups: + - "" + resources: + - bindings + - componentstatuses + - configmaps + - endpoints + - events + - limitranges + - namespaces + - namespaces/status + - nodes + - nodes/status + - persistentvolumeclaims + - persistentvolumeclaims/status + - persistentvolumes + - persistentvolumes/status + - pods + - pods/ephemeralcontainers + - pods/log + - pods/status + - podtemplates + - replicationcontrollers + - replicationcontrollers/status + - resourcequotas + - resourcequotas/status + - serviceaccounts + - services + - services/status + verbs: + - get + - list + - watch + - apiGroups: + - apiregistration.k8s.io + - apps + - admissionregistration.k8s.io + - apiextensions.k8s.io + - authentication.k8s.io + - authorization.k8s.io + - autoscaling + - batch + - certificates.k8s.io + - coordination.k8s.io + - discovery.k8s.io + - events.k8s.io + - flowcontrol.apiserver.k8s.io + - gateway.networking.k8s.io + - helm.cattle.io + - helm.toolkit.fluxcd.io + - hub.traefik.io + - image.toolkit.fluxcd.io + - k3s.cattle.io + - kustomize.toolkit.fluxcd.io + - metrics.k8s.io + - networking.k8s.io + - node.k8s.io + - notification.toolkit.fluxcd.io + - policy + - rbac.authorization.k8s.io + - resource.k8s.io + - scheduling.k8s.io + - source.toolkit.fluxcd.io + - storage.k8s.io + - traefik.io + resources: + - "*" + verbs: + - get + - list + - watch + - nonResourceURLs: + - /api + - /api/* + - /apis + - /apis/* + - /healthz + - /healthz/* + - /livez + - /livez/* + - /openapi + - /openapi/* + - /readyz + - /readyz/* + - /version + - /version/* + verbs: + - get +--- +apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: agent-readonly-view roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: view + name: agent-readonly-all-except-secrets subjects: - kind: ServiceAccount name: agent-readonly - namespace: agent-gateway \ No newline at end of file + namespace: agent-gateway