diff options
author | makefunstuff <[email protected]> | 2024-06-29 22:23:18 +0200 |
---|---|---|
committer | makefunstuff <[email protected]> | 2024-06-29 22:23:18 +0200 |
commit | 5603580954fab7a0bf5ce4286c9312aaf0f79e8b (patch) | |
tree | f799d1883bd61cd303020edcebeb4c156cc15bef /tools/eck-operator/templates | |
parent | 1ef953698ef28104cccaec905990a57e4134746d (diff) | |
download | k3s-lab-5603580954fab7a0bf5ce4286c9312aaf0f79e8b.tar.gz |
beat
Diffstat (limited to 'tools/eck-operator/templates')
-rw-r--r-- | tools/eck-operator/templates/beat.yaml | 80 |
1 files changed, 79 insertions, 1 deletions
diff --git a/tools/eck-operator/templates/beat.yaml b/tools/eck-operator/templates/beat.yaml index 3dc0bb1..5e8bd25 100644 --- a/tools/eck-operator/templates/beat.yaml +++ b/tools/eck-operator/templates/beat.yaml @@ -1,4 +1,82 @@ -apiVersion: beat.k8s.elastic.co/v1beta1 +aapiVersion: beat.k8s.elastic.co/v1beta1 +kind: Beat +metadata: + name: log-storage +spec: + config: + filebeat: + autodiscover: + providers: + - node: ${NODE_NAME} + type: kubernetes + hints: + enabled: true + default_config: + type: container + paths: + - /var/log/containers/*${data.kubernetes.container.id}.log + daemonSet: + podTemplate: + spec: + serviceAccount: elastic-beat-filebeat-log-storage + automountServiceAccountToken: true + containers: + - name: filebeat + env: + - name: NODE_NAME + valueFrom: + fieldRef: + fieldPath: spec.nodeName +... +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: elastic-beat-filebeat-log-storage +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: elastic-beat-autodiscover-binding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: elastic-beat-autodiscover +subjects: +- kind: ServiceAccount + name: elastic-beat-filebeat-log-storage + namespace: default +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: elastic-beat-autodiscover +rules: +- apiGroups: + - "" + resources: + - nodes + - namespaces + - events + - pods + verbs: + - get + - list + - watch +- apiGroups: ["apps"] + resources: + - replicasets + verbs: + - get + - list + - watch +- apiGroups: ["batch"] + resources: + - jobs + verbs: + - get + - list + - watchpiVersion: beat.k8s.elastic.co/v1beta1 kind: Beat metadata: name: log-storage |