Skip to content

Commit

Permalink
Merge pull request open-telemetry#100 from IshwarKanse/rebase-bot-main
Browse files Browse the repository at this point in the history
  • Loading branch information
openshift-merge-bot[bot] authored Nov 12, 2024
2 parents 1b0fee6 + 7b1b700 commit e14e1dd
Show file tree
Hide file tree
Showing 49 changed files with 811 additions and 199 deletions.
16 changes: 0 additions & 16 deletions .chloggen/2779-kubeletstatsreiver-inject-en-vars.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions .chloggen/2947-updating-ds-sf-depl-mutation.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions .chloggen/3332-musl-python-autoinstrumentation.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions .chloggen/scrape-config-probe.yaml

This file was deleted.

13 changes: 0 additions & 13 deletions .github/workflows/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,3 @@ jobs:
run: |
make chlog-validate \
|| { echo "New ./.chloggen/*.yaml file failed validation."; exit 1; }
# In order to validate any links in the yaml file, render the config to markdown
- name: Render .chloggen changelog entries
run: make chlog-preview > changelog_preview.md
- name: Install markdown-link-check
run: npm install -g markdown-link-check
- name: Run markdown-link-check
run: |
markdown-link-check \
--verbose \
--config .github/workflows/check_links_config.json \
changelog_preview.md \
|| { echo "Check that anchor links are lowercase"; exit 1; }
2 changes: 0 additions & 2 deletions .github/workflows/continuous-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ jobs:
with:
path: |
/home/runner/.cache/golangci-lint
/home/runner/go/pkg/mod
./bin
key: golangcilint-${{ hashFiles('**/go.sum') }}
restore-keys: |
golangcilint-
Expand Down
Empty file added .linkspector.yml
Empty file.
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,36 @@

<!-- next version -->

## 0.113.0

### 💡 Enhancements 💡

