Skip to content

Commit

Permalink
Fix bug when skipping certificate if used by pods created during same…
Browse files Browse the repository at this point in the history
… reconcile
  • Loading branch information
SaaldjorMike committed Dec 12, 2024
1 parent 85762b7 commit 02b9df6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions controllers/humiocluster_pods.go
Original file line number Diff line number Diff line change
Expand Up @@ -898,13 +898,18 @@ func findHumioNodeNameAndCertHash(ctx context.Context, c client.Client, hnp *Hum
return podNameAndCertificateHash{}, err
}
for _, certificate := range certificates {
certificateUsedByNewlyCreatedPods := false
for _, newPod := range newlyCreatedPods {
if certificate.Name == newPod.Name {
// ignore any certificates that matches names of pods we've just created
continue
certificateUsedByNewlyCreatedPods = true
}
}

if certificateUsedByNewlyCreatedPods {
// ignore any certificates that matches names of pods we've just created
continue
}

if certificate.Spec.Keystores == nil {
// ignore any certificates that does not hold a keystore bundle
continue
Expand Down

0 comments on commit 02b9df6

Please sign in to comment.