From f2af90f2cccb927d361a853f3565feae3226c755 Mon Sep 17 00:00:00 2001 From: Daniel Wright Date: Fri, 11 Oct 2024 17:31:49 +1000 Subject: [PATCH] Update labels to use kubernetes recommended labels (#4722) Kubernetes have not used the `app` or `k8s-app` for some time and have provided guidance on what the recommended labels are for some time as seen in their [docs](https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/). This commit updates all manifests/docs to use this approach. Co-authored-by: Julien Lind --- ...-to-adopt-official-recommended-labels.yaml | 31 +++++++++++++++++++ .../base/elastic-agent-managed-daemonset.yaml | 6 ++-- .../base/elastic-agent-managed-role.yaml | 6 ++-- ...elastic-agent-managed-service-account.yaml | 2 +- ...-agent-standalone-daemonset-configmap.yaml | 2 +- .../elastic-agent-standalone-daemonset.yaml | 6 ++-- ...nt-standalone-ksm-daemonset-configmap.yaml | 2 +- ...-standalone-ksm-statefulset-configmap.yaml | 2 +- .../base/elastic-agent-standalone-role.yaml | 6 ++-- ...stic-agent-standalone-service-account.yaml | 2 +- .../base/elastic-agent-managed-daemonset.yaml | 6 ++-- .../base/elastic-agent-managed-role.yaml | 6 ++-- ...elastic-agent-managed-service-account.yaml | 2 +- .../elastic-agent-managed-statefulset.yaml | 6 ++-- .../elastic-agent-standalone-daemonset.yaml | 6 ++-- ...nt-standalone-ksm-daemonset-configmap.yaml | 2 +- ...-standalone-ksm-statefulset-configmap.yaml | 2 +- .../base/elastic-agent-standalone-role.yaml | 6 ++-- ...stic-agent-standalone-service-account.yaml | 2 +- .../elastic-agent-standalone-statefulset.yaml | 6 ++-- .../elastic-agent-managed-kubernetes.yaml | 14 ++++----- .../elastic-agent-managed-daemonset.yaml | 6 ++-- .../elastic-agent-managed-role.yaml | 6 ++-- ...elastic-agent-managed-service-account.yaml | 2 +- .../elastic-agent-standalone-kubernetes.yaml | 16 +++++----- ...-agent-standalone-daemonset-configmap.yaml | 2 +- .../elastic-agent-standalone-daemonset.yaml | 6 ++-- ...nt-standalone-ksm-daemonset-configmap.yaml | 2 +- ...-standalone-ksm-statefulset-configmap.yaml | 2 +- .../elastic-agent-standalone-role.yaml | 6 ++-- ...stic-agent-standalone-service-account.yaml | 2 +- .../elastic-agent-managed/kustomization.yml | 2 +- .../kustomization.yml | 2 +- .../elastic-agent-managed-gke-autopilot.yaml | 14 ++++----- ...lastic-agent-standalone-gke-autopilot.yaml | 16 +++++----- ...elastic-agent-managed-daemonset-ksm-0.yaml | 24 +++++++------- ...lastic-agent-managed-deployment-ksm-1.yaml | 22 ++++++------- ...stic-agent-standalone-daemonset-ksm-0.yaml | 26 ++++++++-------- ...tic-agent-standalone-deployment-ksm-1.yaml | 26 ++++++++-------- .../agent-cluster-role.yaml | 2 +- .../elastic-agent-kustomize/agent-role.yaml | 4 +-- .../agent-service-account.yaml | 2 +- .../agent-statefulset.yaml | 6 ++-- .../elastic-agent-managed-kubernetes.yaml | 14 ++++----- ...ent-standalone-kubernetes-side-leader.yaml | 16 +++++----- ...agent-standalone-statefulset-side-ksm.yaml | 16 +++++----- ...elastic-agent-managed-daemonset-ksm-0.yaml | 24 +++++++------- ...lastic-agent-managed-deployment-ksm-1.yaml | 22 ++++++------- ...stic-agent-standalone-daemonset-ksm-0.yaml | 26 ++++++++-------- ...tic-agent-standalone-deployment-ksm-1.yaml | 26 ++++++++-------- 50 files changed, 247 insertions(+), 216 deletions(-) create mode 100644 changelog/fragments/1715551124-Update-kubernetes-manifests-to-adopt-official-recommended-labels.yaml diff --git a/changelog/fragments/1715551124-Update-kubernetes-manifests-to-adopt-official-recommended-labels.yaml b/changelog/fragments/1715551124-Update-kubernetes-manifests-to-adopt-official-recommended-labels.yaml new file mode 100644 index 00000000000..cf4e184da8f --- /dev/null +++ b/changelog/fragments/1715551124-Update-kubernetes-manifests-to-adopt-official-recommended-labels.yaml @@ -0,0 +1,31 @@ +# Kind can be one of: +# - breaking-change: a change to previously-documented behavior +# - deprecation: functionality that is being removed in a later release +# - bug-fix: fixes a problem in a previous version +# - enhancement: extends functionality but does not break or fix existing behavior +# - feature: new functionality +# - known-issue: problems that we are aware of in a given version +# - security: impacts on the security of a product or a user’s deployment. +# - upgrade: important information for someone upgrading from a prior version +# - other: does not fit into any of the other categories +kind: feature + +# Change summary; a 80ish characters long description of the change. +summary: Update kubernetes manifests to adopt official recommended labels + +# Long description; in case the summary is not enough to describe the change +# this field accommodate a description without length limits. +# NOTE: This field will be rendered only for breaking-change and known-issue kinds at the moment. +description: Update kubernetes manifests to adopt the official recommended labels. This will require a `kubectl replace` to apply as selector labels are an immutable field. + +# Affected component; usually one of "elastic-agent", "fleet-server", "filebeat", "metricbeat", "auditbeat", "all", etc. +component: elastic-agent + +# PR URL; optional; the PR number that added the changeset. +# If not present is automatically filled by the tooling finding the PR where this changelog fragment has been added. +# NOTE: the tooling supports backports, so it's able to fill the original PR number instead of the backport PR number. +# Please provide it if you are adding a fragment for a different PR. +pr: https://github.com/elastic/elastic-agent/pull/4722 +# Issue URL; optional; the GitHub issue related to this changeset (either closes or is part of). +# If not present is automatically filled by the tooling with the issue linked to the PR number. +#issue: https://github.com/owner/repo/1234 diff --git a/deploy/kubernetes/elastic-agent-kustomize/default/elastic-agent-managed/base/elastic-agent-managed-daemonset.yaml b/deploy/kubernetes/elastic-agent-kustomize/default/elastic-agent-managed/base/elastic-agent-managed-daemonset.yaml index e0b704a22ff..79b77605c69 100644 --- a/deploy/kubernetes/elastic-agent-kustomize/default/elastic-agent-managed/base/elastic-agent-managed-daemonset.yaml +++ b/deploy/kubernetes/elastic-agent-kustomize/default/elastic-agent-managed/base/elastic-agent-managed-daemonset.yaml @@ -5,15 +5,15 @@ metadata: name: elastic-agent namespace: kube-system labels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent spec: selector: matchLabels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent template: metadata: labels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent spec: # Tolerations are needed to run Elastic Agent on Kubernetes control-plane nodes. # Agents running on control-plane nodes collect metrics from the control plane components (scheduler, controller manager) of Kubernetes diff --git a/deploy/kubernetes/elastic-agent-kustomize/default/elastic-agent-managed/base/elastic-agent-managed-role.yaml b/deploy/kubernetes/elastic-agent-kustomize/default/elastic-agent-managed/base/elastic-agent-managed-role.yaml index 778a4ba5520..3ccc365ba3b 100644 --- a/deploy/kubernetes/elastic-agent-kustomize/default/elastic-agent-managed/base/elastic-agent-managed-role.yaml +++ b/deploy/kubernetes/elastic-agent-kustomize/default/elastic-agent-managed/base/elastic-agent-managed-role.yaml @@ -3,7 +3,7 @@ kind: ClusterRole metadata: name: elastic-agent labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: [""] resources: @@ -75,7 +75,7 @@ metadata: # Should be the namespace where elastic-agent is running namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: - coordination.k8s.io @@ -89,7 +89,7 @@ metadata: name: elastic-agent-kubeadm-config namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: [""] resources: diff --git a/deploy/kubernetes/elastic-agent-kustomize/default/elastic-agent-managed/base/elastic-agent-managed-service-account.yaml b/deploy/kubernetes/elastic-agent-kustomize/default/elastic-agent-managed/base/elastic-agent-managed-service-account.yaml index 43372b547d0..c2279852ffa 100644 --- a/deploy/kubernetes/elastic-agent-kustomize/default/elastic-agent-managed/base/elastic-agent-managed-service-account.yaml +++ b/deploy/kubernetes/elastic-agent-kustomize/default/elastic-agent-managed/base/elastic-agent-managed-service-account.yaml @@ -4,4 +4,4 @@ metadata: name: elastic-agent namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent diff --git a/deploy/kubernetes/elastic-agent-kustomize/default/elastic-agent-standalone/base/elastic-agent-standalone-daemonset-configmap.yaml b/deploy/kubernetes/elastic-agent-kustomize/default/elastic-agent-standalone/base/elastic-agent-standalone-daemonset-configmap.yaml index 36108e80a9b..741ebfead5c 100644 --- a/deploy/kubernetes/elastic-agent-kustomize/default/elastic-agent-standalone/base/elastic-agent-standalone-daemonset-configmap.yaml +++ b/deploy/kubernetes/elastic-agent-kustomize/default/elastic-agent-standalone/base/elastic-agent-standalone-daemonset-configmap.yaml @@ -5,7 +5,7 @@ metadata: name: agent-node-datastreams namespace: kube-system labels: - k8s-app: elastic-agent-standalone + app.kubernetes.io/name: elastic-agent-standalone data: agent.yml: |- outputs: diff --git a/deploy/kubernetes/elastic-agent-kustomize/default/elastic-agent-standalone/base/elastic-agent-standalone-daemonset.yaml b/deploy/kubernetes/elastic-agent-kustomize/default/elastic-agent-standalone/base/elastic-agent-standalone-daemonset.yaml index faa138e443b..4446a485d13 100644 --- a/deploy/kubernetes/elastic-agent-kustomize/default/elastic-agent-standalone/base/elastic-agent-standalone-daemonset.yaml +++ b/deploy/kubernetes/elastic-agent-kustomize/default/elastic-agent-standalone/base/elastic-agent-standalone-daemonset.yaml @@ -5,15 +5,15 @@ metadata: name: elastic-agent-standalone namespace: kube-system labels: - app: elastic-agent-standalone + app.kubernetes.io/name: elastic-agent-standalone spec: selector: matchLabels: - app: elastic-agent-standalone + app.kubernetes.io/name: elastic-agent-standalone template: metadata: labels: - app: elastic-agent-standalone + app.kubernetes.io/name: elastic-agent-standalone spec: # Tolerations are needed to run Elastic Agent on Kubernetes control-plane nodes. # Agents running on control-plane nodes collect metrics from the control plane components (scheduler, controller manager) of Kubernetes diff --git a/deploy/kubernetes/elastic-agent-kustomize/default/elastic-agent-standalone/base/elastic-agent-standalone-ksm-daemonset-configmap.yaml b/deploy/kubernetes/elastic-agent-kustomize/default/elastic-agent-standalone/base/elastic-agent-standalone-ksm-daemonset-configmap.yaml index dbffe084da1..9bfae8731c4 100644 --- a/deploy/kubernetes/elastic-agent-kustomize/default/elastic-agent-standalone/base/elastic-agent-standalone-ksm-daemonset-configmap.yaml +++ b/deploy/kubernetes/elastic-agent-kustomize/default/elastic-agent-standalone/base/elastic-agent-standalone-ksm-daemonset-configmap.yaml @@ -6,7 +6,7 @@ metadata: name: agent-node-datastreams namespace: kube-system labels: - k8s-app: elastic-agent-standalone + app.kubernetes.io/name: elastic-agent-standalone data: agent.yml: |- outputs: diff --git a/deploy/kubernetes/elastic-agent-kustomize/default/elastic-agent-standalone/base/elastic-agent-standalone-ksm-statefulset-configmap.yaml b/deploy/kubernetes/elastic-agent-kustomize/default/elastic-agent-standalone/base/elastic-agent-standalone-ksm-statefulset-configmap.yaml index cf913c8ea7c..1b73c1de27b 100644 --- a/deploy/kubernetes/elastic-agent-kustomize/default/elastic-agent-standalone/base/elastic-agent-standalone-ksm-statefulset-configmap.yaml +++ b/deploy/kubernetes/elastic-agent-kustomize/default/elastic-agent-standalone/base/elastic-agent-standalone-ksm-statefulset-configmap.yaml @@ -6,7 +6,7 @@ metadata: name: agent-ksm-datastreams namespace: kube-system labels: - k8s-app: elastic-agent-standalone + app.kubernetes.io/name: elastic-agent-standalone data: agent.yml: |- outputs: diff --git a/deploy/kubernetes/elastic-agent-kustomize/default/elastic-agent-standalone/base/elastic-agent-standalone-role.yaml b/deploy/kubernetes/elastic-agent-kustomize/default/elastic-agent-standalone/base/elastic-agent-standalone-role.yaml index a0cd80b456a..26648378c21 100644 --- a/deploy/kubernetes/elastic-agent-kustomize/default/elastic-agent-standalone/base/elastic-agent-standalone-role.yaml +++ b/deploy/kubernetes/elastic-agent-kustomize/default/elastic-agent-standalone/base/elastic-agent-standalone-role.yaml @@ -3,7 +3,7 @@ kind: ClusterRole metadata: name: elastic-agent-standalone labels: - k8s-app: elastic-agent-standalone + app.kubernetes.io/name: elastic-agent-standalone rules: - apiGroups: [""] resources: @@ -75,7 +75,7 @@ metadata: # Should be the namespace where elastic-agent is running namespace: kube-system labels: - k8s-app: elastic-agent-standalone + app.kubernetes.io/name: elastic-agent-standalone rules: - apiGroups: - coordination.k8s.io @@ -89,7 +89,7 @@ metadata: name: elastic-agent-standalone-kubeadm-config namespace: kube-system labels: - k8s-app: elastic-agent-standalone + app.kubernetes.io/name: elastic-agent-standalone rules: - apiGroups: [""] resources: diff --git a/deploy/kubernetes/elastic-agent-kustomize/default/elastic-agent-standalone/base/elastic-agent-standalone-service-account.yaml b/deploy/kubernetes/elastic-agent-kustomize/default/elastic-agent-standalone/base/elastic-agent-standalone-service-account.yaml index d6e983fc1d3..9cb5472030e 100644 --- a/deploy/kubernetes/elastic-agent-kustomize/default/elastic-agent-standalone/base/elastic-agent-standalone-service-account.yaml +++ b/deploy/kubernetes/elastic-agent-kustomize/default/elastic-agent-standalone/base/elastic-agent-standalone-service-account.yaml @@ -4,4 +4,4 @@ metadata: name: elastic-agent-standalone namespace: kube-system labels: - k8s-app: elastic-agent-standalone + app.kubernetes.io/name: elastic-agent-standalone diff --git a/deploy/kubernetes/elastic-agent-kustomize/ksm-autosharding/elastic-agent-managed/base/elastic-agent-managed-daemonset.yaml b/deploy/kubernetes/elastic-agent-kustomize/ksm-autosharding/elastic-agent-managed/base/elastic-agent-managed-daemonset.yaml index 97a961a0980..9d80b74b7f8 100644 --- a/deploy/kubernetes/elastic-agent-kustomize/ksm-autosharding/elastic-agent-managed/base/elastic-agent-managed-daemonset.yaml +++ b/deploy/kubernetes/elastic-agent-kustomize/ksm-autosharding/elastic-agent-managed/base/elastic-agent-managed-daemonset.yaml @@ -5,15 +5,15 @@ metadata: name: elastic-agent namespace: kube-system labels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent spec: selector: matchLabels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent template: metadata: labels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent spec: # Tolerations are needed to run Elastic Agent on Kubernetes control-plane nodes. # Agents running on control-plane nodes collect metrics from the control plane components (scheduler, controller manager) of Kubernetes diff --git a/deploy/kubernetes/elastic-agent-kustomize/ksm-autosharding/elastic-agent-managed/base/elastic-agent-managed-role.yaml b/deploy/kubernetes/elastic-agent-kustomize/ksm-autosharding/elastic-agent-managed/base/elastic-agent-managed-role.yaml index 778a4ba5520..3ccc365ba3b 100644 --- a/deploy/kubernetes/elastic-agent-kustomize/ksm-autosharding/elastic-agent-managed/base/elastic-agent-managed-role.yaml +++ b/deploy/kubernetes/elastic-agent-kustomize/ksm-autosharding/elastic-agent-managed/base/elastic-agent-managed-role.yaml @@ -3,7 +3,7 @@ kind: ClusterRole metadata: name: elastic-agent labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: [""] resources: @@ -75,7 +75,7 @@ metadata: # Should be the namespace where elastic-agent is running namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: - coordination.k8s.io @@ -89,7 +89,7 @@ metadata: name: elastic-agent-kubeadm-config namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: [""] resources: diff --git a/deploy/kubernetes/elastic-agent-kustomize/ksm-autosharding/elastic-agent-managed/base/elastic-agent-managed-service-account.yaml b/deploy/kubernetes/elastic-agent-kustomize/ksm-autosharding/elastic-agent-managed/base/elastic-agent-managed-service-account.yaml index 43372b547d0..c2279852ffa 100644 --- a/deploy/kubernetes/elastic-agent-kustomize/ksm-autosharding/elastic-agent-managed/base/elastic-agent-managed-service-account.yaml +++ b/deploy/kubernetes/elastic-agent-kustomize/ksm-autosharding/elastic-agent-managed/base/elastic-agent-managed-service-account.yaml @@ -4,4 +4,4 @@ metadata: name: elastic-agent namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent diff --git a/deploy/kubernetes/elastic-agent-kustomize/ksm-autosharding/elastic-agent-managed/extra/elastic-agent-managed-statefulset.yaml b/deploy/kubernetes/elastic-agent-kustomize/ksm-autosharding/elastic-agent-managed/extra/elastic-agent-managed-statefulset.yaml index f4a4eb0bf84..25f7c3822d3 100644 --- a/deploy/kubernetes/elastic-agent-kustomize/ksm-autosharding/elastic-agent-managed/extra/elastic-agent-managed-statefulset.yaml +++ b/deploy/kubernetes/elastic-agent-kustomize/ksm-autosharding/elastic-agent-managed/extra/elastic-agent-managed-statefulset.yaml @@ -5,15 +5,15 @@ metadata: name: elastic-agent namespace: kube-system labels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent spec: selector: matchLabels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent template: metadata: labels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent spec: # Tolerations are needed to run Elastic Agent on Kubernetes control-plane nodes. # Agents running on control-plane nodes collect metrics from the control plane components (scheduler, controller manager) of Kubernetes diff --git a/deploy/kubernetes/elastic-agent-kustomize/ksm-autosharding/elastic-agent-standalone/base/elastic-agent-standalone-daemonset.yaml b/deploy/kubernetes/elastic-agent-kustomize/ksm-autosharding/elastic-agent-standalone/base/elastic-agent-standalone-daemonset.yaml index d96ccc3a845..e834ffa8688 100644 --- a/deploy/kubernetes/elastic-agent-kustomize/ksm-autosharding/elastic-agent-standalone/base/elastic-agent-standalone-daemonset.yaml +++ b/deploy/kubernetes/elastic-agent-kustomize/ksm-autosharding/elastic-agent-standalone/base/elastic-agent-standalone-daemonset.yaml @@ -5,15 +5,15 @@ metadata: name: elastic-agent-standalone namespace: kube-system labels: - app: elastic-agent-standalone + app.kubernetes.io/name: elastic-agent-standalone spec: selector: matchLabels: - app: elastic-agent-standalone + app.kubernetes.io/name: elastic-agent-standalone template: metadata: labels: - app: elastic-agent-standalone + app.kubernetes.io/name: elastic-agent-standalone spec: # Tolerations are needed to run Elastic Agent on Kubernetes control-plane nodes. # Agents running on control-plane nodes collect metrics from the control plane components (scheduler, controller manager) of Kubernetes diff --git a/deploy/kubernetes/elastic-agent-kustomize/ksm-autosharding/elastic-agent-standalone/base/elastic-agent-standalone-ksm-daemonset-configmap.yaml b/deploy/kubernetes/elastic-agent-kustomize/ksm-autosharding/elastic-agent-standalone/base/elastic-agent-standalone-ksm-daemonset-configmap.yaml index dbffe084da1..9bfae8731c4 100644 --- a/deploy/kubernetes/elastic-agent-kustomize/ksm-autosharding/elastic-agent-standalone/base/elastic-agent-standalone-ksm-daemonset-configmap.yaml +++ b/deploy/kubernetes/elastic-agent-kustomize/ksm-autosharding/elastic-agent-standalone/base/elastic-agent-standalone-ksm-daemonset-configmap.yaml @@ -6,7 +6,7 @@ metadata: name: agent-node-datastreams namespace: kube-system labels: - k8s-app: elastic-agent-standalone + app.kubernetes.io/name: elastic-agent-standalone data: agent.yml: |- outputs: diff --git a/deploy/kubernetes/elastic-agent-kustomize/ksm-autosharding/elastic-agent-standalone/base/elastic-agent-standalone-ksm-statefulset-configmap.yaml b/deploy/kubernetes/elastic-agent-kustomize/ksm-autosharding/elastic-agent-standalone/base/elastic-agent-standalone-ksm-statefulset-configmap.yaml index cf913c8ea7c..1b73c1de27b 100644 --- a/deploy/kubernetes/elastic-agent-kustomize/ksm-autosharding/elastic-agent-standalone/base/elastic-agent-standalone-ksm-statefulset-configmap.yaml +++ b/deploy/kubernetes/elastic-agent-kustomize/ksm-autosharding/elastic-agent-standalone/base/elastic-agent-standalone-ksm-statefulset-configmap.yaml @@ -6,7 +6,7 @@ metadata: name: agent-ksm-datastreams namespace: kube-system labels: - k8s-app: elastic-agent-standalone + app.kubernetes.io/name: elastic-agent-standalone data: agent.yml: |- outputs: diff --git a/deploy/kubernetes/elastic-agent-kustomize/ksm-autosharding/elastic-agent-standalone/base/elastic-agent-standalone-role.yaml b/deploy/kubernetes/elastic-agent-kustomize/ksm-autosharding/elastic-agent-standalone/base/elastic-agent-standalone-role.yaml index a0cd80b456a..26648378c21 100644 --- a/deploy/kubernetes/elastic-agent-kustomize/ksm-autosharding/elastic-agent-standalone/base/elastic-agent-standalone-role.yaml +++ b/deploy/kubernetes/elastic-agent-kustomize/ksm-autosharding/elastic-agent-standalone/base/elastic-agent-standalone-role.yaml @@ -3,7 +3,7 @@ kind: ClusterRole metadata: name: elastic-agent-standalone labels: - k8s-app: elastic-agent-standalone + app.kubernetes.io/name: elastic-agent-standalone rules: - apiGroups: [""] resources: @@ -75,7 +75,7 @@ metadata: # Should be the namespace where elastic-agent is running namespace: kube-system labels: - k8s-app: elastic-agent-standalone + app.kubernetes.io/name: elastic-agent-standalone rules: - apiGroups: - coordination.k8s.io @@ -89,7 +89,7 @@ metadata: name: elastic-agent-standalone-kubeadm-config namespace: kube-system labels: - k8s-app: elastic-agent-standalone + app.kubernetes.io/name: elastic-agent-standalone rules: - apiGroups: [""] resources: diff --git a/deploy/kubernetes/elastic-agent-kustomize/ksm-autosharding/elastic-agent-standalone/base/elastic-agent-standalone-service-account.yaml b/deploy/kubernetes/elastic-agent-kustomize/ksm-autosharding/elastic-agent-standalone/base/elastic-agent-standalone-service-account.yaml index d6e983fc1d3..9cb5472030e 100644 --- a/deploy/kubernetes/elastic-agent-kustomize/ksm-autosharding/elastic-agent-standalone/base/elastic-agent-standalone-service-account.yaml +++ b/deploy/kubernetes/elastic-agent-kustomize/ksm-autosharding/elastic-agent-standalone/base/elastic-agent-standalone-service-account.yaml @@ -4,4 +4,4 @@ metadata: name: elastic-agent-standalone namespace: kube-system labels: - k8s-app: elastic-agent-standalone + app.kubernetes.io/name: elastic-agent-standalone diff --git a/deploy/kubernetes/elastic-agent-kustomize/ksm-autosharding/elastic-agent-standalone/extra/elastic-agent-standalone-statefulset.yaml b/deploy/kubernetes/elastic-agent-kustomize/ksm-autosharding/elastic-agent-standalone/extra/elastic-agent-standalone-statefulset.yaml index fe3541108c1..5fbdb9709ab 100644 --- a/deploy/kubernetes/elastic-agent-kustomize/ksm-autosharding/elastic-agent-standalone/extra/elastic-agent-standalone-statefulset.yaml +++ b/deploy/kubernetes/elastic-agent-kustomize/ksm-autosharding/elastic-agent-standalone/extra/elastic-agent-standalone-statefulset.yaml @@ -5,15 +5,15 @@ metadata: name: elastic-agent-standalone namespace: kube-system labels: - app: elastic-agent-standalone + app.kubernetes.io/name: elastic-agent-standalone spec: selector: matchLabels: - app: elastic-agent-standalone + app.kubernetes.io/name: elastic-agent-standalone template: metadata: labels: - app: elastic-agent-standalone + app.kubernetes.io/name: elastic-agent-standalone spec: # Tolerations are needed to run Elastic Agent on Kubernetes control-plane nodes. # Agents running on control-plane nodes collect metrics from the control plane components (scheduler, controller manager) of Kubernetes diff --git a/deploy/kubernetes/elastic-agent-managed-kubernetes.yaml b/deploy/kubernetes/elastic-agent-managed-kubernetes.yaml index d89d5429358..ec38e2b3d02 100644 --- a/deploy/kubernetes/elastic-agent-managed-kubernetes.yaml +++ b/deploy/kubernetes/elastic-agent-managed-kubernetes.yaml @@ -5,15 +5,15 @@ metadata: name: elastic-agent namespace: kube-system labels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent spec: selector: matchLabels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent template: metadata: labels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent spec: # Tolerations are needed to run Elastic Agent on Kubernetes control-plane nodes. # Agents running on control-plane nodes collect metrics from the control plane components (scheduler, controller manager) of Kubernetes @@ -192,7 +192,7 @@ kind: ClusterRole metadata: name: elastic-agent labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: [""] resources: @@ -264,7 +264,7 @@ metadata: # Should be the namespace where elastic-agent is running namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: - coordination.k8s.io @@ -278,7 +278,7 @@ metadata: name: elastic-agent-kubeadm-config namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: [""] resources: @@ -293,5 +293,5 @@ metadata: name: elastic-agent namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent --- 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 75315a47e28..7a3d839a2d2 100644 --- a/deploy/kubernetes/elastic-agent-managed/elastic-agent-managed-daemonset.yaml +++ b/deploy/kubernetes/elastic-agent-managed/elastic-agent-managed-daemonset.yaml @@ -5,15 +5,15 @@ metadata: name: elastic-agent namespace: kube-system labels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent spec: selector: matchLabels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent template: metadata: labels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent spec: # Tolerations are needed to run Elastic Agent on Kubernetes control-plane nodes. # Agents running on control-plane nodes collect metrics from the control plane components (scheduler, controller manager) of Kubernetes diff --git a/deploy/kubernetes/elastic-agent-managed/elastic-agent-managed-role.yaml b/deploy/kubernetes/elastic-agent-managed/elastic-agent-managed-role.yaml index 778a4ba5520..3ccc365ba3b 100644 --- a/deploy/kubernetes/elastic-agent-managed/elastic-agent-managed-role.yaml +++ b/deploy/kubernetes/elastic-agent-managed/elastic-agent-managed-role.yaml @@ -3,7 +3,7 @@ kind: ClusterRole metadata: name: elastic-agent labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: [""] resources: @@ -75,7 +75,7 @@ metadata: # Should be the namespace where elastic-agent is running namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: - coordination.k8s.io @@ -89,7 +89,7 @@ metadata: name: elastic-agent-kubeadm-config namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: [""] resources: diff --git a/deploy/kubernetes/elastic-agent-managed/elastic-agent-managed-service-account.yaml b/deploy/kubernetes/elastic-agent-managed/elastic-agent-managed-service-account.yaml index 43372b547d0..c2279852ffa 100644 --- a/deploy/kubernetes/elastic-agent-managed/elastic-agent-managed-service-account.yaml +++ b/deploy/kubernetes/elastic-agent-managed/elastic-agent-managed-service-account.yaml @@ -4,4 +4,4 @@ metadata: name: elastic-agent namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent diff --git a/deploy/kubernetes/elastic-agent-standalone-kubernetes.yaml b/deploy/kubernetes/elastic-agent-standalone-kubernetes.yaml index 939d8c73efb..a4968599751 100644 --- a/deploy/kubernetes/elastic-agent-standalone-kubernetes.yaml +++ b/deploy/kubernetes/elastic-agent-standalone-kubernetes.yaml @@ -5,7 +5,7 @@ metadata: name: agent-node-datastreams namespace: kube-system labels: - k8s-app: elastic-agent-standalone + app.kubernetes.io/name: elastic-agent-standalone data: agent.yml: |- outputs: @@ -674,15 +674,15 @@ metadata: name: elastic-agent-standalone namespace: kube-system labels: - app: elastic-agent-standalone + app.kubernetes.io/name: elastic-agent-standalone spec: selector: matchLabels: - app: elastic-agent-standalone + app.kubernetes.io/name: elastic-agent-standalone template: metadata: labels: - app: elastic-agent-standalone + app.kubernetes.io/name: elastic-agent-standalone spec: # Tolerations are needed to run Elastic Agent on Kubernetes control-plane nodes. # Agents running on control-plane nodes collect metrics from the control plane components (scheduler, controller manager) of Kubernetes @@ -867,7 +867,7 @@ kind: ClusterRole metadata: name: elastic-agent-standalone labels: - k8s-app: elastic-agent-standalone + app.kubernetes.io/name: elastic-agent-standalone rules: - apiGroups: [""] resources: @@ -939,7 +939,7 @@ metadata: # Should be the namespace where elastic-agent is running namespace: kube-system labels: - k8s-app: elastic-agent-standalone + app.kubernetes.io/name: elastic-agent-standalone rules: - apiGroups: - coordination.k8s.io @@ -953,7 +953,7 @@ metadata: name: elastic-agent-standalone-kubeadm-config namespace: kube-system labels: - k8s-app: elastic-agent-standalone + app.kubernetes.io/name: elastic-agent-standalone rules: - apiGroups: [""] resources: @@ -968,5 +968,5 @@ metadata: name: elastic-agent-standalone namespace: kube-system labels: - k8s-app: elastic-agent-standalone + app.kubernetes.io/name: elastic-agent-standalone --- diff --git a/deploy/kubernetes/elastic-agent-standalone/elastic-agent-standalone-daemonset-configmap.yaml b/deploy/kubernetes/elastic-agent-standalone/elastic-agent-standalone-daemonset-configmap.yaml index 88f6f43dad1..4d837d4775b 100644 --- a/deploy/kubernetes/elastic-agent-standalone/elastic-agent-standalone-daemonset-configmap.yaml +++ b/deploy/kubernetes/elastic-agent-standalone/elastic-agent-standalone-daemonset-configmap.yaml @@ -5,7 +5,7 @@ metadata: name: agent-node-datastreams namespace: kube-system labels: - k8s-app: elastic-agent-standalone + app.kubernetes.io/name: elastic-agent-standalone data: agent.yml: |- outputs: diff --git a/deploy/kubernetes/elastic-agent-standalone/elastic-agent-standalone-daemonset.yaml b/deploy/kubernetes/elastic-agent-standalone/elastic-agent-standalone-daemonset.yaml index fa1944f53a2..2848b297399 100644 --- a/deploy/kubernetes/elastic-agent-standalone/elastic-agent-standalone-daemonset.yaml +++ b/deploy/kubernetes/elastic-agent-standalone/elastic-agent-standalone-daemonset.yaml @@ -5,15 +5,15 @@ metadata: name: elastic-agent-standalone namespace: kube-system labels: - app: elastic-agent-standalone + app.kubernetes.io/name: elastic-agent-standalone spec: selector: matchLabels: - app: elastic-agent-standalone + app.kubernetes.io/name: elastic-agent-standalone template: metadata: labels: - app: elastic-agent-standalone + app.kubernetes.io/name: elastic-agent-standalone spec: # Tolerations are needed to run Elastic Agent on Kubernetes control-plane nodes. # Agents running on control-plane nodes collect metrics from the control plane components (scheduler, controller manager) of Kubernetes diff --git a/deploy/kubernetes/elastic-agent-standalone/elastic-agent-standalone-ksm-daemonset-configmap.yaml b/deploy/kubernetes/elastic-agent-standalone/elastic-agent-standalone-ksm-daemonset-configmap.yaml index dbffe084da1..9bfae8731c4 100644 --- a/deploy/kubernetes/elastic-agent-standalone/elastic-agent-standalone-ksm-daemonset-configmap.yaml +++ b/deploy/kubernetes/elastic-agent-standalone/elastic-agent-standalone-ksm-daemonset-configmap.yaml @@ -6,7 +6,7 @@ metadata: name: agent-node-datastreams namespace: kube-system labels: - k8s-app: elastic-agent-standalone + app.kubernetes.io/name: elastic-agent-standalone data: agent.yml: |- outputs: diff --git a/deploy/kubernetes/elastic-agent-standalone/elastic-agent-standalone-ksm-statefulset-configmap.yaml b/deploy/kubernetes/elastic-agent-standalone/elastic-agent-standalone-ksm-statefulset-configmap.yaml index cf913c8ea7c..1b73c1de27b 100644 --- a/deploy/kubernetes/elastic-agent-standalone/elastic-agent-standalone-ksm-statefulset-configmap.yaml +++ b/deploy/kubernetes/elastic-agent-standalone/elastic-agent-standalone-ksm-statefulset-configmap.yaml @@ -6,7 +6,7 @@ metadata: name: agent-ksm-datastreams namespace: kube-system labels: - k8s-app: elastic-agent-standalone + app.kubernetes.io/name: elastic-agent-standalone data: agent.yml: |- outputs: diff --git a/deploy/kubernetes/elastic-agent-standalone/elastic-agent-standalone-role.yaml b/deploy/kubernetes/elastic-agent-standalone/elastic-agent-standalone-role.yaml index a0cd80b456a..26648378c21 100644 --- a/deploy/kubernetes/elastic-agent-standalone/elastic-agent-standalone-role.yaml +++ b/deploy/kubernetes/elastic-agent-standalone/elastic-agent-standalone-role.yaml @@ -3,7 +3,7 @@ kind: ClusterRole metadata: name: elastic-agent-standalone labels: - k8s-app: elastic-agent-standalone + app.kubernetes.io/name: elastic-agent-standalone rules: - apiGroups: [""] resources: @@ -75,7 +75,7 @@ metadata: # Should be the namespace where elastic-agent is running namespace: kube-system labels: - k8s-app: elastic-agent-standalone + app.kubernetes.io/name: elastic-agent-standalone rules: - apiGroups: - coordination.k8s.io @@ -89,7 +89,7 @@ metadata: name: elastic-agent-standalone-kubeadm-config namespace: kube-system labels: - k8s-app: elastic-agent-standalone + app.kubernetes.io/name: elastic-agent-standalone rules: - apiGroups: [""] resources: diff --git a/deploy/kubernetes/elastic-agent-standalone/elastic-agent-standalone-service-account.yaml b/deploy/kubernetes/elastic-agent-standalone/elastic-agent-standalone-service-account.yaml index d6e983fc1d3..9cb5472030e 100644 --- a/deploy/kubernetes/elastic-agent-standalone/elastic-agent-standalone-service-account.yaml +++ b/deploy/kubernetes/elastic-agent-standalone/elastic-agent-standalone-service-account.yaml @@ -4,4 +4,4 @@ metadata: name: elastic-agent-standalone namespace: kube-system labels: - k8s-app: elastic-agent-standalone + app.kubernetes.io/name: elastic-agent-standalone diff --git a/dev-tools/kubernetes/base/elastic-agent-managed/kustomization.yml b/dev-tools/kubernetes/base/elastic-agent-managed/kustomization.yml index 3c6ca52879b..c6706091e38 100644 --- a/dev-tools/kubernetes/base/elastic-agent-managed/kustomization.yml +++ b/dev-tools/kubernetes/base/elastic-agent-managed/kustomization.yml @@ -1,6 +1,6 @@ namespace: kube-system commonLabels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent namePrefix: elastic-agent-managed- images: diff --git a/dev-tools/kubernetes/base/elastic-agent-standalone/kustomization.yml b/dev-tools/kubernetes/base/elastic-agent-standalone/kustomization.yml index bf9e20d027f..c8fc9734f17 100644 --- a/dev-tools/kubernetes/base/elastic-agent-standalone/kustomization.yml +++ b/dev-tools/kubernetes/base/elastic-agent-standalone/kustomization.yml @@ -1,6 +1,6 @@ namespace: kube-system commonLabels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent namePrefix: elastic-agent-standalone- images: diff --git a/docs/manifests/elastic-agent-managed-gke-autopilot.yaml b/docs/manifests/elastic-agent-managed-gke-autopilot.yaml index 7ab4ef2074c..0365a184062 100644 --- a/docs/manifests/elastic-agent-managed-gke-autopilot.yaml +++ b/docs/manifests/elastic-agent-managed-gke-autopilot.yaml @@ -22,15 +22,15 @@ metadata: name: elastic-agent namespace: elastic-agent labels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent spec: selector: matchLabels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent template: metadata: labels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent spec: # Tolerations are needed to run Elastic Agent on Kubernetes control-plane nodes. # Agents running on control-plane nodes collect metrics from the control plane components (scheduler, controller manager) of Kubernetes @@ -130,7 +130,7 @@ kind: ClusterRole metadata: name: elastic-agent labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: [""] resources: @@ -198,7 +198,7 @@ metadata: # Should be the namespace where elastic-agent is running namespace: elastic-agent labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: - coordination.k8s.io @@ -212,7 +212,7 @@ metadata: name: elastic-agent-kubeadm-config namespace: elastic-agent labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: [""] resources: @@ -227,5 +227,5 @@ metadata: name: elastic-agent namespace: elastic-agent labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent --- diff --git a/docs/manifests/elastic-agent-standalone-gke-autopilot.yaml b/docs/manifests/elastic-agent-standalone-gke-autopilot.yaml index e48e4b59cad..90710806d99 100644 --- a/docs/manifests/elastic-agent-standalone-gke-autopilot.yaml +++ b/docs/manifests/elastic-agent-standalone-gke-autopilot.yaml @@ -22,7 +22,7 @@ metadata: name: agent-node-datastreams namespace: elastic-agent labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent data: agent.yml: |- outputs: @@ -333,15 +333,15 @@ metadata: name: elastic-agent namespace: elastic-agent labels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent spec: selector: matchLabels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent template: metadata: labels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent spec: # Tolerations are needed to run Elastic Agent on Kubernetes control-plane nodes. # Agents running on control-plane nodes collect metrics from the control plane components (scheduler, controller manager) of Kubernetes @@ -450,7 +450,7 @@ kind: ClusterRole metadata: name: elastic-agent labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: [""] resources: @@ -522,7 +522,7 @@ metadata: # Should be the namespace where elastic-agent is running namespace: elastic-agent labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: - coordination.k8s.io @@ -536,7 +536,7 @@ metadata: name: elastic-agent-kubeadm-config namespace: elastic-agent labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: [""] resources: @@ -551,4 +551,4 @@ metadata: name: elastic-agent namespace: elastic-agent labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent diff --git a/docs/manifests/hostnetwork/elastic-agent-managed-daemonset-ksm-0.yaml b/docs/manifests/hostnetwork/elastic-agent-managed-daemonset-ksm-0.yaml index cb03e788de6..e377035cf2f 100644 --- a/docs/manifests/hostnetwork/elastic-agent-managed-daemonset-ksm-0.yaml +++ b/docs/manifests/hostnetwork/elastic-agent-managed-daemonset-ksm-0.yaml @@ -6,26 +6,26 @@ metadata: name: elastic-agent namespace: kube-system labels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent spec: selector: matchLabels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent template: metadata: labels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent spec: - # Affinity (aka PodAntiAffinity here) is used to determine if a specific pod is already installed in a node. + # Affinity (aka PodAntiAffinity here) is used to determine if a specific pod is already installed in a node. #This way we can prevent an elastic daemonset to be installed in the same node where elastic-agent deployment exists # affinity: - # podAntiAffinity: + # podAntiAffinity: # requiredDuringSchedulingIgnoredDuringExecution: # - labelSelector: - # matchExpressions: + # matchExpressions: # - key: app # operator: In - # values: + # values: # - "elastic-agent" # topologyKey: "kubernetes.io/hostname" # Tolerations are needed to run Elastic Agent on Kubernetes control-plane nodes. @@ -181,7 +181,7 @@ kind: ClusterRole metadata: name: elastic-agent labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: [""] resources: @@ -253,7 +253,7 @@ metadata: # Should be the namespace where elastic-agent is running namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: - coordination.k8s.io @@ -267,7 +267,7 @@ metadata: name: elastic-agent-kubeadm-config namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: [""] resources: @@ -282,5 +282,5 @@ metadata: name: elastic-agent namespace: kube-system labels: - k8s-app: elastic-agent ---- \ No newline at end of file + app.kubernetes.io/name: elastic-agent +--- diff --git a/docs/manifests/hostnetwork/elastic-agent-managed-deployment-ksm-1.yaml b/docs/manifests/hostnetwork/elastic-agent-managed-deployment-ksm-1.yaml index 345edc487ff..9f3a4c2e6ae 100644 --- a/docs/manifests/hostnetwork/elastic-agent-managed-deployment-ksm-1.yaml +++ b/docs/manifests/hostnetwork/elastic-agent-managed-deployment-ksm-1.yaml @@ -6,27 +6,27 @@ metadata: name: elastic-agent namespace: kube-system labels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent spec: selector: matchLabels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent template: metadata: labels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent spec: #nodeName: gke-kubernetes-scale-kubernetes-scale-0f73d58f-4rt9 - # Affinity (aka podAntiAffinity here) is used to determine if a specific pod is already installed in a node. + # Affinity (aka podAntiAffinity here) is used to determine if a specific pod is already installed in a node. #This way we can prevent an elastic daemonset to be installed in the same node where elastic-agent deployment exists # affinity: - # podAntiAffinity: + # podAntiAffinity: # requiredDuringSchedulingIgnoredDuringExecution: # - labelSelector: - # matchExpressions: + # matchExpressions: # - key: app # operator: In - # values: + # values: # - "elastic-agent" # topologyKey: "kubernetes.io/hostname" # Tolerations are needed to run Elastic Agent on Kubernetes control-plane nodes. @@ -182,7 +182,7 @@ kind: ClusterRole metadata: name: elastic-agent labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: [""] resources: @@ -254,7 +254,7 @@ metadata: # Should be the namespace where elastic-agent is running namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: - coordination.k8s.io @@ -268,7 +268,7 @@ metadata: name: elastic-agent-kubeadm-config namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: [""] resources: @@ -283,6 +283,6 @@ metadata: name: elastic-agent namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent --- diff --git a/docs/manifests/hostnetwork/elastic-agent-standalone-daemonset-ksm-0.yaml b/docs/manifests/hostnetwork/elastic-agent-standalone-daemonset-ksm-0.yaml index 18abebceabc..541d1024627 100644 --- a/docs/manifests/hostnetwork/elastic-agent-standalone-daemonset-ksm-0.yaml +++ b/docs/manifests/hostnetwork/elastic-agent-standalone-daemonset-ksm-0.yaml @@ -4,7 +4,7 @@ metadata: name: agent-node-datastreams namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent data: agent.yml: |- outputs: @@ -550,26 +550,26 @@ metadata: name: elastic-agent namespace: kube-system labels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent spec: selector: matchLabels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent template: metadata: labels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent spec: - # Affinity (aka podAntiAffinity here) is used to determine if a specific pod is already installed in a node. + # Affinity (aka podAntiAffinity here) is used to determine if a specific pod is already installed in a node. #This way we can prevent an elastic daemonset to be installed in the same node where elastic-agent deployment exists # affinity: - # podAntiAffinity: + # podAntiAffinity: # requiredDuringSchedulingIgnoredDuringExecution: # - labelSelector: - # matchExpressions: + # matchExpressions: # - key: app # operator: In - # values: + # values: # - "elastic-agent" # topologyKey: "kubernetes.io/hostname" # Tolerations are needed to run Elastic Agent on Kubernetes control-plane nodes. @@ -735,7 +735,7 @@ kind: ClusterRole metadata: name: elastic-agent labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: [""] resources: @@ -807,7 +807,7 @@ metadata: # Should be the namespace where elastic-agent is running namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: - coordination.k8s.io @@ -821,7 +821,7 @@ metadata: name: elastic-agent-kubeadm-config namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: [""] resources: @@ -836,5 +836,5 @@ metadata: name: elastic-agent namespace: kube-system labels: - k8s-app: elastic-agent ---- \ No newline at end of file + app.kubernetes.io/name: elastic-agent +--- diff --git a/docs/manifests/hostnetwork/elastic-agent-standalone-deployment-ksm-1.yaml b/docs/manifests/hostnetwork/elastic-agent-standalone-deployment-ksm-1.yaml index 6b905d8f824..cd4437e7a79 100644 --- a/docs/manifests/hostnetwork/elastic-agent-standalone-deployment-ksm-1.yaml +++ b/docs/manifests/hostnetwork/elastic-agent-standalone-deployment-ksm-1.yaml @@ -4,7 +4,7 @@ metadata: name: agent-node-datastreams namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent data: agent.yml: |- outputs: @@ -478,27 +478,27 @@ metadata: name: elastic-agent namespace: kube-system labels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent spec: selector: matchLabels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent template: metadata: labels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent spec: #nodeName: gke-kubernetes-scale-kubernetes-scale-0f73d58f-4rt9 - # Affinity (aka podAntiAffinity here) is used to determine if a specific pod is already installed in a node. + # Affinity (aka podAntiAffinity here) is used to determine if a specific pod is already installed in a node. #This way we can prevent an elastic daemonset to be installed in the same node where elastic-agent deployment exists # affinity: - # podAntiAffinity: + # podAntiAffinity: # requiredDuringSchedulingIgnoredDuringExecution: # - labelSelector: - # matchExpressions: + # matchExpressions: # - key: app # operator: In - # values: + # values: # - "elastic-agent" # topologyKey: "kubernetes.io/hostname" # Tolerations are needed to run Elastic Agent on Kubernetes control-plane nodes. @@ -660,7 +660,7 @@ kind: ClusterRole metadata: name: elastic-agent labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: [""] resources: @@ -732,7 +732,7 @@ metadata: # Should be the namespace where elastic-agent is running namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: - coordination.k8s.io @@ -746,7 +746,7 @@ metadata: name: elastic-agent-kubeadm-config namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: [""] resources: @@ -761,5 +761,5 @@ metadata: name: elastic-agent namespace: kube-system labels: - k8s-app: elastic-agent ---- \ No newline at end of file + app.kubernetes.io/name: elastic-agent +--- diff --git a/docs/manifests/kustomize-autosharding/elastic-agent-kustomize/agent-cluster-role.yaml b/docs/manifests/kustomize-autosharding/elastic-agent-kustomize/agent-cluster-role.yaml index d738ad51817..844df3329bb 100644 --- a/docs/manifests/kustomize-autosharding/elastic-agent-kustomize/agent-cluster-role.yaml +++ b/docs/manifests/kustomize-autosharding/elastic-agent-kustomize/agent-cluster-role.yaml @@ -3,7 +3,7 @@ kind: ClusterRole metadata: name: elastic-agent labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: [""] resources: diff --git a/docs/manifests/kustomize-autosharding/elastic-agent-kustomize/agent-role.yaml b/docs/manifests/kustomize-autosharding/elastic-agent-kustomize/agent-role.yaml index b8a739f60ad..2d004f86b2d 100644 --- a/docs/manifests/kustomize-autosharding/elastic-agent-kustomize/agent-role.yaml +++ b/docs/manifests/kustomize-autosharding/elastic-agent-kustomize/agent-role.yaml @@ -5,10 +5,10 @@ metadata: # Should be the namespace where elastic-agent is running namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: - coordination.k8s.io resources: - leases - verbs: ["get", "create", "update"] \ No newline at end of file + verbs: ["get", "create", "update"] diff --git a/docs/manifests/kustomize-autosharding/elastic-agent-kustomize/agent-service-account.yaml b/docs/manifests/kustomize-autosharding/elastic-agent-kustomize/agent-service-account.yaml index 43372b547d0..c2279852ffa 100644 --- a/docs/manifests/kustomize-autosharding/elastic-agent-kustomize/agent-service-account.yaml +++ b/docs/manifests/kustomize-autosharding/elastic-agent-kustomize/agent-service-account.yaml @@ -4,4 +4,4 @@ metadata: name: elastic-agent namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent diff --git a/docs/manifests/kustomize-autosharding/elastic-agent-kustomize/agent-statefulset.yaml b/docs/manifests/kustomize-autosharding/elastic-agent-kustomize/agent-statefulset.yaml index a2f548950d0..d2404b905de 100644 --- a/docs/manifests/kustomize-autosharding/elastic-agent-kustomize/agent-statefulset.yaml +++ b/docs/manifests/kustomize-autosharding/elastic-agent-kustomize/agent-statefulset.yaml @@ -4,16 +4,16 @@ metadata: name: elastic-agent1 namespace: kube-system labels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent spec: serviceName: "elastic-agent1" selector: matchLabels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent template: metadata: labels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent spec: # Tolerations are needed to run Elastic Agent on Kubernetes control-plane nodes. # Agents running on control-plane nodes collect metrics from the control plane components (scheduler, controller manager) of Kubernetes diff --git a/docs/manifests/kustomize-autosharding/elastic-agent-managed-kubernetes.yaml b/docs/manifests/kustomize-autosharding/elastic-agent-managed-kubernetes.yaml index ea566b84585..ba81b37542e 100644 --- a/docs/manifests/kustomize-autosharding/elastic-agent-managed-kubernetes.yaml +++ b/docs/manifests/kustomize-autosharding/elastic-agent-managed-kubernetes.yaml @@ -6,15 +6,15 @@ metadata: name: elastic-agent namespace: kube-system labels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent spec: selector: matchLabels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent template: metadata: labels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent spec: # Tolerations are needed to run Elastic Agent on Kubernetes control-plane nodes. # Agents running on control-plane nodes collect metrics from the control plane components (scheduler, controller manager) of Kubernetes @@ -168,7 +168,7 @@ kind: ClusterRole metadata: name: elastic-agent labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: [""] resources: @@ -240,7 +240,7 @@ metadata: # Should be the namespace where elastic-agent is running namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: - coordination.k8s.io @@ -254,7 +254,7 @@ metadata: name: elastic-agent-kubeadm-config namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: [""] resources: @@ -269,5 +269,5 @@ metadata: name: elastic-agent namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent --- diff --git a/docs/manifests/kustomize-autosharding/elastic-agent-standalone-kubernetes-side-leader.yaml b/docs/manifests/kustomize-autosharding/elastic-agent-standalone-kubernetes-side-leader.yaml index 97ccd945594..67b279a0b80 100644 --- a/docs/manifests/kustomize-autosharding/elastic-agent-standalone-kubernetes-side-leader.yaml +++ b/docs/manifests/kustomize-autosharding/elastic-agent-standalone-kubernetes-side-leader.yaml @@ -4,7 +4,7 @@ metadata: name: agent-node-datastreams namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent data: agent.yml: |- outputs: @@ -540,15 +540,15 @@ metadata: name: elastic-agent namespace: kube-system labels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent spec: selector: matchLabels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent template: metadata: labels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent spec: # Tolerations are needed to run Elastic Agent on Kubernetes control-plane nodes. # Agents running on control-plane nodes collect metrics from the control plane components (scheduler, controller manager) of Kubernetes @@ -708,7 +708,7 @@ kind: ClusterRole metadata: name: elastic-agent labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: [""] resources: @@ -780,7 +780,7 @@ metadata: # Should be the namespace where elastic-agent is running namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: - coordination.k8s.io @@ -794,7 +794,7 @@ metadata: name: elastic-agent-kubeadm-config namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: [""] resources: @@ -809,5 +809,5 @@ metadata: name: elastic-agent namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent --- diff --git a/docs/manifests/kustomize-autosharding/elastic-agent-standalone-statefulset-side-ksm.yaml b/docs/manifests/kustomize-autosharding/elastic-agent-standalone-statefulset-side-ksm.yaml index 344e5c1d6b5..0ff54482cb2 100644 --- a/docs/manifests/kustomize-autosharding/elastic-agent-standalone-statefulset-side-ksm.yaml +++ b/docs/manifests/kustomize-autosharding/elastic-agent-standalone-statefulset-side-ksm.yaml @@ -4,7 +4,7 @@ metadata: name: agent-node-datastreams namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent data: agent.yml: |- outputs: @@ -347,15 +347,15 @@ metadata: name: elastic-agent namespace: kube-system labels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent spec: selector: matchLabels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent template: metadata: labels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent spec: # Tolerations are needed to run Elastic Agent on Kubernetes control-plane nodes. # Agents running on control-plane nodes collect metrics from the control plane components (scheduler, controller manager) of Kubernetes @@ -515,7 +515,7 @@ kind: ClusterRole metadata: name: elastic-agent labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: [""] resources: @@ -587,7 +587,7 @@ metadata: # Should be the namespace where elastic-agent is running namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: - coordination.k8s.io @@ -601,7 +601,7 @@ metadata: name: elastic-agent-kubeadm-config namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: [""] resources: @@ -616,5 +616,5 @@ metadata: name: elastic-agent namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent --- diff --git a/docs/manifests/tolerations/elastic-agent-managed-daemonset-ksm-0.yaml b/docs/manifests/tolerations/elastic-agent-managed-daemonset-ksm-0.yaml index aabdd16e3a3..ab7c35812c8 100644 --- a/docs/manifests/tolerations/elastic-agent-managed-daemonset-ksm-0.yaml +++ b/docs/manifests/tolerations/elastic-agent-managed-daemonset-ksm-0.yaml @@ -6,26 +6,26 @@ metadata: name: elastic-agent namespace: kube-system labels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent spec: selector: matchLabels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent template: metadata: labels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent spec: - # Affinity (aka PodAntiAffinity here) is used to determine if a specific pod is already installed in a node. + # Affinity (aka PodAntiAffinity here) is used to determine if a specific pod is already installed in a node. #This way we can prevent an elastic daemonset to be installed in the same node where elastic-agent deployment exists # affinity: - # podAntiAffinity: + # podAntiAffinity: # requiredDuringSchedulingIgnoredDuringExecution: # - labelSelector: - # matchExpressions: + # matchExpressions: # - key: app # operator: In - # values: + # values: # - "elastic-agent" # topologyKey: "kubernetes.io/hostname" # Tolerations are needed to run Elastic Agent on Kubernetes control-plane nodes. @@ -181,7 +181,7 @@ kind: ClusterRole metadata: name: elastic-agent labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: [""] resources: @@ -253,7 +253,7 @@ metadata: # Should be the namespace where elastic-agent is running namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: - coordination.k8s.io @@ -267,7 +267,7 @@ metadata: name: elastic-agent-kubeadm-config namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: [""] resources: @@ -282,5 +282,5 @@ metadata: name: elastic-agent namespace: kube-system labels: - k8s-app: elastic-agent ---- \ No newline at end of file + app.kubernetes.io/name: elastic-agent +--- diff --git a/docs/manifests/tolerations/elastic-agent-managed-deployment-ksm-1.yaml b/docs/manifests/tolerations/elastic-agent-managed-deployment-ksm-1.yaml index db8818c343c..230d385230b 100644 --- a/docs/manifests/tolerations/elastic-agent-managed-deployment-ksm-1.yaml +++ b/docs/manifests/tolerations/elastic-agent-managed-deployment-ksm-1.yaml @@ -6,27 +6,27 @@ metadata: name: elastic-agent namespace: kube-system labels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent spec: selector: matchLabels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent template: metadata: labels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent spec: nodeName: gke-kubernetes-scale-kubernetes-scale-0f73d58f-8cz4 - # Affinity (aka podAntiAffinity here) is used to determine if a specific pod is already installed in a node. + # Affinity (aka podAntiAffinity here) is used to determine if a specific pod is already installed in a node. #This way we can prevent an elastic daemonset to be installed in the same node where elastic-agent deployment exists # affinity: - # podAntiAffinity: + # podAntiAffinity: # requiredDuringSchedulingIgnoredDuringExecution: # - labelSelector: - # matchExpressions: + # matchExpressions: # - key: app # operator: In - # values: + # values: # - "elastic-agent" # topologyKey: "kubernetes.io/hostname" # Tolerations are needed to run Elastic Agent on Kubernetes control-plane nodes. @@ -186,7 +186,7 @@ kind: ClusterRole metadata: name: elastic-agent labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: [""] resources: @@ -258,7 +258,7 @@ metadata: # Should be the namespace where elastic-agent is running namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: - coordination.k8s.io @@ -272,7 +272,7 @@ metadata: name: elastic-agent-kubeadm-config namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: [""] resources: @@ -287,6 +287,6 @@ metadata: name: elastic-agent namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent --- diff --git a/docs/manifests/tolerations/elastic-agent-standalone-daemonset-ksm-0.yaml b/docs/manifests/tolerations/elastic-agent-standalone-daemonset-ksm-0.yaml index 8f2a45c49f7..7cee26dcd65 100644 --- a/docs/manifests/tolerations/elastic-agent-standalone-daemonset-ksm-0.yaml +++ b/docs/manifests/tolerations/elastic-agent-standalone-daemonset-ksm-0.yaml @@ -4,7 +4,7 @@ metadata: name: agent-node-datastreams namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent data: agent.yml: |- outputs: @@ -550,26 +550,26 @@ metadata: name: elastic-agent namespace: kube-system labels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent spec: selector: matchLabels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent template: metadata: labels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent spec: - # Affinity (aka podAntiAffinity here) is used to determine if a specific pod is already installed in a node. + # Affinity (aka podAntiAffinity here) is used to determine if a specific pod is already installed in a node. #This way we can prevent an elastic daemonset to be installed in the same node where elastic-agent deployment exists # affinity: - # podAntiAffinity: + # podAntiAffinity: # requiredDuringSchedulingIgnoredDuringExecution: # - labelSelector: - # matchExpressions: + # matchExpressions: # - key: app # operator: In - # values: + # values: # - "elastic-agent" # topologyKey: "kubernetes.io/hostname" # Tolerations are needed to run Elastic Agent on Kubernetes control-plane nodes. @@ -731,7 +731,7 @@ kind: ClusterRole metadata: name: elastic-agent labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: [""] resources: @@ -803,7 +803,7 @@ metadata: # Should be the namespace where elastic-agent is running namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: - coordination.k8s.io @@ -817,7 +817,7 @@ metadata: name: elastic-agent-kubeadm-config namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: [""] resources: @@ -832,5 +832,5 @@ metadata: name: elastic-agent namespace: kube-system labels: - k8s-app: elastic-agent ---- \ No newline at end of file + app.kubernetes.io/name: elastic-agent +--- diff --git a/docs/manifests/tolerations/elastic-agent-standalone-deployment-ksm-1.yaml b/docs/manifests/tolerations/elastic-agent-standalone-deployment-ksm-1.yaml index e365af0f646..dbb4c70972e 100644 --- a/docs/manifests/tolerations/elastic-agent-standalone-deployment-ksm-1.yaml +++ b/docs/manifests/tolerations/elastic-agent-standalone-deployment-ksm-1.yaml @@ -4,7 +4,7 @@ metadata: name: agent-node-datastreams namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent data: agent.yml: |- outputs: @@ -478,27 +478,27 @@ metadata: name: elastic-agent namespace: kube-system labels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent spec: selector: matchLabels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent template: metadata: labels: - app: elastic-agent + app.kubernetes.io/name: elastic-agent spec: nodeName: gke-kubernetes-scale-kubernetes-scale-0f73d58f-8cz4 - # Affinity (aka podAntiAffinity here) is used to determine if a specific pod is already installed in a node. + # Affinity (aka podAntiAffinity here) is used to determine if a specific pod is already installed in a node. #This way we can prevent an elastic daemonset to be installed in the same node where elastic-agent deployment exists # affinity: - # podAntiAffinity: + # podAntiAffinity: # requiredDuringSchedulingIgnoredDuringExecution: # - labelSelector: - # matchExpressions: + # matchExpressions: # - key: app # operator: In - # values: + # values: # - "elastic-agent" # topologyKey: "kubernetes.io/hostname" # Tolerations are needed to run Elastic Agent on Kubernetes control-plane nodes. @@ -664,7 +664,7 @@ kind: ClusterRole metadata: name: elastic-agent labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: [""] resources: @@ -736,7 +736,7 @@ metadata: # Should be the namespace where elastic-agent is running namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: - coordination.k8s.io @@ -750,7 +750,7 @@ metadata: name: elastic-agent-kubeadm-config namespace: kube-system labels: - k8s-app: elastic-agent + app.kubernetes.io/name: elastic-agent rules: - apiGroups: [""] resources: @@ -765,5 +765,5 @@ metadata: name: elastic-agent namespace: kube-system labels: - k8s-app: elastic-agent ---- \ No newline at end of file + app.kubernetes.io/name: elastic-agent +---