Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
monteiro-renato authored Oct 31, 2024
2 parents 566ce2b + 75ad587 commit 3c8fbc8
Show file tree
Hide file tree
Showing 7 changed files with 414 additions and 34 deletions.
413 changes: 395 additions & 18 deletions .pipelines/azure-pipeline-build.yml

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions REMOTE-WRITE-RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Azure Monitor managed service for Prometheus remote write

## Release 06-17-2024
* Image - `mcr.microsoft.com/azuremonitor/containerinsights/ciprod/prometheus-remote-write/images:prom-remotewrite-20240617.1`
* Change log -
* CVE fixes
* golang update from 1.21.9 to 1.22.4
2 changes: 1 addition & 1 deletion otelcollector/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.10.2
6.11.0
20 changes: 8 additions & 12 deletions otelcollector/deploy/addon-chart/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
Use cli to enable the addon and then disable the addon.
**Enable addon** -
```
az aks update --enable-azuremonitormetrics -n <cluster-name> -g <cluster-resource-group>
az aks update --enable-azure-monitor-metrics -n <cluster-name> -g <cluster-resource-group>
```

**Disable addon** -
```
az aks update --disable-azuremonitormetrics -n <cluster-name> -g <cluster-resource-group>
az aks update --disable-azure-monitor-metrics -n <cluster-name> -g <cluster-resource-group>
```
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.

Expand All @@ -16,15 +16,17 @@ 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**
```
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
Expand All @@ -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
```
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ exporters:
prometheus:
endpoint: "127.0.0.1:9091"
const_labels:
cluster: ${nev:AZMON_CLUSTER_LABEL}
cluster: ${env:AZMON_CLUSTER_LABEL}
otlp:
endpoint: 127.0.0.1:55680
tls:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ data:
replacement: $$NODE_IP
target_label: node_ip_double_dollar_sign
static_configs:
- targets: ['$NODE_IP:9100']
- targets: ['$NODE_IP:19100']
metadata:
name: ama-metrics-prometheus-config-node
namespace: kube-system

0 comments on commit 3c8fbc8

Please sign in to comment.