Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Metricbeat improvements #567

Merged
merged 7 commits into from
Apr 10, 2020
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions metricbeat/examples/security/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ metricbeatConfig:
#ssl.certificate_authorities:
#- /var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt
processors:
- add_kubernetes_metadata:
in_cluster: true
- add_kubernetes_metadata: ~
- module: kubernetes
enabled: true
metricsets:
Expand Down
4 changes: 2 additions & 2 deletions metricbeat/tests/metricbeat_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,9 @@ def test_cluster_role_rules():
config = ""
r = helm_template(config)
rules = r["clusterrole"]["release-name-metricbeat-cluster-role"]["rules"][0]
assert rules["apiGroups"][0] == "extensions"
assert rules["apiGroups"][0] == ""
assert rules["verbs"][0] == "get"
assert rules["resources"][0] == "namespaces"
assert rules["resources"][0] == "nodes"

config = """
clusterRoleRules:
Expand Down
39 changes: 21 additions & 18 deletions metricbeat/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ metricbeatConfig:
#ssl.certificate_authorities:
#- /var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt
processors:
- add_kubernetes_metadata:
in_cluster: true
- add_kubernetes_metadata: ~
- module: kubernetes
enabled: true
metricsets:
Expand Down Expand Up @@ -141,22 +140,26 @@ labels: {}
managedServiceAccount: true

clusterRoleRules:
- apiGroups:
- "extensions"
- "apps"
- ""
resources:
- namespaces
- pods
- events
- deployments
- nodes
- nodes/stats
- replicasets
verbs:
- get
- list
- watch
- apiGroups: [""]
resources:
- nodes
- namespaces
- events
- pods
verbs: ["get", "list", "watch"]
- apiGroups: ["extensions"]
resources:
- replicasets
verbs: ["get", "list", "watch"]
- apiGroups: ["apps"]
resources:
- statefulsets
- deployments
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also need replicasets here. There was an issue with this: elastic/beats#15741

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in 470fecd

verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources:
- nodes/stats
verbs: ["get"]

podAnnotations: {}
# iam.amazonaws.com/role: es-cluster
Expand Down