5.3. サイドカーコンテナーの手動挿入
Deployments 以外のコントローラータイプ (StatefulSets、DaemonSet など) の場合、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
その後、Jaeger エージェントは localhost のデフォルトの場所でアクセスできます。