Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade collector, targetallocator and prometheus operator to latest versions (0.90, 0.90 and 0.69.1) #706

Merged
merged 21 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 3 additions & 1 deletion .pipelines/azure-pipeline-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ trigger:
branches:
include:
- main
- rashmi/ta-wrapperandupgrade

pr:
autoCancel: true
Expand Down Expand Up @@ -254,7 +255,7 @@ jobs:
- task: GoTool@0
displayName: "Build: specify golang version"
inputs:
version: '1.20'
version: '1.21.0'
rashmichandrashekar marked this conversation as resolved.
Show resolved Hide resolved

- bash: |
sudo apt-get install build-essential -y
Expand All @@ -266,6 +267,7 @@ jobs:
displayName: 'SDL: run binskim'
inputs:
InputType: 'CommandLine'
# Remove - $(Build.SourcesDirectory)/otelcollector/otel-allocator/targetallocator for targetallocator since go 1.21 is not yet supported by build pipeline, add this back once 1.21 is supported
rashmichandrashekar marked this conversation as resolved.
Show resolved Hide resolved
arguments: 'analyze --rich-return-code $(Build.SourcesDirectory)/otelcollector/opentelemetry-collector-builder/otelcollector $(Build.SourcesDirectory)/otelcollector/prom-config-validator-builder/promconfigvalidator $(Build.SourcesDirectory)/otelcollector/otel-allocator/targetallocator $(Build.SourcesDirectory)/otelcollector/fluent-bit/src/out_appinsights.so'

- task: Gosec@1
Expand Down
21 changes: 10 additions & 11 deletions .trivyignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,27 @@

# =========== HIGH ================
# HIGH - otelcollector
GHSA-m425-mq94-257g
CVE-2023-47108
# HIGH - telegraf
GHSA-fr2g-9hjm-wr23
# HIGH - promconfigvalidator
GHSA-m425-mq94-257g
CVE-2023-47108
# HIGH - telegraf
CVE-2023-39325
GHSA-m425-mq94-257g
CVE-2023-47090
CVE-2023-46129

# =========== MEDIUM ================
# MEDIUM - otelcollector
CVE-2023-40577
GHSA-jq35-85cj-fj4p
CVE-2023-48795
# MEDIUM - promconfigvalidator
CVE-2023-40577
GHSA-jq35-85cj-fj4p
CVE-2023-48795
# MEDIUM - telegraf
GHSA-jq35-85cj-fj4p
# MEDIUM - go vulnerabilities
CVE-2023-39325
GHSA-7ww5-4wqc-m92c
GHSA-mhpq-9638-x6pw
CVE-2023-48795
CVE-2023-3978
CVE-2023-44487
CVE-2023-44487
# MEDIUM - go vulnerabilities
# MEDIUM - mariner
CVE-2023-5678
52 changes: 0 additions & 52 deletions internal/referenceapp/testTemplates/memory-leak.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions otelcollector/build/linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN apt-get update && apt-get install gcc-aarch64-linux-gnu -y
ARG TARGETOS TARGETARCH
RUN if [ "$TARGETARCH" = "arm64" ] ; then CC=aarch64-linux-gnu-gcc CGO_ENABLED=1 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -buildmode=c-shared -ldflags '-extldflags=-Wl,-z,now' -o out_appinsights.so . ; else CGO_ENABLED=1 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -buildmode=c-shared -ldflags '-extldflags=-Wl,-z,now' -o out_appinsights.so . ; fi

FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang:1.19 as otelcollector-builder
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang:1.20 as otelcollector-builder
WORKDIR /src
RUN apt-get update && apt-get install gcc-aarch64-linux-gnu -y
RUN go version > goversion.txt
Expand All @@ -23,7 +23,7 @@ COPY ./prometheusreceiver /src/prometheusreceiver
ARG TARGETOS TARGETARCH
RUN if [ "$TARGETARCH" = "arm64" ] ; then CC=aarch64-linux-gnu-gcc CGO_ENABLED=1 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -buildmode=pie -ldflags '-linkmode external -extldflags=-Wl,-z,now' -o otelcollector . ; else CGO_ENABLED=1 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -buildmode=pie -ldflags '-linkmode external -extldflags=-Wl,-z,now' -o otelcollector . ; fi

FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang:1.19 as prom-config-validator-builder
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang:1.20 as prom-config-validator-builder
WORKDIR /src
RUN apt-get update && apt-get install gcc-aarch64-linux-gnu -y
COPY ./prom-config-validator-builder/go.mod ./prom-config-validator-builder/go.sum ./prom-config-validator-builder/
Expand Down
4 changes: 2 additions & 2 deletions otelcollector/build/linux/configuration-reader/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang:1.19 as prom-config-validator-builder
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang:1.20 as prom-config-validator-builder
WORKDIR /src
RUN apt-get update && apt-get install gcc-aarch64-linux-gnu -y
COPY ./prom-config-validator-builder/go.mod ./prom-config-validator-builder/go.sum ./prom-config-validator-builder/
Expand All @@ -13,7 +13,7 @@ COPY ./prometheusreceiver /src/prometheusreceiver
ARG TARGETOS TARGETARCH
RUN if [ "$TARGETARCH" = "arm64" ] ; then CC=aarch64-linux-gnu-gcc CGO_ENABLED=1 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -buildmode=pie -ldflags '-linkmode external -extldflags=-Wl,-z,now' -o promconfigvalidator . ; else CGO_ENABLED=1 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -buildmode=pie -ldflags '-linkmode external -extldflags=-Wl,-z,now' -o promconfigvalidator . ; fi

FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang:1.19 as configuration-reader-builder
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang:1.20 as configuration-reader-builder
WORKDIR /src
RUN apt-get update && apt-get install gcc-aarch64-linux-gnu -y
COPY ./configuration-reader-builder/go.mod ./configuration-reader-builder/go.sum ./configuration-reader-builder/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ spec:
- name: targetallocator
args:
- --enable-prometheus-cr-watcher
- --reload-config
image: "mcr.microsoft.com{{ .Values.AzureMonitorMetrics.ImageRepository }}:{{ .Values.AzureMonitorMetrics.ImageTagTargetAllocator }}"
imagePullPolicy: IfNotPresent
resources:
Expand Down
1 change: 1 addition & 0 deletions otelcollector/opentelemetry-collector-builder/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ fluentbitplugin:
promconfigvalidator:
make -C ../prom-config-validator-builder

# add this back once golang 1.21 is supported in ado builds
rashmichandrashekar marked this conversation as resolved.
Show resolved Hide resolved
targetallocator:
make -C ../otel-allocator

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.47.0
2.48.0
Loading