From 030bdc15729dbd910f659b74c3d9cfc0cad5937d Mon Sep 17 00:00:00 2001 From: Joe Sirianni Date: Mon, 18 Dec 2023 10:45:21 -0500 Subject: [PATCH] pr feedback: Disable cluster name by default. Misc spelling / wording. --- .../resourcedetectionprocessor/README.md | 24 +++++++++++++++++-- .../internal/azure/aks/metadata.yaml | 2 +- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/processor/resourcedetectionprocessor/README.md b/processor/resourcedetectionprocessor/README.md index d262e9b62202..c608aeb823e3 100644 --- a/processor/resourcedetectionprocessor/README.md +++ b/processor/resourcedetectionprocessor/README.md @@ -412,11 +412,31 @@ processors: #### Cluster Name +Cluster name detection is disabled by default, and can be enabled with the +following configuration: + +```yaml +processors: + resourcedetection/aks: + detectors: [aks] + timeout: 2s + override: false + aks: + resource_attributes: + k8s.cluster.name: true +``` + Azure AKS cluster name is derived from the Azure Instance Metadata Service's (IMDS) infrastructure resource group field. This field contains the resource group and name of the cluster, separated by underscores. e.g: `MC___`. -The cluster name is accurately detected if underscores are not present in the resource group name or the cluster name. +Example: + - Resource group: my-resource-group + - Cluster name: my-cluster + - Location: eastus + - Generated name: MC_my-resource-group_my-cluster_eastus + +The cluster name is detected if it does not contain underscores and if a custom infrastructure resource group name was not used. -If accurate parsing cannot be performed, the infrastructure resource group value is returned. This value can be used to accurately identify the cluster, as Azure will not allow users to create multiple clusters with the same infrastructure resource group. +If accurate parsing cannot be performed, the infrastructure resource group value is returned. This value can be used to uniquely identify the cluster, as Azure will not allow users to create multiple clusters with the same infrastructure resource group name. ### Consul diff --git a/processor/resourcedetectionprocessor/internal/azure/aks/metadata.yaml b/processor/resourcedetectionprocessor/internal/azure/aks/metadata.yaml index b3930de3e7a1..c5c1af7fbc15 100644 --- a/processor/resourcedetectionprocessor/internal/azure/aks/metadata.yaml +++ b/processor/resourcedetectionprocessor/internal/azure/aks/metadata.yaml @@ -14,4 +14,4 @@ resource_attributes: k8s.cluster.name: description: The k8s.cluster.name parsed from the Azure Instance Metadata Service's infrastructure resource group field type: string - enabled: true + enabled: false