Skip to content

Commit

Permalink
test: Remote Write Pipeline changes (#1076)
Browse files Browse the repository at this point in the history
[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).
  • Loading branch information
bragi92 authored Mar 4, 2025
1 parent ecd8086 commit 90879a7
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 1 deletion.
21 changes: 20 additions & 1 deletion .pipelines/azure-pipeline-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,25 @@ stages:
pathToPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: drop

- job: CreateSidecarArtifact
displayName: "Create Sidecar YAML Artifact for Remote Write"
pool:
vmImage: 'ubuntu-latest' # Change if using a different agent

steps:
- task: CopyFiles@2
displayName: "Copy sidecar.yaml to artifact staging directory"
inputs:
SourceFolder: '$(Build.SourcesDirectory)/internal/remotewrite'
Contents: 'sidecar.yaml'
TargetFolder: '$(Build.ArtifactStagingDirectory)/drop'

- task: PublishBuildArtifacts@1
displayName: "Publish sidecar.yaml as an artifact"
inputs:
pathToPublish: '$(Build.ArtifactStagingDirectory)/drop'
artifactName: 'drop'

- job: Linux_Golang_Reference_App
displayName: "Build: linux golang reference app image"
pool:
Expand Down Expand Up @@ -2494,4 +2513,4 @@ stages:
exit 0
workingDirectory: $(Build.SourcesDirectory)
displayName: "Run tests"
displayName: "Run tests"
38 changes: 38 additions & 0 deletions internal/remotewrite/sidecar.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
prometheus:
prometheusSpec:
containers:
- env:
- name: INGESTION_URL
value: https://monitoring-metrics-amw-eus2euap-n06q.eastus2euap-1.metrics.canary.ingest.monitor.azure.com/dataCollectionRules/dcr-c1eee14b5a5d42cb892f4f8da52f68d3/streams/Microsoft-PrometheusMetrics/api/v1/write?api-version=2023-04-24
- name: LISTENING_PORT
value: "8081"
- name: IDENTITY_TYPE
value: userAssigned
- name: AZURE_CLIENT_ID
value: $AZURE_CLIENT_ID
- name: TRACE_LOGGING
value: "true"
- name: CLUSTER
value: monitoring-metrics-prod-aks-eus2euap
image: mcr.microsoft.com/azuremonitor/containerinsights/ciprod/prometheus-remote-write/images:prom-remotewrite-$RemoteWriteTag
imagePullPolicy: Always
livenessProbe:
httpGet:
path: /health
port: rw-port
initialDelaySeconds: 30
timeoutSeconds: 30
name: prom-remotewrite
ports:
- containerPort: 8081
name: rw-port
readinessProbe:
httpGet:
path: /ready
port: rw-port
initialDelaySeconds: 30
timeoutSeconds: 30
externalLabels:
cluster: monitoring-metrics-prod-aks-eus2euap
remoteWrite:
- url: http://localhost:8081/api/v1/write

0 comments on commit 90879a7

Please sign in to comment.