|
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, cluster, runtimeVersion, ingressHost 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 |
|
@@ -146,23 +146,24 @@ func (r *argoRuntime) List(ctx context.Context) ([]model.Runtime, error) { |
146 | 146 | return runtimes, nil |
147 | 147 | } |
148 | 148 |
|
149 | | -func (r *argoRuntime) Create(ctx context.Context, runtimeName, cluster, runtimeVersion, ingressHost string) (*model.RuntimeCreationResponse, error) { |
| 149 | +func (r *argoRuntime) Create(ctx context.Context, runtimeName, cluster, runtimeVersion, ingressHost string, componentNames []string) (*model.RuntimeCreationResponse, error) { |
150 | 150 | jsonData := map[string]interface{}{ |
151 | 151 | "query": ` |
152 | 152 | mutation CreateRuntime( |
153 | | - $name: String!, $cluster: String!, $runtimeVersion: String!, $ingressHost: String |
| 153 | + $runtimeName: String!, $cluster: String!, $runtimeVersion: String!, $ingressHost: String, $componentNames: [String]! |
154 | 154 | ) { |
155 | | - runtime(name: $name, cluster: $cluster, runtimeVersion: $runtimeVersion, ingressHost: $ingressHost) { |
| 155 | + runtime(runtimeName: $runtimeName, cluster: $cluster, runtimeVersion: $runtimeVersion, ingressHost: $ingressHost, componentNames: $componentNames) { |
156 | 156 | name |
157 | 157 | newAccessToken |
158 | 158 | } |
159 | 159 | } |
160 | 160 | `, |
161 | 161 | "variables": map[string]interface{}{ |
162 | | - "name": runtimeName, |
| 162 | + "runtimeName": runtimeName, |
163 | 163 | "cluster": cluster, |
164 | 164 | "runtimeVersion": runtimeVersion, |
165 | 165 | "ingressHost": ingressHost, |
| 166 | + "componentNames": componentNames, |
166 | 167 | }, |
167 | 168 | } |
168 | 169 |
|
|
0 commit comments