diff --git a/otelcollector/deploy/addon-chart/Readme.md b/otelcollector/deploy/addon-chart/Readme.md index daf99f23..a24800ef 100644 --- a/otelcollector/deploy/addon-chart/Readme.md +++ b/otelcollector/deploy/addon-chart/Readme.md @@ -2,12 +2,12 @@ Use cli to enable the addon and then disable the addon. **Enable addon** - ``` -az aks update --enable-azuremonitormetrics -n -g +az aks update --enable-azure-monitor-metrics -n -g ``` **Disable addon** - ``` -az aks update --disable-azuremonitormetrics -n -g +az aks update --disable-azure-monitor-metrics -n -g ``` We need this step because we need to get the secret created for the addon-token-adapter to serve, which is only created when the addon is enabled. @@ -16,7 +16,7 @@ We need this step because we need to get the secret created for the addon-token- Instructions on how to deploy ARM template - https://learn.microsoft.com/en-us/azure/azure-monitor/containers/container-insights-prometheus-metrics-addon?tabs=resource-manager#download-and-edit-template-and-parameter-file -In the ARM template, comment out the section that enables the addon (with name - **"azuremonitormetrics-profile-"**(Lines 147 to 187), please comment the section acccordingly if template is updated) +In the ARM template, comment out the section that enables the addon (with name - **"azureMonitorProfile"**(Lines 156 to 196), please comment the section acccordingly if template is updated) ### **Step 3: Go to addon-chart directory** ``` @@ -24,7 +24,9 @@ cd prometheus-collector\otelcollector\deploy\addon-chart ``` ### **Step 4: Update the chart/values file accordingly based on what needs to be tested with your backdoor deployment** -Charts and Values for the addon are in the folder azure-monitor-metrics-addon/ +Update, local_testing_aks.ps1 within the azure-monitor-metrics-addon/ folder with the apporpritate ImageTag, Cluster Region and Cluster Resource ID (lines 9 to 11). Run the powershell file to generate the Chart and Values from the template files. + +If you do not run the script and manually generate the Chart, Values yaml files then please do the following : Values.yaml has some settings that need to be replaced, that are specific to your cluster. Please replace them before installing the helm chart. - global.commonGlobals.Region @@ -36,18 +38,12 @@ Values.yaml has some settings that need to be replaced, that are specific to you Repository: https://msazure.visualstudio.com/CloudNativeCompute/_git/aks-rp?path=/ccp/charts/addon-charts/azure-monitor-metrics-addon/templates/ama-metrics-daemonset.yaml&version=GBrashmi/prom-addon-arm64&line=136&lineEnd=136&lineStartColumn=56&lineEndColumn=85&lineStyle=plain&_a=contents ImageTag: https://msazure.visualstudio.com/CloudNativeCompute/_git/aks-rp?path=/ccp/charts/kube-control-plane/templates/_images.tpl&version=GBrashmi/prom-addon-arm64&line=530&lineEnd=530&lineStartColumn=28&lineEndColumn=53&lineStyle=plain&_a=contents - -### **Step 5: Test out with Operator mode turned on** - -This is an interim step needed until the operator changes roll out globally to make sure the changes work well with the new mode. -The value TargetAllocatorEnabled is set to false by default, this needs to be set to true to test out with the operator mode turned on. - -### **Step 6: Install Helm chart** +### **Step 5: Install Helm chart** ``` helm install ama-metrics azure-monitor-metrics-addon/ --values azure-monitor-metrics-addon/values.yaml ``` -### **Step 7: Uninstall helm chart** +### **Step 6: Uninstall helm chart** ``` helm uninstall ama-metrics ``` \ No newline at end of file diff --git a/otelcollector/deploy/addon-chart/azure-monitor-metrics-addon/local_testing_aks.ps1 b/otelcollector/deploy/addon-chart/azure-monitor-metrics-addon/local_testing_aks.ps1 index d8ea0afc..bac24d73 100644 --- a/otelcollector/deploy/addon-chart/azure-monitor-metrics-addon/local_testing_aks.ps1 +++ b/otelcollector/deploy/addon-chart/azure-monitor-metrics-addon/local_testing_aks.ps1 @@ -27,7 +27,7 @@ $valuesTemplateContent | Out-File -FilePath $valuesOutputPath $chartTemplateContent = $chartTemplateContent -replace '\$\{HELM_CHART_NAME\}', 'ama-metrics' $chartTemplateContent = $chartTemplateContent -replace '\$\{IMAGE_TAG\}', $ImageTag # Remove the dependencies section -$chartTemplateContent = $chartTemplateContent -replace '(?s)dependencies:\s*-\s*name:\s*prometheus-node-exporter\s*version:\s*"4\.26\.0"\s*repository:\s*oci://\$\{MCR_REGISTRY\}\$\{MCR_REPOSITORY_HELM_DEPENDENCIES\}\s*condition:\s*AzureMonitorMetrics\.ArcExtension\s*', '' +$chartTemplateContent = $chartTemplateContent -replace '(?s)dependencies:\s*-\s*name:\s*prometheus-node-exporter\s*version:\s*"4\.39\.0"\s*repository:\s*oci://\$\{MCR_REGISTRY\}\$\{MCR_REPOSITORY_HELM_DEPENDENCIES\}\s*condition:\s*AzureMonitorMetrics\.ArcExtension\s*', '' # Replace placeholders in values-template.yaml