Skip to content

Commit

Permalink
Merge branch 'open-telemetry:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Horiodino authored Nov 9, 2023
2 parents e29c095 + f60a945 commit 5528f70
Show file tree
Hide file tree
Showing 132 changed files with 16,395 additions and 618 deletions.
16 changes: 16 additions & 0 deletions .chloggen/add-managed-bridge-annotation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement

# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action)
component: OpAMP Bridge

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Sends a heartbeat from the bridge and brings the annotation to spec.

# One or more tracking issues related to the change
issues: [2132]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
16 changes: 16 additions & 0 deletions .chloggen/target-allocator-container-port.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement

# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action)
component: target allocator

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Declare and use ContainerPort for Target Allocator

# One or more tracking issues related to the change
issues: [2312]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
16 changes: 16 additions & 0 deletions .chloggen/truncate-pod-label.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: bug_fix

# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action)
component: operator

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Truncate `sidecar.opentelemetry.io/injected` sidecar pod label to 63 characters

# One or more tracking issues related to the change
issues: [1031]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
13 changes: 9 additions & 4 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,26 @@ jobs:
- e2e-autoscale
- e2e-multi-instrumentation
- e2e-pdb
- e2e-opampbridge

steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "~1.21.1"
go-version: "~1.21.3"
cache-dependency-path: |
go.sum
cmd/otel-allocator/go.sum
cmd/operator-opamp-bridge/go.sum
- name: Setup kind
env:
KIND_VERSION: "0.20.0"
run: go install sigs.k8s.io/kind@v${KIND_VERSION}

- name: Check out code into the Go module directory
uses: actions/checkout@v4

- name: "install kuttl"
run: ./hack/install-kuttl.sh

Expand Down
33 changes: 17 additions & 16 deletions .github/workflows/publish-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,20 @@ on:

workflow_dispatch:

env:
PLATFORMS: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le

jobs:
publish:
name: Publish container images
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v4
with:
go-version: '~1.21.3'

- name: Unshallow
run: git fetch --prune --unshallow

