Skip to content

Commit 5676b1b

Browse files
committed
chore: apply suggestions from code review
Signed-off-by: Peter Wilcsinszky <[email protected]>
1 parent e100a7c commit 5676b1b

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

pkg/resources/model/reconciler.go

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -227,18 +227,15 @@ func NewValidationReconciler(
227227
resources.Logging.Status.Problems = append(resources.Logging.Status.Problems, problem)
228228
}
229229

230-
checkResults := resources.Logging.Status.ConfigCheckResults
231-
if len(checkResults) > 0 {
232-
for hash, r := range checkResults {
233-
if !r {
234-
problem := fmt.Sprintf("Configuration with checksum %s has failed. "+
235-
"Config secrets: `kubectl get secret -n %s -l %s=%s`. "+
236-
"Configcheck pod log: `kubectl logs -n %s -l %s=%s --tail -1`",
237-
hash,
238-
resources.Logging.Spec.ControlNamespace, configcheck.HashLabel, hash,
239-
resources.Logging.Spec.ControlNamespace, configcheck.HashLabel, hash)
240-
resources.Logging.Status.Problems = append(resources.Logging.Status.Problems, problem)
241-
}
230+
for hash, r := range resources.Logging.Status.ConfigCheckResults {
231+
if !r {
232+
problem := fmt.Sprintf("Configuration with checksum %s has failed. "+
233+
"Config secrets: `kubectl get secret -n %s -l %s=%s`. "+
234+
"Configcheck pod log: `kubectl logs -n %s -l %s=%s --tail -1`",
235+
hash,
236+
resources.Logging.Spec.ControlNamespace, configcheck.HashLabel, hash,
237+
resources.Logging.Spec.ControlNamespace, configcheck.HashLabel, hash)
238+
resources.Logging.Status.Problems = append(resources.Logging.Status.Problems, problem)
242239
}
243240
}
244241

0 commit comments

Comments
 (0)