Skip to content

Commit

Permalink
Merge branch 'main' of github.com:open-telemetry/opentelemetry-operat…
Browse files Browse the repository at this point in the history
…or into enhanced-webhook
  • Loading branch information
taniyourstruly committed Aug 15, 2024
2 parents 3fdc89f + b40287d commit 2fc8b80
Show file tree
Hide file tree
Showing 21 changed files with 883 additions and 51 deletions.
16 changes: 0 additions & 16 deletions .chloggen/3201-fix-labels-filter-arg.yaml

This file was deleted.

13 changes: 0 additions & 13 deletions .chloggen/extract-resources-ns.yaml

This file was deleted.

25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,31 @@

<!-- next version -->

## 0.107.0

### 💡 Enhancements 💡

- `instrumentation`: introduced ability to set Otel resource attributes based on annotations for instrumentation (#2181)

resource.opentelemetry.io/your-key: "your-value"


### 🧰 Bug fixes 🧰

- `collector`: Fix example for labels-filter startup parameter --label. (#3201)

### Components

* [OpenTelemetry Collector - v0.107.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.107.0)
* [OpenTelemetry Contrib - v0.107.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.107.0)
* [Java auto-instrumentation - v1.33.5](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.33.5)
* [.NET auto-instrumentation - v1.2.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v1.2.0)
* [Node.JS - v0.52.1](https://github.com/open-telemetry/opentelemetry-js/releases/tag/experimental%2Fv0.52.1)
* [Python - v0.47b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.47b0)
* [Go - v0.14.0-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.14.0-alpha)
* [ApacheHTTPD - 1.0.4](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.4)
* [Nginx - 1.0.4](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.4)

## 0.106.0

### 🧰 Bug fixes 🧰
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,7 @@ The OpenTelemetry Operator _might_ work on versions outside of the given range,

| OpenTelemetry Operator | Kubernetes | Cert-Manager | Prometheus-Operator |
|------------------------|----------------| ------------ |---------------------|
| v0.107.0 | v1.23 to v1.30 | v1 | v0.75.0 |
| v0.106.0 | v1.23 to v1.30 | v1 | v0.75.0 |
| v0.105.0 | v1.23 to v1.30 | v1 | v0.74.0 |
| v0.104.0 | v1.23 to v1.30 | v1 | v0.74.0 |
Expand All @@ -780,7 +781,6 @@ The OpenTelemetry Operator _might_ work on versions outside of the given range,
| v0.87.0 | v1.23 to v1.28 | v1 | v0.68.0 |
| v0.86.0 | v1.23 to v1.28 | v1 | v0.68.0 |
| v0.85.0 | v1.19 to v1.28 | v1 | v0.67.1 |
| v0.84.0 | v1.19 to v1.28 | v1 | v0.67.1 |

## Contributing and Developing

Expand Down
16 changes: 8 additions & 8 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ In order to have more people comfortable with the release process, and in order

The operator should be released within a week after the [OpenTelemetry collector release](https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/release.md#release-schedule).

| Version | Release manager |
|----------|-----------------|
| v0.107.0 | @TylerHelmuth |
| v0.108.0 | @jaronoff97 |
| v0.109.0 | @swiatekm |
| v0.110.0 | @frzifus |
| v0.111.0 | @yuriolisa |
| v0.112.0 | @pavolloffay |
| Version | Release manager |
|-----------|-----------------|
| v0.108.0 | @TylerHelmuth |
| v0.109.0 | @jaronoff97 |
| v0.110.0 | @swiatekm |
| v0.111.0 | @frzifus |
| v0.112.0 | @yuriolisa |
| v0.113.0 | @pavolloffay |
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@ metadata:
categories: Logging & Tracing,Monitoring
certified: "false"
containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator
createdAt: "2024-08-07T08:29:24Z"
createdAt: "2024-08-14T11:18:29Z"
description: Provides the OpenTelemetry components, including the Collector
operators.operatorframework.io/builder: operator-sdk-v1.29.0
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
repository: github.com/open-telemetry/opentelemetry-operator
support: OpenTelemetry Community
name: opentelemetry-operator.v0.106.0
name: opentelemetry-operator.v0.107.0
namespace: placeholder
spec:
apiservicedefinitions: {}
Expand Down Expand Up @@ -504,7 +504,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: spec.serviceAccountName
image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.106.0
image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.107.0
livenessProbe:
httpGet:
path: /healthz
Expand Down Expand Up @@ -612,7 +612,7 @@ spec:
minKubeVersion: 1.23.0
provider:
name: OpenTelemetry Community
version: 0.106.0
version: 0.107.0
webhookdefinitions:
- admissionReviewVersions:
- v1alpha1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@ metadata:
categories: Logging & Tracing,Monitoring
certified: "false"
containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator
createdAt: "2024-08-07T08:29:28Z"
createdAt: "2024-08-14T11:18:33Z"
description: Provides the OpenTelemetry components, including the Collector
operators.operatorframework.io/builder: operator-sdk-v1.29.0
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
repository: github.com/open-telemetry/opentelemetry-operator
support: OpenTelemetry Community
name: opentelemetry-operator.v0.106.0
name: opentelemetry-operator.v0.107.0
namespace: placeholder
spec:
apiservicedefinitions: {}
Expand Down Expand Up @@ -508,7 +508,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: spec.serviceAccountName
image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.106.0
image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.107.0
livenessProbe:
httpGet:
path: /healthz
Expand Down Expand Up @@ -616,7 +616,7 @@ spec:
minKubeVersion: 1.23.0
provider:
name: OpenTelemetry Community
version: 0.106.0
version: 0.107.0
webhookdefinitions:
- admissionReviewVersions:
- v1alpha1
Expand Down
8 changes: 7 additions & 1 deletion tests/e2e-openshift/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ RUN mkdir -p /tmp/go/bin $GOCACHE \
&& chmod -R 777 /tmp/go/bin $GOPATH $GOCACHE

# Install dependencies required by test cases and debugging
RUN apt-get update && apt-get install -y jq vim libreadline-dev
RUN apt-get update && apt-get install -y jq vim libreadline-dev unzip

# Install kuttl e2e
RUN curl -LO https://github.com/kudobuilder/kuttl/releases/download/v0.15.0/kubectl-kuttl_0.15.0_linux_x86_64 \
Expand All @@ -34,5 +34,11 @@ RUN curl -LO https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/la
&& chmod +x oc kubectl \
&& mv oc kubectl /usr/local/bin/

# Install the latest version of logcli
RUN curl -LO https://github.com/grafana/loki/releases/latest/download/logcli-linux-amd64.zip \
&& unzip logcli-linux-amd64.zip \
&& chmod +x logcli-linux-amd64 \
&& mv logcli-linux-amd64 /usr/local/bin/logcli

# Set the working directory
WORKDIR /tmp/opentelemetry-operator
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
apiVersion: chainsaw.kyverno.io/v1alpha1
kind: Test
metadata:
name: export-to-cluster-logging-lokistack
spec:
namespace: chainsaw-incllogs
description: Tests shipping of logs to OpenShift in-cluster Logging LokiStack instance using OpenTelemetry collector. The tests requires the Loki, OpenTelemetry and Cluster Observability Operator to be installed along with logcli
steps:
- name: Create the OTEL collector instance
try:
- apply:
file: otel-collector.yaml
- assert:
file: otel-collector-assert.yaml
- name: Install Minio instance
try:
- apply:
file: install-minio.yaml
- assert:
file: install-minio-assert.yaml
- name: Create the LokiStack instance
try:
- apply:
file: install-loki.yaml
- assert:
file: install-loki-assert.yaml
- name: Check the status of LokiStack instance
try:
- script:
timeout: 5m
content: kubectl get --namespace openshift-logging lokistacks logging-loki -o jsonpath='{.status.conditions[?(@.type=="Ready")].status}'
- name: Enable Logging UI. Not needed by test but can be used for debugging
try:
- apply:
file: logging-uiplugin.yaml
- assert:
file: logging-uiplugin-assert.yaml
- name: Generate logs
try:
- apply:
file: generate-logs.yaml
- assert:
file: generate-logs-assert.yaml
- name: Check logs in LokiStack instance
try:
- script:
timeout: 5m
content: ./check_logs.sh
cleanup:
- delete:
ref:
apiVersion: loki.grafana.com/v1
kind: LokiStack
name: logging-loki
namespace: openshift-logging
- delete:
ref:
apiVersion: v1
kind: PersistentVolumeClaim
labels:
app.kubernetes.io/instance: "logging-loki"
namespace: openshift-logging
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

TOKEN=$(oc -n openshift-logging create token otel-collector-deployment)
LOKI_URL=$(oc -n openshift-logging get route logging-loki -o json | jq '.spec.host' -r)

while true; do
LOG_OUTPUT=$(logcli -o raw --tls-skip-verify \
--bearer-token="${TOKEN}" \
--addr "https://${LOKI_URL}/api/logs/v1/application" query '{log_type="application"}')

if echo "$LOG_OUTPUT" | jq -e '
. as $root |
select(
.body == "the message" and
.severity == "Info" and
.attributes.app == "server" and
.resources."k8s.container.name" == "telemetrygen" and
.resources."k8s.namespace.name" == "chainsaw-incllogs"
)
' > /dev/null; then
echo "Logs found:"
break
else
echo "Logs not found. Continuing to check..."
sleep 5
fi
done
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: batch/v1
kind: Job
metadata:
name: telemetrygen
namespace: chainsaw-incllogs
status:
active: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: batch/v1
kind: Job
metadata:
name: telemetrygen
namespace: chainsaw-incllogs
spec:
template:
spec:
containers:
- name: telemetrygen
image: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:v0.106.1
args:
- logs
- --otlp-endpoint=otel-collector.openshift-logging.svc.cluster.local:4317
- --otlp-insecure
- --workers=1
- --duration=120s
- --otlp-attributes=k8s.container.name="telemetrygen"
restartPolicy: Never
backoffLimit: 4
Loading

0 comments on commit 2fc8b80

Please sign in to comment.