Labels are used to send tags based upon a Deployment or a Pod.
There are two types of labels that the Agent supports.
Deployment Labels
Deployment labels are added to the deployment metadata as we see below. They will show up as server attributes and their metadata can be broken down within the billing data.
YAML
apiVersion: apps/v1 kind: Deployment metadata: name: nginx-deployment labels: app: nginx **deployment_label: ui_server_attribute** annotations: a: hidden_from_ui b: hidden_from_ui c: hidden_from_ui spec: replicas: 3 selector: matchLabels: app: nginx template: metadata: annotations: log.config.scalyr.com/attributes.parser: accessLog log.config.scalyr.com/attributes.attribute_tag: ui_log_attribute labels: app: nginx other: ui_log_attribute spec: containers: - name: nginx image: nginx:latest ports: - containerPort: 80
You can check your deployment labels with the following command
kubectl get deployments --show-labels NAME READY UP-TO-DATE AVAILABLE AGE LABELS nginx-deployment 3/3 3 3 23h app=nginx,deployment_label=ui_server_attribute
Comments
0 comments
Please sign in to leave a comment.