Skip to content

Commit c913514

Browse files
authored
Merge pull request #32 from JoshVanL/manager-pass-ctx
Use a passed through context to manager issue function
2 parents 213ec03 + 0970f5a commit c913514

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

manager/manager.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,7 @@ type Manager struct {
243243
}
244244

245245
// issue will step through the entire issuance flow for a volume.
246-
func (m *Manager) issue(volumeID string) error {
247-
ctx := context.TODO()
246+
func (m *Manager) issue(ctx context.Context, volumeID string) error {
248247
log := m.log.WithValues("volume_id", volumeID)
249248
log.Info("Processing issuance")
250249

@@ -512,7 +511,7 @@ func (m *Manager) ManageVolume(volumeID string) error {
512511
Cap: time.Minute,
513512
}, func() (bool, error) {
514513
log.Info("Triggering new issuance")
515-
if err := m.issue(volumeID); err != nil {
514+
if err := m.issue(ctx, volumeID); err != nil {
516515
log.Error(err, "Failed to issue certificate, retrying after applying exponential backoff")
517516
return false, nil
518517
}

0 commit comments

Comments
 (0)