diff --git a/pkg/controller/jaeger/jaeger_controller.go b/pkg/controller/jaeger/jaeger_controller.go index f8d089434..c5ffb97c6 100644 --- a/pkg/controller/jaeger/jaeger_controller.go +++ b/pkg/controller/jaeger/jaeger_controller.go @@ -318,10 +318,6 @@ func (r *ReconcileJaeger) apply(ctx context.Context, jaeger v1.Jaeger, str strat return jaeger, tracing.HandleError(err, span) } - if err := r.applyDaemonSets(ctx, jaeger, str.DaemonSets()); err != nil { - return jaeger, tracing.HandleError(err, span) - } - // seems counter intuitive to have services created *before* deployments, // but some resources used by deployments are created by services, such as TLS certs // for the oauth proxy, if one is used @@ -358,5 +354,11 @@ func (r *ReconcileJaeger) apply(ctx context.Context, jaeger v1.Jaeger, str strat return jaeger, nil } + // we apply the daemonsets after everything else, to increase the chances of having services and deployments + // ready by the time the daemonset is started, so that it gets at least one collector to connect to + if err := r.applyDaemonSets(ctx, jaeger, str.DaemonSets()); err != nil { + return jaeger, tracing.HandleError(err, span) + } + return jaeger, nil }