Skip to content

Commit

Permalink
Remove Beats autodiscover RBAC rules (#3322) (#3364)
Browse files Browse the repository at this point in the history
  • Loading branch information
pebrc authored Jul 1, 2020
1 parent dd9d61d commit 668b710
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 44 deletions.
29 changes: 0 additions & 29 deletions hack/manifest-gen/assets/charts/eck/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -142,32 +142,3 @@ RBAC permissions
- delete
{{- end -}}


{{/*
RBAC permissions on cluster resources.
These are separate as the user may not have enough permissions to manipulate cluster resources.
*/}}
{{- define "cluster.resource.rbac.rules" -}}
# required to allow the operator to bind service accounts it manages
# to role that holds permissions needed for Beat autodiscover feature
- apiGroups:
- rbac.authorization.k8s.io
resources:
- clusterrolebindings
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- rbac.authorization.k8s.io
resources:
- clusterroles
verbs:
- bind
resourceNames:
- elastic-beat-autodiscover
{{- end -}}
15 changes: 0 additions & 15 deletions hack/manifest-gen/assets/charts/eck/templates/cluster-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,6 @@ metadata:
name: {{ .Values.operator.name }}
rules:
{{ template "rbac.rules" . | toYaml | indent 2 }}
{{ template "cluster.resource.rbac.rules" . | toYaml | indent 2 }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: elastic-beat-autodiscover
rules:
- apiGroups: [""]
resources:
- namespaces
- pods
verbs:
- get
- watch
- list
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand Down

0 comments on commit 668b710

Please sign in to comment.