Skip to content

Commit a709e4c

Browse files
authored
feat: update remote write sidecar to write to eastus2 workspace (#1090)
[comment]: # (Note that your PR title should follow the conventional commit format: https://conventionalcommits.org/en/v1.0.0/#summary) # PR Description [comment]: # (The below checklist is for PRs adding new features. If a box is not checked, add a reason why it's not needed.) # New Feature Checklist - [ ] List telemetry added about the feature. - [ ] Link to the one-pager about the feature. - [ ] List any tasks necessary for release (3P docs, AKS RP chart changes, etc.) after merging the PR. - [ ] Attach results of scale and perf testing. [comment]: # (The below checklist is for code changes. Not all boxes necessarily need to be checked. Build, doc, and template changes do not need to fill out the checklist.) # Tests Checklist - [ ] Have end-to-end Ginkgo tests been run on your cluster and passed? To bootstrap your cluster to run the tests, follow [these instructions](/otelcollector/test/README.md#bootstrap-a-dev-cluster-to-run-ginkgo-tests). - Labels used when running the tests on your cluster: - [ ] `operator` - [ ] `windows` - [ ] `arm64` - [ ] `arc-extension` - [ ] `fips` - [ ] Have new tests been added? For features, have tests been added for this feature? For fixes, is there a test that could have caught this issue and could validate that the fix works? - [ ] Is a new scrape job needed? - [ ] The scrape job was added to the folder [test-cluster-yamls](/otelcollector/test/test-cluster-yamls/) in the correct configmap or as a CR. - [ ] Was a new test label added? - [ ] A string constant for the label was added to [constants.go](/otelcollector/test/utils/constants.go). - [ ] The label and description was added to the [test README](/otelcollector/test/README.md). - [ ] The label was added to this [PR checklist](/.github/pull_request_template). - [ ] The label was added as needed to [testkube-test-crs.yaml](/otelcollector/test/testkube/testkube-test-crs.yaml). - [ ] Are additional API server permissions needed for the new tests? - [ ] These permissions have been added to [api-server-permissions.yaml](/otelcollector/test/testkube/api-server-permissions.yaml). - [ ] Was a new test suite (a new folder under `/tests`) added? - [ ] The new test suite is included in [testkube-test-crs.yaml](/otelcollector/test/testkube/testkube-test-crs.yaml).
1 parent 840f59b commit a709e4c

File tree

7 files changed

+49
-9
lines changed

7 files changed

+49
-9
lines changed

.pipelines/azure-pipeline-build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ variables:
2424
IS_MAIN_BRANCH: $[eq(variables['Build.SourceBranchName'], 'main')]
2525
BUILD_WINDOWS: true
2626
Codeql.Enabled: true
27-
GOLANG_VERSION: '1.22.11'
27+
GOLANG_VERSION: '1.23.7'
2828
TESTKUBE_GOLANG_VERSION: '1.23.2'
2929
FLUENT_BIT_VERSION: '3.2.2'
3030

.trivyignore

+5
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,9 @@ CVE-2024-45341 # stdlib
1919
# targetallocator
2020
# config-reader
2121
CVE-2025-22866 # stdlib
22+
CVE-2025-22870 # golang.org/x/net
23+
#otelcollector
24+
CVE-2025-22870 # golang.org/x/net
25+
#promconfigvalidator
26+
CVE-2025-22870 # golang.org/x/net
2227

RELEASENOTES.md

+11
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
11
# Azure Monitor Metrics for AKS clusters
2+
## Release <TBD>
3+
* Linux image - `mcr.microsoft.com/azuremonitor/containerinsights/ciprod/prometheus-collector/images:<TBD>`
4+
* Windows image - `mcr.microsoft.com/azuremonitor/containerinsights/ciprod/prometheus-collector/images:<TBD>-win`
5+
* TA image - `mcr.microsoft.com/azuremonitor/containerinsights/ciprod/prometheus-collector/images:<TBD>-targetallocator`
6+
* cfg sidecar image - `mcr.microsoft.com/azuremonitor/containerinsights/ciprod/prometheus-collector/images:<TBD>-cfg`
7+
* AKS and Arc Container Images:
8+
*
9+
10+
* Pipeline/Docs/Templates Updates:
11+
* ci/cd: update remote write sidecar to write to eastus2 workspace (https://github.com/Azure/prometheus-collector/pull/1090)
12+
213
## Release 02-21-2025
314
* Linux image - `mcr.microsoft.com/azuremonitor/containerinsights/ciprod/prometheus-collector/images:6.15.0-main-02-21-2025-4acb2b4c`
415
* Windows image - `mcr.microsoft.com/azuremonitor/containerinsights/ciprod/prometheus-collector/images:6.15.0-main-02-21-2025-4acb2b4c-win`

internal/docs/BUILDANDRELEASE.md

+15
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,19 @@ https://msazure.visualstudio.com/CloudNativeCompute/_git/aks-rp?path=/toolkit/ve
9797
- Verify first minimalIngestionProfile scenario by applying [test config enabling all ccp targets, with MIP false, and empty keep list](https://github.com/Azure/prometheus-collector/blob/main/otelcollector/test/test-cluster-yamls/configmaps/controlplane/ama-metrics-settings-configmap-mipfalse-emptykeep.yaml). All the metrics from all targets should have been scraped.
9898
- Verify second minimalIngestionProfile scenario by applying [test config enabling all ccp targets, with MIP false, and keep list populated](https://github.com/Azure/prometheus-collector/blob/main/otelcollector/test/test-cluster-yamls/configmaps/controlplane/ama-metrics-settings-configmap-mipfalse-emptykeep.yaml). Only the metrics specified in the test config .yaml for each targets' keeplist should be scraped.
9999
- Post about the candidate image release for the AKS team to update in the [Managed Prometheus (Azure Monitor Metrics addon)](https://teams.microsoft.com/l/channel/19%3Ae9dd234c60824ac5b494dbe3ec7dcb6b%40thread.skype/Managed%20Prometheus%20(Azure%20Monitor%20Metrics%20addon)?groupId=e121dbfd-0ec1-40ea-8af5-26075f6a731b&tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47) teams channel
100+
- **🚀 Remote Write Deployment Steps**
101+
- **Skip if Not Releasing**
102+
- If you’re not releasing a new remote write image, leave the default value as is and skip the following steps.
103+
104+
- **Get the Latest Image Tag**
105+
- Retrieve the latest image tag from the most recent build in the [Remote Write Release Pipeline](https://msazure.visualstudio.com/InfrastructureInsights/_release?_a=releases&view=mine&definitionId=77).
106+
107+
- **Update Prometheus Collector Release**
108+
- While creating the [Prometheus Collector Prod Release](https://github-private.visualstudio.com/azure/_release?_a=releases&view=mine&definitionId=79), update the release variables with the new candidate image tag.
109+
110+
- **Deploy Remote Write Image**
111+
- Click **Deploy** in the `Deploy to Remote Write Clusters` step to release the new remote write image to the monitoring cluster.
112+
113+
- **Update Pipeline Variables**
114+
- After a successful deployment, update the `RemoteWriteTag` variable in the release pipeline with the new remote write release tag.
100115
- **Arc**: Start Arc release to Canary regions. The new version will be automatically deployed to each region batch every 24 hours.

internal/remotewrite/sidecar.yaml

+6-1
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,9 @@ prometheus:
4444
externalLabels:
4545
cluster: monitoring-metrics-prod-aks-eus2euap
4646
remoteWrite:
47-
- url: http://localhost:8081/api/v1/write
47+
- url: http://localhost:8081/api/v1/write
48+
- url: https://remotewritemonitor-eus2-lzt0.eastus2-1.metrics.ingest.monitor.azure.com/dataCollectionRules/dcr-c61eca33833b44fa8eddd257a0baa02a/streams/Microsoft-PrometheusMetrics/api/v1/write?api-version=2023-04-24
49+
azureAd:
50+
cloud: AzurePublic
51+
managedIdentity:
52+
clientId: $USER_ASSIGNED_MANAGED_IDENTITY_CLIENT_ID

otelcollector/go.mod

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
module prometheus-collector
22

3-
go 1.21
3+
go 1.23.0
4+
5+
toolchain go1.23.7
46

57
replace github.com/prometheus-collector/shared => ./shared
68

@@ -19,6 +21,8 @@ require (
1921
github.com/pelletier/go-toml v1.9.5 // indirect
2022
github.com/pmezard/go-difflib v1.0.0 // indirect
2123
github.com/stretchr/testify v1.9.0 // indirect
24+
golang.org/x/net v0.36.0 // indirect
25+
golang.org/x/sys v0.30.0 // indirect
2226
gopkg.in/yaml.v2 v2.4.0 // indirect
2327
gopkg.in/yaml.v3 v3.0.1 // indirect
2428
)

otelcollector/go.sum

+6-6
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
1818
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
1919
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
2020
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
21-
golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=
22-
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
23-
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
24-
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
25-
golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk=
26-
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
21+
golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA=
22+
golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I=
23+
golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc=
24+
golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
25+
golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM=
26+
golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY=
2727
golang.org/x/tools v0.21.0 h1:qc0xYgIbsSDt9EyWz05J5wfa7LOVW0YTLOXrqdLAWIw=
2828
golang.org/x/tools v0.21.0/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
2929
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=

0 commit comments

Comments
 (0)