Skip to content

Commit

Permalink
Create daemonsets after services and deployments. (#1176)
Browse files Browse the repository at this point in the history
Signed-off-by: Juraci Paixão Kröhling <[email protected]>
  • Loading branch information
jpkrohling authored Sep 7, 2020
1 parent 78546cd commit 8be4c6b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pkg/controller/jaeger/jaeger_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}

0 comments on commit 8be4c6b

Please sign in to comment.