@@ -299,7 +299,7 @@ func checkExistingRuntimes(ctx context.Context, runtime string) error {
299
299
return fmt .Errorf ("runtime \" %s\" already exists" , runtime )
300
300
}
301
301
302
- func createPlatformClientInRuntime (ctx context.Context , opts * ValidateLimitsOptions ) (codefresh.Codefresh , error ) {
302
+ func createPlatformClientInRuntime (ctx context.Context , opts * HelmValidateValuesOptions ) (codefresh.Codefresh , error ) {
303
303
var cfClient codefresh.Codefresh
304
304
valuesFile , err := opts .helm .GetValues (opts .valuesFile , ! opts .hook )
305
305
if err != nil {
@@ -314,7 +314,7 @@ func createPlatformClientInRuntime(ctx context.Context, opts *ValidateLimitsOpti
314
314
runtimeToken , _ := kubeutil .GetValueFromSecret (ctx , opts .kubeFactory , opts .namespace , store .Get ().CFTokenSecret , "token" )
315
315
if runtimeToken != "" {
316
316
log .G (ctx ).Info ("Used runtime token to validate account usage" )
317
- cfClient , err = getPlatformClient (ctx , & opts . HelmValidateValuesOptions , codefreshValues , runtimeToken )
317
+ cfClient , err = getPlatformClient (ctx , opts , codefreshValues , runtimeToken )
318
318
if err != nil {
319
319
return nil , err
320
320
}
@@ -336,13 +336,13 @@ func createPlatformClientInRuntime(ctx context.Context, opts *ValidateLimitsOpti
336
336
return nil , errors .New ("userToken must contain either a \" token\" field, or a \" secretKeyRef\" " )
337
337
}
338
338
339
- userToken , err = getValueFromSecretKeyRef (ctx , & opts . HelmValidateValuesOptions , secretKeyRef )
339
+ userToken , err = getValueFromSecretKeyRef (ctx , opts , secretKeyRef )
340
340
if err != nil {
341
341
return nil , fmt .Errorf ("failed getting user token from secretKeyRef: %w" , err )
342
342
}
343
343
}
344
344
345
- cfClient , err = getPlatformClient (ctx , & opts . HelmValidateValuesOptions , codefreshValues , userToken )
345
+ cfClient , err = getPlatformClient (ctx , opts , codefreshValues , userToken )
346
346
if err != nil {
347
347
return nil , fmt .Errorf ("failed creating codefresh client using user token: %w" , err )
348
348
}
0 commit comments