From 5903badd5872d6a02862ec0b4eb7925d68a38193 Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 8 Jun 2022 12:43:46 -0600 Subject: [PATCH] Add mount of /etc/machine-id for managed Agent in k8s --- deploy/kubernetes/elastic-agent-managed-kubernetes.yaml | 7 +++++++ .../elastic-agent-managed-daemonset.yaml | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/deploy/kubernetes/elastic-agent-managed-kubernetes.yaml b/deploy/kubernetes/elastic-agent-managed-kubernetes.yaml index 882e7b46e21..761d659771a 100644 --- a/deploy/kubernetes/elastic-agent-managed-kubernetes.yaml +++ b/deploy/kubernetes/elastic-agent-managed-kubernetes.yaml @@ -85,6 +85,9 @@ spec: - name: etcsysmd mountPath: /hostfs/etc/systemd readOnly: true + - name: etc-mid + mountPath: /etc/machine-id + readOnly: true volumes: - name: proc hostPath: @@ -113,6 +116,10 @@ spec: - name: etcsysmd hostPath: path: /etc/systemd + - name: etc-mid + hostPath: + path: /etc/machine-id + type: File --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding diff --git a/deploy/kubernetes/elastic-agent-managed/elastic-agent-managed-daemonset.yaml b/deploy/kubernetes/elastic-agent-managed/elastic-agent-managed-daemonset.yaml index 097d9786e03..ee7b3dc3219 100644 --- a/deploy/kubernetes/elastic-agent-managed/elastic-agent-managed-daemonset.yaml +++ b/deploy/kubernetes/elastic-agent-managed/elastic-agent-managed-daemonset.yaml @@ -85,6 +85,9 @@ spec: - name: etcsysmd mountPath: /hostfs/etc/systemd readOnly: true + - name: etc-mid + mountPath: /etc/machine-id + readOnly: true volumes: - name: proc hostPath: @@ -113,3 +116,7 @@ spec: - name: etcsysmd hostPath: path: /etc/systemd + - name: etc-mid + hostPath: + path: /etc/machine-id + type: File