Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Do not update service account when it is already created.
Updating tuned ServiceAccount leads to a creation of new secrets,
which accumulate in openshift-cluster-node-tuning-operator namespace.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1714484
  • Loading branch information
jmencak committed May 28, 2019
1 parent 1bab5dc commit 991e19b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions pkg/controller/tuned/tuned_controller.go
Expand Up @@ -120,11 +120,8 @@ func (r *ReconcileTuned) syncServiceAccount(tuned *tunedv1.Tuned) error {
return fmt.Errorf("Failed to get ServiceAccount: %v\n", err)
}
} else {
glog.V(2).Infof("Tuned ServiceAccount already exists, updating")
err = r.client.Update(context.TODO(), saManifest)
if err != nil {
return fmt.Errorf("Couldn't update tuned ServiceAccount: %v", err)
}
// Do not update service account as it leads to accumulating secrets; see BZ1714484
glog.V(2).Infof("Tuned ServiceAccount already exists, skipping update")
}

return nil
Expand Down

0 comments on commit 991e19b

Please sign in to comment.