- `operator`: Programmatically create the `ServiceMonitor` for the operator metrics endpoint, ensuring correct namespace handling and dynamic configuration. (#3370)
Previously, the `ServiceMonitor` was created statically from a manifest file, causing failures when the
operator was deployed in a non-default namespace. This enhancement ensures automatic adjustment of the
`serverName` and seamless metrics scraping.
- `collector`: Create RBAC rules for the k8s_events receiver automatically. (#3420)
- `collector`: Inject environment K8S_NODE_NAME environment variable for the Kubelet Stats Receiver. (#2779)
- `auto-instrumentation`: add config for installing musl based auto-instrumentation for Python (#2264)
- `auto-instrumentation`: Support `http/json` and `http/protobuf` via OTEL_EXPORTER_OTLP_PROTOCOL environment variable in addition to default `grpc` for exporting traces (#3412)
- `target allocator`: enables support for pulling scrape config and probe CRDs in the target allocator (#1842)

### 🧰 Bug fixes 🧰

- `collector`: Fix mutation of deployments, statefulsets, and daemonsets allowing to remove fields on update (#2947)

### Components

* [OpenTelemetry Collector - v0.113.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.113.0)
* [OpenTelemetry Contrib - v0.113.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.113.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.53.0](https://github.com/open-telemetry/opentelemetry-js/releases/tag/experimental%2Fv0.53.0)
* [Python - v0.48b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.48b0)
* [Go - v0.17.0-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.17.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.112.0

### 💡 Enhancements 💡
Expand Down
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -206,12 +206,20 @@ add-rbac-permissions-to-operator: manifests kustomize
# This folder is ignored by .gitignore
mkdir -p config/rbac/extra-permissions-operator
cp -r tests/e2e-automatic-rbac/extra-permissions-operator/* config/rbac/extra-permissions-operator
cd config/rbac && $(KUSTOMIZE) edit add patch --kind ClusterRole --name manager-role --path extra-permissions-operator/cronjobs.yaml
cd config/rbac && $(KUSTOMIZE) edit add patch --kind ClusterRole --name manager-role --path extra-permissions-operator/daemonsets.yaml
cd config/rbac && $(KUSTOMIZE) edit add patch --kind ClusterRole --name manager-role --path extra-permissions-operator/events.yaml
cd config/rbac && $(KUSTOMIZE) edit add patch --kind ClusterRole --name manager-role --path extra-permissions-operator/extensions.yaml
cd config/rbac && $(KUSTOMIZE) edit add patch --kind ClusterRole --name manager-role --path extra-permissions-operator/namespaces.yaml
cd config/rbac && $(KUSTOMIZE) edit add patch --kind ClusterRole --name manager-role --path extra-permissions-operator/namespaces-status.yaml
cd config/rbac && $(KUSTOMIZE) edit add patch --kind ClusterRole --name manager-role --path extra-permissions-operator/nodes.yaml
cd config/rbac && $(KUSTOMIZE) edit add patch --kind ClusterRole --name manager-role --path extra-permissions-operator/nodes-stats.yaml
cd config/rbac && $(KUSTOMIZE) edit add patch --kind ClusterRole --name manager-role --path extra-permissions-operator/nodes-proxy.yaml
cd config/rbac && $(KUSTOMIZE) edit add patch --kind ClusterRole --name manager-role --path extra-permissions-operator/nodes-spec.yaml
cd config/rbac && $(KUSTOMIZE) edit add patch --kind ClusterRole --name manager-role --path extra-permissions-operator/pod-status.yaml
cd config/rbac && $(KUSTOMIZE) edit add patch --kind ClusterRole --name manager-role --path extra-permissions-operator/rbac.yaml
cd config/rbac && $(KUSTOMIZE) edit add patch --kind ClusterRole --name manager-role --path extra-permissions-operator/replicaset.yaml
cd config/rbac && $(KUSTOMIZE) edit add patch --kind ClusterRole --name manager-role --path extra-permissions-operator/replicationcontrollers.yaml
cd config/rbac && $(KUSTOMIZE) edit add patch --kind ClusterRole --name manager-role --path extra-permissions-operator/resourcequotas.yaml

.PHONY: enable-targetallocator-cr
enable-targetallocator-cr:
Expand Down
4 changes: 2 additions & 2 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ The operator should be released within a week after the [OpenTelemetry collector

| Version | Release manager |
|----------|-----------------|
| v0.113.0 | @pavolloffay |
| v0.114.0 | @TylerHelmuth |
| v0.115.0 | @jaronoff97 |
| v0.116.0 | @swiatekm |
| v0.117.0 | @iblancasa |
| v0.118.0 | @frzifus |
| v0.119.0 | @yuriolisa |
| v0.119.0 | @yuriolisa |
| v0.120.0 | @pavolloffay |
2 changes: 1 addition & 1 deletion autoinstrumentation/dotnet/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.8.0
1.9.0
22 changes: 20 additions & 2 deletions autoinstrumentation/nodejs/src/autoinstrumentation.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { getNodeAutoInstrumentations } from '@opentelemetry/auto-instrumentations-node';
import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-grpc';
import { OTLPTraceExporter as OTLPProtoTraceExporter } from '@opentelemetry/exporter-trace-otlp-proto';
import { OTLPTraceExporter as OTLPHttpTraceExporter } from '@opentelemetry/exporter-trace-otlp-http';
import { OTLPTraceExporter as OTLPGrpcTraceExporter } from '@opentelemetry/exporter-trace-otlp-grpc';
import { OTLPMetricExporter } from '@opentelemetry/exporter-metrics-otlp-grpc';
import { PrometheusExporter } from '@opentelemetry/exporter-prometheus';
import { PeriodicExportingMetricReader } from '@opentelemetry/sdk-metrics';
Expand All @@ -12,6 +14,22 @@ import { diag } from '@opentelemetry/api';

import { NodeSDK } from '@opentelemetry/sdk-node';

function getTraceExporter() {
let protocol = process.env.OTEL_EXPORTER_OTLP_PROTOCOL;
switch (protocol) {
case undefined:
case '':
case 'grpc':
return new OTLPGrpcTraceExporter();
case 'http/json':
return new OTLPHttpTraceExporter();
case 'http/protobuf':
return new OTLPProtoTraceExporter();
default:
throw Error(`Creating traces exporter based on "${protocol}" protocol (configured via environment variable OTEL_EXPORTER_OTLP_PROTOCOL) is not implemented!`);
}
}

function getMetricReader() {
switch (process.env.OTEL_METRICS_EXPORTER) {
case undefined:
Expand All @@ -35,7 +53,7 @@ function getMetricReader() {
const sdk = new NodeSDK({
autoDetectResources: true,
instrumentations: [getNodeAutoInstrumentations()],
traceExporter: new OTLPTraceExporter(),
traceExporter: getTraceExporter(),
metricReader: getMetricReader(),
resourceDetectors:
[
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-10-30T17:23:26Z"
createdAt: "2024-11-08T09:36:39Z"
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.112.0
name: opentelemetry-operator.v0.113.0
namespace: placeholder
spec:
apiservicedefinitions: {}
Expand Down Expand Up @@ -483,7 +483,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: spec.serviceAccountName
image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.112.0
image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.113.0
livenessProbe:
httpGet:
path: /healthz
Expand Down Expand Up @@ -591,7 +591,7 @@ spec:
minKubeVersion: 1.23.0
provider:
name: OpenTelemetry Community
version: 0.112.0
version: 0.113.0
webhookdefinitions:
- admissionReviewVersions:
- v1alpha1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
apiVersion: v1
kind: Service
metadata:
annotations:
service.beta.openshift.io/serving-cert-secret-name: opentelemetry-operator-metrics
creationTimestamp: null
labels:
app.kubernetes.io/name: opentelemetry-operator
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
labels:
app.kubernetes.io/managed-by: operator-lifecycle-manager
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/part-of: opentelemetry-operator
name: opentelemetry-operator-prometheus-rules
spec:
groups:
- name: opentelemetry-operator-monitoring.rules
rules:
- expr: sum by (type) (opentelemetry_collector_receivers)
record: type:opentelemetry_collector_receivers:sum
- expr: sum by (type) (opentelemetry_collector_exporters)
record: type:opentelemetry_collector_exporters:sum
- expr: sum by (type) (opentelemetry_collector_processors)
record: type:opentelemetry_collector_processors:sum
- expr: sum by (type) (opentelemetry_collector_extensions)
record: type:opentelemetry_collector_extensions:sum
- expr: sum by (type) (opentelemetry_collector_connectors)
record: type:opentelemetry_collector_connectors:sum
- expr: sum by (type) (opentelemetry_collector_info)
record: type:opentelemetry_collector_info:sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: opentelemetry-operator-prometheus
rules:
- apiGroups:
- ""
resources:
- services
- endpoints
- pods
verbs:
- get
- list
- watch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: opentelemetry-operator-prometheus
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: opentelemetry-operator-prometheus
subjects:
- kind: ServiceAccount
name: prometheus-k8s
namespace: openshift-monitoring
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-10-30T17:23:26Z"
createdAt: "2024-11-08T09:36:43Z"
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.112.0
name: opentelemetry-operator.v0.113.0
namespace: placeholder
spec:
apiservicedefinitions: {}
Expand Down Expand Up @@ -479,15 +479,15 @@ spec:
- --zap-time-encoding=rfc3339nano
- --enable-nginx-instrumentation=true
- --enable-go-instrumentation=true
- --enable-multi-instrumentation=true
- --openshift-create-dashboard=true
- --feature-gates=+operator.observability.prometheus
- --enable-cr-metrics=true
env:
- name: SERVICE_ACCOUNT_NAME
valueFrom:
fieldRef:
fieldPath: spec.serviceAccountName
image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.112.0
image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.113.0
livenessProbe:
httpGet:
path: /healthz
Expand Down Expand Up @@ -518,6 +518,10 @@ spec:
- --upstream=http://127.0.0.1:8080/
- --logtostderr=true
- --v=0
- --tls-cert-file=/var/run/tls/server/tls.crt
- --tls-private-key-file=/var/run/tls/server/tls.key
- --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_128_GCM_SHA256,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_CBC_SHA256
- --tls-min-version=VersionTLS12
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.1
name: kube-rbac-proxy
ports:
Expand All @@ -531,9 +535,16 @@ spec:
requests:
cpu: 5m
memory: 64Mi
volumeMounts:
- mountPath: /var/run/tls/server
name: opentelemetry-operator-metrics-cert
serviceAccountName: opentelemetry-operator-controller-manager
terminationGracePeriodSeconds: 10
volumes:
- name: opentelemetry-operator-metrics-cert
secret:
defaultMode: 420
secretName: opentelemetry-operator-metrics
- name: cert
secret:
defaultMode: 420
Expand Down Expand Up @@ -595,7 +606,7 @@ spec:
minKubeVersion: 1.23.0
provider:
name: OpenTelemetry Community
version: 0.112.0
version: 0.113.0
webhookdefinitions:
- admissionReviewVersions:
- v1alpha1
Expand Down
2 changes: 0 additions & 2 deletions config/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ bases:
- ../manager
- ../webhook
- ../certmanager
# [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'.
#- ../prometheus

patchesStrategicMerge:
# Protect the /metrics endpoint by putting it behind auth.
Expand Down
4 changes: 4 additions & 0 deletions config/overlays/openshift/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ patches:
kind: Deployment
name: controller-manager
path: manager-patch.yaml

patchesStrategicMerge:
- metrics_service_tls_patch.yaml
- manager_auth_proxy_tls_patch.yaml
Loading

0 comments on commit e14e1dd

Please sign in to comment.