第11章 移行
Red Hat OpenShift 分散トレースプラットフォーム(Jaeger) 3.5 は、Red Hat がサポートする予定の Red Hat OpenShift 分散トレースプラットフォーム(Jaeger)の最後のリリースです。
Red Hat OpenShift 分散トレースプラットフォーム 3.5 では、Jaeger および Elasticsearch のサポートは非推奨となりました。
Red Hat OpenShift 分散トレースプラットフォーム(Jaeger)のサポートは 2025 年 11 月 3 日に終了します。
Red Hat OpenShift 分散トレースプラットフォーム Operator (Jaeger)は、2025 年 11 月 3 日に redhat-operators
カタログから削除されます。詳細は、Red Hat ナレッジベースソリューション Jaeger Deprecation and Removal in OpenShift を参照してください。
分散トレーシングの収集と保存を行うには、Red Hat build of OpenTelemetry Operator と Tempo Operator に移行する必要があります。詳細は、Red Hat build of OpenTelemetry ドキュメントの「移行」、Red Hat build of OpenTelemetry ドキュメントの「インストール」、および distributed tracing platform (Tempo) ドキュメントの「インストール」を参照してください。
アプリケーションに Red Hat OpenShift distributed tracing platform (Jaeger) をすでに使用している場合は、OpenTelemetry オープンソースプロジェクトに基づく Red Hat build of OpenTelemetry に移行できます。
Red Hat build of OpenTelemetry は、分散システムでの可観測性を促進するための API、ライブラリー、エージェント、およびインストルメンテーションのセットを提供します。Red Hat build of OpenTelemetry に含まれる OpenTelemetry Collector は、Jaeger プロトコルを取り込めるため、アプリケーションの SDK を変更する必要はありません。
distributed tracing platform (Jaeger) から Red Hat build of OpenTelemetry に移行するには、トレースをシームレスにレポートするように OpenTelemetry Collector とアプリケーションを設定する必要があります。サイドカーおよびサイドカーレスデプロイメントを移行できます。
11.1. サイドカーを使った移行
Red Hat build of OpenTelemetry Operator は、デプロイメントワークロードへのサイドカー注入をサポートしているため、distributed tracing platform (Jaeger) サイドカーから Red Hat build of OpenTelemetry サイドカーに移行できます。
前提条件
- Red Hat OpenShift distributed tracing platform (Jaeger) がクラスターで使用されている。
- Red Hat build of OpenTelemetry がインストールされている。
手順
OpenTelemetry Collector をサイドカーとして設定します。
apiVersion: opentelemetry.io/v1beta1 kind: OpenTelemetryCollector metadata: name: otel namespace: <otel-collector-namespace> spec: mode: sidecar config: receivers: jaeger: protocols: grpc: {} thrift_binary: {} thrift_compact: {} thrift_http: {} processors: batch: {} memory_limiter: check_interval: 1s limit_percentage: 50 spike_limit_percentage: 30 resourcedetection: detectors: [openshift] timeout: 2s exporters: otlp: endpoint: "tempo-<example>-gateway:8090" 1 tls: insecure: true service: pipelines: traces: receivers: [jaeger] processors: [memory_limiter, resourcedetection, batch] exporters: [otlp]
- 1
- このエンドポイントは、
<example>
Tempo Operator を使用してデプロイされた TempoStack インスタンスのゲートウェイを指します。
アプリケーションを実行するためのサービスアカウントを作成します。
apiVersion: v1 kind: ServiceAccount metadata: name: otel-collector-sidecar
一部のプロセッサーで必要な権限のためのクラスターロールを作成します。
apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: otel-collector-sidecar rules: 1 - apiGroups: ["config.openshift.io"] resources: ["infrastructures", "infrastructures/status"] verbs: ["get", "watch", "list"]
- 1
resourcedetectionprocessor
には、インフラストラクチャーとインフラストラクチャー/ステータスに対する権限が必要です。
ClusterRoleBinding
を作成して、サービスアカウントの権限を設定します。apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: otel-collector-sidecar subjects: - kind: ServiceAccount name: otel-collector-deployment namespace: otel-collector-example roleRef: kind: ClusterRole name: otel-collector apiGroup: rbac.authorization.k8s.io
- OpenTelemetry Collector をサイドカーとしてデプロイします。
-
Deployment
オブジェクトから"sidecar.jaegertracing.io/inject": "true"
アノテーションを削除することで、注入された Jaeger Agent をアプリケーションから削除します。 -
sidecar.opentelemetry.io/inject: "true"
アノテーションをDeployment
オブジェクトの.spec.template.metadata.annotations
フィールドに追加して、OpenTelemetry サイドカーの自動注入を有効にします。 - 作成したサービスアカウントをアプリケーションのデプロイメントに使用します。そうすることで、プロセッサーは正しい情報を取得してトレースに追加できます。