@@ -224,11 +224,11 @@ func getComponents(rt *runtime.Runtime, opts *RuntimeInstallOptions) []string {
224
224
return componentNames
225
225
}
226
226
227
- func createRuntimeOnPlatform (ctx context.Context , runtimeName string , server string , runtimeVersion string , ingressHost string , componentNames [] string ) (string , error ) {
228
- runtimeCreationResponse , err := cfConfig .NewClient ().V2 ().Runtime ().Create (ctx , runtimeName , server , runtimeVersion , ingressHost , componentNames )
227
+ func createRuntimeOnPlatform (ctx context.Context , opts * model. RuntimeInstallationArgs ) (string , error ) {
228
+ runtimeCreationResponse , err := cfConfig .NewClient ().V2 ().Runtime ().Create (ctx , opts )
229
229
230
230
if err != nil {
231
- return "" , fmt .Errorf ("failed to create a new runtime: %s. Error: %w" , runtimeName , err )
231
+ return "" , fmt .Errorf ("failed to create a new runtime: %s. Error: %w" , opts . RuntimeName , err )
232
232
}
233
233
234
234
return runtimeCreationResponse .NewAccessToken , nil
@@ -256,7 +256,13 @@ func RunRuntimeInstall(ctx context.Context, opts *RuntimeInstallOptions) error {
256
256
257
257
componentNames := getComponents (rt , opts )
258
258
259
- token , err := createRuntimeOnPlatform (ctx , opts .RuntimeName , server , runtimeVersion , opts .IngressHost , componentNames )
259
+ token , err := createRuntimeOnPlatform (ctx , & model.RuntimeInstallationArgs {
260
+ RuntimeName : opts .RuntimeName ,
261
+ Cluster : server ,
262
+ RuntimeVersion : runtimeVersion ,
263
+ IngressHost : & opts .IngressHost ,
264
+ ComponentNames : componentNames ,
265
+ })
260
266
261
267
if err != nil {
262
268
return fmt .Errorf ("failed to create a new runtime: %w" , err )
0 commit comments