3.2.6.2. 수동으로 사이드카 삽입

Red Hat OpenShift distributed tracing platform Operator는 Jaeger 에이전트 사이드카를 배포 워크로드에 자동으로 삽입할 수 있습니다. 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의 기본 위치에서 에이전트에 액세스할 수 있습니다.