diff --git a/haproxy-ingress-rbac.yaml b/haproxy-ingress-rbac.yaml new file mode 100644 index 0000000..be6c706 --- /dev/null +++ b/haproxy-ingress-rbac.yaml @@ -0,0 +1,30 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: haproxy-sa + namespace: kube-system +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: haproxy-ingress-reader +rules: +- apiGroups: [""] + resources: ["endpoints", "services", "namespaces"] + verbs: ["get", "list", "watch"] +- apiGroups: ["networking.k8s.io"] + resources: ["ingresses"] + verbs: ["get", "list", "watch"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: haproxy-ingress-reader-binding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: haproxy-ingress-reader +subjects: +- kind: ServiceAccount + name: haproxy-sa + namespace: kube-system