From a27a8362dc6144dd78b3dea0ba37e2e37256862c Mon Sep 17 00:00:00 2001 From: Junwei Zhao Date: Wed, 1 Apr 2026 20:01:53 +1100 Subject: [PATCH] Update --- adhoc-config/links-iam.yaml | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/adhoc-config/links-iam.yaml b/adhoc-config/links-iam.yaml index 75c0d32..4e7582a 100644 --- a/adhoc-config/links-iam.yaml +++ b/adhoc-config/links-iam.yaml @@ -27,3 +27,41 @@ subjects: - kind: ServiceAccount name: links namespace: apps + +--- + +# Role in the ingress-nginx namespace: +# - read pod logs (for nginxmon) +# - read & patch the nginx ConfigMap (for ip-ban mini app) +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: links-ingress-nginx-reader + namespace: ingress-nginx +rules: + - apiGroups: [""] + resources: ["pods"] + verbs: ["list", "get"] + - apiGroups: [""] + resources: ["pods/log"] + verbs: ["get"] + - apiGroups: [""] + resources: ["configmaps"] + resourceNames: ["ingress-nginx-controller"] + verbs: ["get", "patch"] + +--- +# Bind the Role to the links ServiceAccount (cross-namespace: apps → ingress-nginx) +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: links-ingress-nginx-reader + namespace: ingress-nginx +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: links-ingress-nginx-reader +subjects: + - kind: ServiceAccount + name: links + namespace: apps