Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug when skipping certificate if used by pods created during same… #885

Merged
merged 1 commit into from
Dec 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading