Skip to content

Commit

Permalink
Merge pull request #395 from sid8489/skip_terminating_namespace_
Browse files Browse the repository at this point in the history
fix: Skip CA Secret Upsert for Namespace in Terminating state
  • Loading branch information
akijakya authored Mar 12, 2024
2 parents 57a32f4 + 1bf95ef commit 58fed42
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/controller/vault/vault_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -2100,6 +2100,10 @@ func (r *ReconcileVault) distributeCACertificate(ctx context.Context, v *vaultv1
}

for _, namespace := range namespaceList.Items {
// Skip the namespace if it's being deleted
if namespace.DeletionTimestamp != nil {
continue
}
namespaces = append(namespaces, namespace.Name)
}
} else {
Expand Down

0 comments on commit 58fed42

Please # to comment.