Skip to content

Commit

Permalink
Fix container image builds for http fault injector and otel collector (
Browse files Browse the repository at this point in the history
…#9096)

* Fix container image builds for http fault injector and otel collector

* Got it working with the latest, and specifying a specific version of the envprovider since, apparently, it versions separately from everything else.

---------

Co-authored-by: Richard Park <[email protected]>
  • Loading branch information
benbp and Richard Park authored Oct 4, 2024
1 parent 5250865 commit 2e4cd58
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<VersionPrefix>0.2.0</VersionPrefix>
Expand Down
4 changes: 2 additions & 2 deletions tools/http-fault-injector/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM mcr.microsoft.com/dotnet/sdk:6.0
# fault injector requires .NET 6
FROM mcr.microsoft.com/dotnet/sdk:8.0
# fault injector requires .NET 8

ARG FAULT_INJECTOR_VERSION=""
ARG NUGET_SOURCE="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json"
Expand Down
4 changes: 2 additions & 2 deletions tools/stress-cluster/services/otelcollector/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM mcr.microsoft.com/oss/go/microsoft/golang:1.21 as build
FROM mcr.microsoft.com/oss/go/microsoft/golang:1.22 as build
RUN apt update -y && apt upgrade -y && apt install -y build-essential git

# this lets us build a custom otel-collector image, with a minimal set of
# adapters, etc...
RUN go install go.opentelemetry.io/collector/cmd/builder@latest
RUN go install go.opentelemetry.io/collector/cmd/builder@v0.110.0
COPY ./otel-builder.yml /otel-builder.yml
# builds to /tmp/dist
RUN builder --config=/otel-builder.yml
Expand Down
16 changes: 10 additions & 6 deletions tools/stress-cluster/services/otelcollector/otel-builder.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
# This is used as an input to the `ocb` app that lets you build a customized OpenTelemetry collector,
# This is used as an input to the `ocb` app that lets you build a customized OpenTelemetry collector,
# as described here: https://opentelemetry.io/docs/collector/custom-collector/
dist:
name: otelcol-custom
description: Local OpenTelemetry Collector binary
output_path: /tmp/dist
otelcol_version: 0.96.0
otelcol_version: 0.110.0
providers:
- gomod: go.opentelemetry.io/collector/confmap/provider/envprovider v1.16.0
- gomod: go.opentelemetry.io/collector/confmap/provider/fileprovider v1.16.0

exporters:
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuremonitorexporter v0.96.0
- gomod: go.opentelemetry.io/collector/exporter/debugexporter v0.96.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuremonitorexporter v0.110.0
- gomod: go.opentelemetry.io/collector/exporter/debugexporter v0.110.0

receivers:
- gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.96.0
- gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.110.0

processors:
- gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.96.0
- gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.110.0

0 comments on commit 2e4cd58

Please sign in to comment.