Hello!
Does jaeger-operator have support for injecting sidecars into StatefulSets yet? Not sure if I am doing my annotation wrong, or if jaeger-operator still only supports deployments (I looked through other issues and documentation but it wasn't super clear to me).
If StatefulSets are not yet supported, could the documentation include an example on how to manually add the sidecar config and be clear that only Deployments are currently supported?
Thanks!
StatefulSets are not supported yet. I thought we had an example in the documentation, but looks like we don't. Here's how a sidecar in a deployment looks like:
Would you be open to improving our documentation by adding this? Perhaps a new section close to the auto-inject part, called "Manually adding sidecars"?
Thanks very much! I'll look to update the documentation later today.
You might also want to deploy the following example, and compare the deployment's state after the operator injects the sidecar:
https://github.com/jaegertracing/jaeger-operator/blob/c9147e7ec923113b2dbeafc917c8eb0070c7dc8e/deploy/examples/business-application-injected-sidecar.yaml#L1-L23
That sidecar should be the one used in the documentation, as it's more general purpose (it opens more ports). The one from my previous comment uses only one port, which is OK when you know the client that is being used.
So I gathered this sidecar definition from using the annotation with a deployment:
- name: jaeger-agent
image: jaegertracing/jaeger-agent:1.17.0
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
resources: {}
env:
- name: POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
- name: HOST_IP
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: status.hostIP
args:
- --jaeger.tags=cluster=undefined,deployment.name=[myDeployment],pod.namespace=[myNamespace],pod.name=${POD_NAME:},host.ip=${HOST_IP:},container.name=[myContainer]
- --reporter.grpc.host-port=dns:///jaeger-collector-headless.observability:14250
- --reporter.type=grpc
Should the documentation include everything except the - --jarger.tags argument since that refers to a deployment and specific namespace/container names?
Should I also change the image field to image: jaegertracing/jaeger-agent:latest instead of a specific version number?
Is there anything else that should be included?
Thanks!
I think --jaeger.tags can indeed be removed. The env vars can be removed as well, as they are used only as part of the --jaeger.tags. The empty resources node can also be removed.
Not sure about the image. @pavolloffay mentioned in a comment that it would be best to keep the right versions on the versioned doc and master for the next-release doc.
PRs opened to include a full StatefulSet example in jaegertracing/jaeger-operator and another in jaegertracing/documentation to include documentation on manual definitions with a link to the full StatefulSet example.
My question has been answered and documentation has been updated. Thanks again!