Skip to content

Commit 93c71f2

Browse files
author
Mike Rostermund
authored
Merge pull request #742 from humio/mike/sa-annotations-after-sa-creation
Ensure we update ServiceAccount annotations after ServiceAccount crea…
2 parents 0082e7d + b79c05b commit 93c71f2

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

controllers/humiocluster_controller.go

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -209,19 +209,6 @@ func (r *HumioClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request
209209
}
210210
}
211211

212-
for _, pool := range humioNodePools.Filter(NodePoolFilterHasNode) {
213-
if issueRestart, err := r.ensureHumioServiceAccountAnnotations(ctx, pool); err != nil || issueRestart {
214-
opts := statusOptions()
215-
if issueRestart {
216-
_, err = r.incrementHumioClusterPodRevision(ctx, hc, pool)
217-
}
218-
if err != nil {
219-
opts.withMessage(err.Error())
220-
}
221-
return r.updateStatus(ctx, r.Client.Status(), hc, opts.withState(hc.Status.State))
222-
}
223-
}
224-
225212
for _, fun := range []ctxHumioClusterFunc{
226213
r.ensureValidCAIssuer,
227214
r.ensureHumioClusterCACertBundle,
@@ -253,6 +240,19 @@ func (r *HumioClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request
253240
}
254241
}
255242

243+
for _, pool := range humioNodePools.Filter(NodePoolFilterHasNode) {
244+
if issueRestart, err := r.ensureHumioServiceAccountAnnotations(ctx, pool); err != nil || issueRestart {
245+
opts := statusOptions()
246+
if issueRestart {
247+
_, err = r.incrementHumioClusterPodRevision(ctx, hc, pool)
248+
}
249+
if err != nil {
250+
opts.withMessage(err.Error())
251+
}
252+
return r.updateStatus(ctx, r.Client.Status(), hc, opts.withState(hc.Status.State))
253+
}
254+
}
255+
256256
for _, pool := range humioNodePools.Filter(NodePoolFilterHasNode) {
257257
if err := r.ensurePersistentVolumeClaimsExist(ctx, hc, pool); err != nil {
258258
opts := statusOptions()

0 commit comments

Comments
 (0)