3.2.6.2. サイドカーコンテナーの手動挿入
Red Hat OpenShift 分散トレースプラットフォーム Operator は、Jaeger Agent サイドカーを Deployment ワークロードに自動的に挿入することしかできません。Deployments
以外 (StatefulSets、DaemonSets
など) のコントローラータイプの場合、仕様で Jaeger エージェントサイドカーを手動で定義できます。
以下のスニペットは、Jaeger エージェントサイドカーのコンテナーセクションに追加できる手動の定義を示しています。
StatefulSet
のサイドカー定義の例
apiVersion: apps/v1 kind: StatefulSet metadata: name: example-statefulset namespace: example-ns labels: app: example-app spec: spec: containers: - name: example-app image: acme/myapp:myversion ports: - containerPort: 8080 protocol: TCP - name: jaeger-agent image: registry.redhat.io/distributed-tracing/jaeger-agent-rhel7:<version> # The agent version must match the Operator version imagePullPolicy: IfNotPresent ports: - containerPort: 5775 name: zk-compact-trft protocol: UDP - containerPort: 5778 name: config-rest protocol: TCP - containerPort: 6831 name: jg-compact-trft protocol: UDP - containerPort: 6832 name: jg-binary-trft protocol: UDP - containerPort: 14271 name: admin-http protocol: TCP args: - --reporter.grpc.host-port=dns:///jaeger-collector-headless.example-ns:14250 - --reporter.type=grpc
その後、エージェントは localhost のデフォルトの場所でアクセスできます。