Expand All @@ -34,7 +41,15 @@ jobs:
grep -v '\#' versions.txt | grep autoinstrumentation-apache-httpd | awk -F= '{print "AUTO_INSTRUMENTATION_NGINX_VERSION="$2}' >> $GITHUB_ENV
echo "VERSION_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
echo "VERSION=$(git describe --tags | sed 's/^v//')" >> $GITHUB_ENV
- name: Build the binary for each supported architecture
run: |
for platform in $(echo $PLATFORMS | tr "," "\n"); do
arch=${platform#*/}
echo "Building manager for $arch"
make manager ARCH=$arch
done
- name: Docker meta
id: docker_meta
uses: docker/metadata-action@v5
Expand Down Expand Up @@ -82,23 +97,9 @@ jobs:
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le
platforms: ${{ env.PLATFORMS }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
build-args: |
VERSION_PKG=github.com/open-telemetry/opentelemetry-operator/internal/version
VERSION=${{ env.VERSION }}
VERSION_DATE=${{ env.VERSION_DATE }}
OTELCOL_VERSION=${{ env.OTELCOL_VERSION }}
TARGETALLOCATOR_VERSION=${{ env.TARGETALLOCATOR_VERSION }}
OPERATOR_OPAMP_BRIDGE_VERSION=${{ env.OPERATOR_OPAMP_BRIDGE_VERSION }}
AUTO_INSTRUMENTATION_JAVA_VERSION=${{ env.AUTO_INSTRUMENTATION_JAVA_VERSION }}
AUTO_INSTRUMENTATION_NODEJS_VERSION=${{ env.AUTO_INSTRUMENTATION_NODEJS_VERSION }}
AUTO_INSTRUMENTATION_PYTHON_VERSION=${{ env.AUTO_INSTRUMENTATION_PYTHON_VERSION }}
AUTO_INSTRUMENTATION_DOTNET_VERSION=${{ env.AUTO_INSTRUMENTATION_DOTNET_VERSION }}
AUTO_INSTRUMENTATION_GO_VERSION=${{ env.AUTO_INSTRUMENTATION_GO_VERSION }}
AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION=${{ env.AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION }}
AUTO_INSTRUMENTATION_NGINX_VERSION=${{ env.AUTO_INSTRUMENTATION_NGINX_VERSION }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
22 changes: 18 additions & 4 deletions .github/workflows/publish-operator-opamp-bridge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,35 @@ on:
- 'v*'
workflow_dispatch:

env:
PLATFORMS: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le

jobs:
publish:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v4
with:
go-version: '~1.21.3'
cache-dependency-path: 'cmd/operator-opamp-bridge/go.sum'

# TODO: We're currently not using this. Should we?
- name: Read version
run: |
echo "VERSION=$(git describe --tags | sed 's/^v//')" >> $GITHUB_ENV
echo "VERSION_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
- name: Build the binary for each supported architecture
run: |
for platform in $(echo $PLATFORMS | tr "," "\n"); do
arch=${platform#*/}
echo "Building operator-opamp-bridge for $arch"
make operator-opamp-bridge ARCH=$arch
done
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
Expand Down Expand Up @@ -69,11 +86,8 @@ jobs:
uses: docker/build-push-action@v5
with:
context: cmd/operator-opamp-bridge
platforms: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le
platforms: ${{ env.PLATFORMS }}
push: true
build-args: |
VERSION=${{ env.VERSION }}
VERSION_DATE=${{ env.VERSION_DATE }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=local,src=/tmp/.buildx-cache
Expand Down
22 changes: 18 additions & 4 deletions .github/workflows/publish-target-allocator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,35 @@ on:
- 'v*'
workflow_dispatch:

env:
PLATFORMS: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le

jobs:
publish:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v4
with:
go-version: '~1.21.3'
cache-dependency-path: 'cmd/otel-allocator/go.sum'

# TODO: We're currently not using this. Should we?
- name: Read version
run: |
echo "VERSION=$(git describe --tags | sed 's/^v//')" >> $GITHUB_ENV
echo "VERSION_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
- name: Build the binary for each supported architecture
run: |
for platform in $(echo $PLATFORMS | tr "," "\n"); do
arch=${platform#*/}
echo "Building target allocator for $arch"
make targetallocator ARCH=$arch
done
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
Expand Down Expand Up @@ -69,11 +86,8 @@ jobs:
uses: docker/build-push-action@v5
with:
context: cmd/otel-allocator
platforms: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le
platforms: ${{ env.PLATFORMS }}
push: true
build-args: |
VERSION=${{ env.VERSION }}
VERSION_DATE=${{ env.VERSION_DATE }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=local,src=/tmp/.buildx-cache
Expand Down
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,38 @@ Changes by Version
==================
<!-- next version -->

## 0.88.0

### 🛑 Breaking changes 🛑

- `OpAMP Bridge`: Currently, the bridge doesn't adhere to the spec for the naming structure. This changes the bridge to use the <namespace>/<otelcol> structure as described. (#2131)
* Updates the bridge to get collectors using the reporting annotation
* Fixes a bug where we were using the incorrect structure for the collectors


### 💡 Enhancements 💡

- `operator-opamp-bridge`: Creates the CRD for the OpAMPBridge resource (#1368)
- `autoinstrumentation`: Bump OpenTelemetry .NET Automatic Instrumentation to 1.1.0 (#2252)
- `operator`: Bump NodeJS dependencies. Also, increase the size of the default size for the volume used to copy the autoinstrumentation libraries from 150M to 200M (#2240, #2237)

### 🧰 Bug fixes 🧰

- `Operator`: Fixed the labeling process which was broken at the moment to capture the current image tag when the users set the sha256 reference. (#1982)
- `target allocator`: reset kubeconfig to empty string when using in-cluster config (#2262)

### Components

* [OpenTelemetry Collector - v0.88.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.88.0)
* [OpenTelemetry Contrib - v0.88.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.88.0)
* [Java auto-instrumentation - 1.31.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.31.0)
* [.NET auto-instrumentation - 1.1.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/1.1.0)
* [Node.JS - 0.44.0](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-0.44.0)
* [Python - 0.41b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/0.41b0)
* [Go - v0.7.0-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.7.0-alpha)
* [ApacheHTTPD - 1.0.3](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.3)
* [Nginx - 1.0.3](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.3)]

## 0.87.0

### 🛑 Breaking changes 🛑
Expand Down
48 changes: 9 additions & 39 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,51 +1,21 @@
# Build the manager binary
FROM golang:1.21-alpine as builder

WORKDIR /workspace
# Get CA certificates from alpine package repo
FROM alpine:3.18 as certificates

RUN apk --no-cache add ca-certificates

# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
# cache deps before building and copying source so that we don't need to re-download as much
# and so that source changes don't invalidate our downloaded layer
RUN go mod download

# Copy the go source
COPY main.go main.go
COPY apis/ apis/
COPY controllers/ controllers/
COPY internal/ internal/
COPY pkg/ pkg/
COPY versions.txt versions.txt

ARG VERSION_PKG
ARG VERSION
ARG VERSION_DATE
ARG OTELCOL_VERSION
ARG TARGETALLOCATOR_VERSION
ARG OPERATOR_OPAMP_BRIDGE_VERSION
ARG AUTO_INSTRUMENTATION_JAVA_VERSION
ARG AUTO_INSTRUMENTATION_NODEJS_VERSION
ARG AUTO_INSTRUMENTATION_PYTHON_VERSION
ARG AUTO_INSTRUMENTATION_DOTNET_VERSION
ARG AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION
ARG AUTO_INSTRUMENTATION_NGINX_VERSION
ARG AUTO_INSTRUMENTATION_GO_VERSION

# Build
RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -ldflags="-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION} -X ${VERSION_PKG}.targetAllocator=${TARGETALLOCATOR_VERSION} -X ${VERSION_PKG}.operatorOpAMPBridge=${OPERATOR_OPAMP_BRIDGE_VERSION} -X ${VERSION_PKG}.autoInstrumentationJava=${AUTO_INSTRUMENTATION_JAVA_VERSION} -X ${VERSION_PKG}.autoInstrumentationNodeJS=${AUTO_INSTRUMENTATION_NODEJS_VERSION} -X ${VERSION_PKG}.autoInstrumentationPython=${AUTO_INSTRUMENTATION_PYTHON_VERSION} -X ${VERSION_PKG}.autoInstrumentationDotNet=${AUTO_INSTRUMENTATION_DOTNET_VERSION} -X ${VERSION_PKG}.autoInstrumentationGo=${AUTO_INSTRUMENTATION_GO_VERSION} -X ${VERSION_PKG}.autoInstrumentationApacheHttpd=${AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION} -X ${VERSION_PKG}.autoInstrumentationNginx=${AUTO_INSTRUMENTATION_NGINX_VERSION}" -a -o manager main.go

######## Start a new stage from scratch #######
FROM scratch

ARG TARGETARCH

WORKDIR /

# Copy the certs from the builder
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
# Copy the certs from Alpine
COPY --from=certificates /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt

# Copy binary built on the host
COPY bin/manager_${TARGETARCH} manager

COPY --from=builder /workspace/manager .
USER 65532:65532

ENTRYPOINT ["/manager"]
Loading

0 comments on commit 5528f70

Please sign in to comment.