11
11
IRuntimeAPI interface {
12
12
Get (ctx context.Context , name string ) (* model.Runtime , error )
13
13
List (ctx context.Context ) ([]model.Runtime , error )
14
- Create (ctx context.Context , runtimeName string ) (* model.RuntimeCreationResponse , error )
14
+ Create (ctx context.Context , runtimeName , cluster , runtimeVersion , ingressHost string , componentNames [] string ) (* model.RuntimeCreationResponse , error )
15
15
Delete (ctx context.Context , runtimeName string ) (int , error )
16
16
}
17
17
@@ -74,6 +74,7 @@ func (r *argoRuntime) Get(ctx context.Context, name string) (*model.Runtime, err
74
74
cluster
75
75
ingressHost
76
76
runtimeVersion
77
+ installationStatus
77
78
}
78
79
}
79
80
` ,
@@ -120,6 +121,7 @@ func (r *argoRuntime) List(ctx context.Context) ([]model.Runtime, error) {
120
121
cluster
121
122
ingressHost
122
123
runtimeVersion
124
+ installationStatus
123
125
}
124
126
}
125
127
}
@@ -144,20 +146,24 @@ func (r *argoRuntime) List(ctx context.Context) ([]model.Runtime, error) {
144
146
return runtimes , nil
145
147
}
146
148
147
- func (r * argoRuntime ) Create (ctx context.Context , runtimeName string ) (* model.RuntimeCreationResponse , error ) {
149
+ func (r * argoRuntime ) Create (ctx context.Context , runtimeName , cluster , runtimeVersion , ingressHost string , componentNames [] string ) (* model.RuntimeCreationResponse , error ) {
148
150
jsonData := map [string ]interface {}{
149
151
"query" : `
150
152
mutation CreateRuntime(
151
- $name : String!
153
+ $runtimeName : String!, $cluster: String!, $runtimeVersion: String!, $ingressHost: String, $componentNames: [String] !
152
154
) {
153
- runtime(name : $name ) {
155
+ runtime(runtimeName : $runtimeName, cluster: $cluster, runtimeVersion: $runtimeVersion, ingressHost: $ingressHost, componentNames: $componentNames ) {
154
156
name
155
157
newAccessToken
156
158
}
157
159
}
158
160
` ,
159
161
"variables" : map [string ]interface {}{
160
- "name" : runtimeName ,
162
+ "runtimeName" : runtimeName ,
163
+ "cluster" : cluster ,
164
+ "runtimeVersion" : runtimeVersion ,
165
+ "ingressHost" : ingressHost ,
166
+ "componentNames" : componentNames ,
161
167
},
162
168
}
163
169
0 commit comments