jaegertracing / jaeger-operator

Jaeger Operator for Kubernetes simplifies deploying and running Jaeger on Kubernetes.
https://www.jaegertracing.io/docs/latest/operator/
Apache License 2.0
1.03k stars 344 forks source link

Option to define an image prefix #1265

Open johanneswuerbach opened 4 years ago

johanneswuerbach commented 4 years ago

At my company we mirror all externally used images to our private registry. While you can already change the individual image names used by the jaeger components, it is currently rather tedious as you need to override each component image individually.

apiVersion: jaegertracing.io/v1
kind: Jaeger
metadata:
  name: jaeger
  namespace: my-namspace
spec:
  strategy: production
  collector:
    image: internal-mirror/jaegertracing/jaeger-collector:1.19.2
  query:
    image: internal-mirror/jaegertracing/jaeger-query:1.19.2
...

Instead we would prefer to set a shared image prefix used by all images like:

apiVersion: jaegertracing.io/v1
kind: Jaeger
metadata:
  name: jaeger
  namespace: my-namspace
spec:
  strategy: production
  imagePrefix: internal-mirror/
...

If this would be contribution you would accept, I'll happily start working on it.

jpkrohling commented 4 years ago

While I see the problem, I'm not sure it's worth adding a new field to the CR. I'm leaving this open for people to comment: if more people comment that they need this, we might add it.

In the meantime: are you aware that you can override the images via the operator's CLI? You can just add --jaeger-query-image=internal-mirror/jaegertracing/jaeger-query:1.19.2 to the operator.yaml deployment definition and all CRs managed by this operator will use this image by default.

johanneswuerbach commented 4 years ago

Yes, but this still means adding the prefix individually for the all-in-one, query, collector, cronjob(s), agent images, which feels like a lot to keep track of. I would also be happy to add a CLI only option first, if that is preferred.

jpkrohling commented 4 years ago

Noted. Let's see if other people also need it, and we'll start with an operator flag instead then.

andreacoccodi commented 3 years ago

Hi all, would find it useful too, we have exactly the same requirement. Thanks

jpkrohling commented 3 years ago

@andreacoccodi, just wanted to make sure you are aware that you can override the default images via --jaeger-*-image= flags.

andreacoccodi commented 3 years ago

I know we can do that, but that also means that every time we upgrade we need to run a job to find out the tag we need to use and then run the cli to update the images. If there was a flag in the values.yaml of the operator we could set it once and forget about it.

jpkrohling commented 3 years ago

The values.yaml would be in the Helm Chart, which does sound like an appropriate place for this.