@@ -299,7 +299,7 @@ func checkExistingRuntimes(ctx context.Context, runtime string) error {
299299 return fmt .Errorf ("runtime \" %s\" already exists" , runtime )
300300}
301301
302- func createPlatformClientInRuntime (ctx context.Context , opts * ValidateLimitsOptions ) (codefresh.Codefresh , error ) {
302+ func createPlatformClientInRuntime (ctx context.Context , opts * HelmValidateValuesOptions ) (codefresh.Codefresh , error ) {
303303 var cfClient codefresh.Codefresh
304304 valuesFile , err := opts .helm .GetValues (opts .valuesFile , ! opts .hook )
305305 if err != nil {
@@ -314,7 +314,7 @@ func createPlatformClientInRuntime(ctx context.Context, opts *ValidateLimitsOpti
314314 runtimeToken , _ := kubeutil .GetValueFromSecret (ctx , opts .kubeFactory , opts .namespace , store .Get ().CFTokenSecret , "token" )
315315 if runtimeToken != "" {
316316 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 )
318318 if err != nil {
319319 return nil , err
320320 }
@@ -336,13 +336,13 @@ func createPlatformClientInRuntime(ctx context.Context, opts *ValidateLimitsOpti
336336 return nil , errors .New ("userToken must contain either a \" token\" field, or a \" secretKeyRef\" " )
337337 }
338338
339- userToken , err = getValueFromSecretKeyRef (ctx , & opts . HelmValidateValuesOptions , secretKeyRef )
339+ userToken , err = getValueFromSecretKeyRef (ctx , opts , secretKeyRef )
340340 if err != nil {
341341 return nil , fmt .Errorf ("failed getting user token from secretKeyRef: %w" , err )
342342 }
343343 }
344344
345- cfClient , err = getPlatformClient (ctx , & opts . HelmValidateValuesOptions , codefreshValues , userToken )
345+ cfClient , err = getPlatformClient (ctx , opts , codefreshValues , userToken )
346346 if err != nil {
347347 return nil , fmt .Errorf ("failed creating codefresh client using user token: %w" , err )
348348 }
0 commit comments