@@ -87,11 +87,6 @@ type Options struct {
87
87
88
88
// RenewalBackoffConfig configures the exponential backoff applied to certificate renewal failures.
89
89
RenewalBackoffConfig * wait.Backoff
90
- // IssueRenewalTimeout defines timeout value for each issue() call in renewal process
91
- IssueRenewalTimeout time.Duration
92
- // IssuePollInterval defines an interval time for each subroutine call (check CSR status) within issue() function
93
- // Note, the IssuePollInterval should be less than IssueRenewalTimeout
94
- IssuePollInterval time.Duration
95
90
}
96
91
97
92
// NewManager constructs a new manager used to manage volumes containing
@@ -153,16 +148,6 @@ func NewManager(opts Options) (*Manager, error) {
153
148
if opts .MaxRequestsPerVolume < 0 {
154
149
return nil , errors .New ("MaxRequestsPerVolume cannot be less than zero" )
155
150
}
156
- if opts .IssueRenewalTimeout == 0 {
157
- opts .IssueRenewalTimeout = 10 * time .Second
158
- }
159
- if opts .IssuePollInterval == 0 {
160
- opts .IssuePollInterval = time .Second
161
- }
162
- if opts .IssuePollInterval >= opts .IssueRenewalTimeout {
163
- return nil , errors .New ("IssuePollInterval should be less than IssueRenewalTimeout" )
164
- }
165
- // Check IssuePollInterval is less than IssueRenewalTimeout
166
151
if len (opts .NodeID ) == 0 {
167
152
return nil , errors .New ("NodeID must be set" )
168
153
}
@@ -204,8 +189,7 @@ func NewManager(opts Options) (*Manager, error) {
204
189
maxRequestsPerVolume : opts .MaxRequestsPerVolume ,
205
190
nodeNameHash : nodeNameHash ,
206
191
backoffConfig : * opts .RenewalBackoffConfig ,
207
- issueRenewalTimeout : opts .IssueRenewalTimeout ,
208
- issuePollInterval : opts .IssuePollInterval ,
192
+ issueRenewalTimeout : time .Second * 60 , // issueRenewalTimeout set to align with NodePublishVolume timeout value
209
193
requestNameGenerator : func () string {
210
194
return string (uuid .NewUUID ())
211
195
},
@@ -310,9 +294,6 @@ type Manager struct {
310
294
311
295
// issueRenewalTimeout defines timeout value for each issue() call in renewal process
312
296
issueRenewalTimeout time.Duration
313
- // issuePollInterval defines an interval time for each subroutine call (check CSR status) within issue() function
314
- // Note, the issuePollInterval should be less than issueRenewalTimeout
315
- issuePollInterval time.Duration
316
297
317
298
// requestNameGenerator generates a new random name for a certificaterequest object
318
299
// Defaults to uuid.NewUUID() from k8s.io/apimachinery/pkg/util/uuid.
@@ -364,7 +345,7 @@ func (m *Manager) issue(ctx context.Context, volumeID string) error {
364
345
365
346
// Poll every 1s for the CertificateRequest to be ready
366
347
lastFailureReason := ""
367
- if err := wait .PollUntilWithContext (ctx , m . issuePollInterval , func (ctx context.Context ) (done bool , err error ) {
348
+ if err := wait .PollUntilWithContext (ctx , time . Second , func (ctx context.Context ) (done bool , err error ) {
368
349
updatedReq , err := m .lister .CertificateRequests (req .Namespace ).Get (req .Name )
369
350
if apierrors .IsNotFound (err ) {
370
351
// A NotFound error implies something deleted the resource - fail
0 commit comments