Skip to content

Commit

Permalink
Update labels to use kubernetes recommended labels
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
therealdwright committed May 9, 2024
1 parent dad0cf5 commit 711f3f1
Show file tree
Hide file tree
Showing 49 changed files with 220 additions and 220 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: ClusterRole
metadata:
name: elastic-agent
labels:
k8s-app: elastic-agent
app.kubernetes.io/name: elastic-agent
rules:
- apiGroups: [""]
resources:
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ metadata:
name: elastic-agent
namespace: kube-system
labels:
k8s-app: elastic-agent
app.kubernetes.io/name: elastic-agent
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: ClusterRole
metadata:
name: elastic-agent
labels:
k8s-app: elastic-agent
app.kubernetes.io/name: elastic-agent
rules:
- apiGroups: [""]
resources:
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ metadata:
name: elastic-agent
namespace: kube-system
labels:
k8s-app: elastic-agent
app.kubernetes.io/name: elastic-agent
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -63,7 +63,7 @@ spec:
fieldPath: metadata.name
- name: STATE_PATH
value: "/etc/elastic-agent"
# The following ELASTIC_NETINFO:false variable will disable the netinfo.enabled option of add-host-metadata processor. This will remove fields host.ip and host.mac.
# The following ELASTIC_NETINFO:false variable will disable the netinfo.enabled option of add-host-metadata processor. This will remove fields host.ip and host.mac.
# For more info: https://www.elastic.co/guide/en/beats/metricbeat/current/add-host-metadata.html
- name: ELASTIC_NETINFO
value: "false"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -63,7 +63,7 @@ spec:
fieldPath: metadata.name
- name: STATE_PATH
value: "/etc/elastic-agent"
# The following ELASTIC_NETINFO:false variable will disable the netinfo.enabled option of add-host-metadata processor. This will remove fields host.ip and host.mac.
# The following ELASTIC_NETINFO:false variable will disable the netinfo.enabled option of add-host-metadata processor. This will remove fields host.ip and host.mac.
# For more info: https://www.elastic.co/guide/en/beats/metricbeat/current/add-host-metadata.html
- name: ELASTIC_NETINFO
value: "false"
Expand Down
14 changes: 7 additions & 7 deletions deploy/kubernetes/elastic-agent-managed-kubernetes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -212,7 +212,7 @@ kind: ClusterRole
metadata:
name: elastic-agent
labels:
k8s-app: elastic-agent
app.kubernetes.io/name.kubernetes.io/name: elastic-agent
rules:
- apiGroups: [""]
resources:
Expand Down Expand Up @@ -284,7 +284,7 @@ metadata:
# Should be the namespace where elastic-agent is running
namespace: kube-system
labels:
k8s-app: elastic-agent
app.kubernetes.io/name.kubernetes.io/name: elastic-agent
rules:
- apiGroups:
- coordination.k8s.io
Expand All @@ -298,7 +298,7 @@ metadata:
name: elastic-agent-kubeadm-config
namespace: kube-system
labels:
k8s-app: elastic-agent
app.kubernetes.io/name.kubernetes.io/name: elastic-agent
rules:
- apiGroups: [""]
resources:
Expand All @@ -313,5 +313,5 @@ metadata:
name: elastic-agent
namespace: kube-system
labels:
k8s-app: elastic-agent
app.kubernetes.io/name.kubernetes.io/name: elastic-agent
---
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit 711f3f1

Please sign in to comment.