Skip to content

Commit 022e5f9

Browse files
committed
Add support for tags, registry, image, and update_channel fields to app
resources and data sources
1 parent b79b945 commit 022e5f9

9 files changed

Lines changed: 318 additions & 26 deletions

File tree

docs/data-sources/app.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,16 @@ output "app_api_key" {
7070
- `cluster_id` (String) The Kubernetes cluster identifier where the app is deployed.
7171
- `created_at` (String) The timestamp when the app was created.
7272
- `description` (String) A description of the app.
73+
- `image` (String) Image name for the spiced container.
7374
- `image_tag` (String) The Spice.ai runtime image tag.
7475
- `name` (String) The name of the app.
7576
- `node_group` (String) The node group for the app.
7677
- `production_branch` (String) The production branch for the app.
7778
- `region` (String) The region where the app is deployed.
79+
- `registry` (String) Registry for the spiced image.
7880
- `replicas` (Number) The number of replicas.
7981
- `spicepod` (String) The spicepod configuration as a JSON string.
8082
- `storage_claim_size_gb` (Number) The storage claim size in GB.
83+
- `tags` (Map of String) Key-value tags for the app.
84+
- `update_channel` (String) Update channel for the spicepod.
8185
- `visibility` (String) The visibility of the app (`public` or `private`).

docs/data-sources/apps.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,16 @@ Read-Only:
8989
- `created_at` (String) The timestamp when the app was created.
9090
- `description` (String) A description of the app.
9191
- `id` (String) The unique identifier of the app.
92+
- `image` (String) Image name for the spiced container.
9293
- `image_tag` (String) The Spice.ai runtime image tag.
9394
- `name` (String) The name of the app.
9495
- `node_group` (String) The node group for the app.
9596
- `production_branch` (String) The production branch for the app.
9697
- `region` (String) The region where the app is deployed.
98+
- `registry` (String) Registry for the spiced image.
9799
- `replicas` (Number) The number of replicas.
98100
- `spicepod` (String) The spicepod configuration as a JSON string.
99101
- `storage_claim_size_gb` (Number) The storage claim size in GB.
102+
- `tags` (Map of String) Key-value tags for the app.
103+
- `update_channel` (String) Update channel for the spicepod.
100104
- `visibility` (String) The visibility of the app (`public` or `private`).

docs/resources/app.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,17 @@ resource "spiceai_app" "json_config" {
142142
### Optional
143143

144144
- `description` (String) A description of the app.
145+
- `image` (String) Image name for the spiced container.
145146
- `image_tag` (String) The Spice.ai runtime image tag to use for deployments (e.g., `latest`, `v0.18.0`).
146147
- `node_group` (String) The node group for the app deployment.
147148
- `production_branch` (String) The production branch for the app. Used for git-based deployments.
148149
- `region` (String) The region for the app deployment.
150+
- `registry` (String) Registry for the spiced image.
149151
- `replicas` (Number) The number of replicas for the app. Must be between 1 and 10.
150152
- `spicepod` (String) The spicepod configuration as a YAML or JSON string. This defines the datasets, models, and other spicepod settings for the app.
151153
- `storage_claim_size_gb` (Number) The storage claim size in GB for the app.
154+
- `tags` (Map of String) Key-value tags for the app.
155+
- `update_channel` (String) Update channel for the spicepod. Valid values are `stable`, `nightly`, `internal`, `internal-sandbox`.
152156
- `visibility` (String) The visibility of the app. Valid values are `public` or `private`. Defaults to `private`.
153157

154158
### Read-Only

docs/spiceai/openapi.json

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,18 +422,46 @@
422422
"api_key": {
423423
"type": "string"
424424
},
425+
"tags": {
426+
"type": "object",
427+
"additionalProperties": {
428+
"type": "string"
429+
}
430+
},
425431
"config": {
426432
"type": "object",
427433
"properties": {
428434
"spicepod": {
429435
"type": "object"
430436
},
437+
"registry": {
438+
"type": "string",
439+
"description": "Registry for the spiced image"
440+
},
441+
"image": {
442+
"type": "string",
443+
"description": "Image name for the spiced container"
444+
},
431445
"image_tag": {
432-
"type": "string"
446+
"type": "string",
447+
"description": "Spice.ai runtime image tag"
448+
},
449+
"update_channel": {
450+
"type": "string",
451+
"enum": [
452+
"stable",
453+
"nightly",
454+
"internal",
455+
"internal-sandbox"
456+
],
457+
"description": "Update channel for the spicepod"
433458
},
434459
"replicas": {
435460
"type": "integer"
436461
},
462+
"region": {
463+
"type": "string"
464+
},
437465
"node_group": {
438466
"type": "string"
439467
},
@@ -495,6 +523,13 @@
495523
"production_branch": {
496524
"type": "string"
497525
},
526+
"tags": {
527+
"type": "object",
528+
"additionalProperties": {
529+
"type": "string"
530+
},
531+
"description": "Key-value tags for the app"
532+
},
498533
"spicepod": {
499534
"oneOf": [
500535
{
@@ -511,6 +546,24 @@
511546
"type": "string",
512547
"description": "Spice.ai runtime image tag"
513548
},
549+
"image": {
550+
"type": "string",
551+
"description": "Image name for the spiced container"
552+
},
553+
"registry": {
554+
"type": "string",
555+
"description": "Registry for the spiced image"
556+
},
557+
"update_channel": {
558+
"type": "string",
559+
"enum": [
560+
"stable",
561+
"nightly",
562+
"internal",
563+
"internal-sandbox"
564+
],
565+
"description": "Update channel for the spicepod"
566+
},
514567
"replicas": {
515568
"type": "integer",
516569
"minimum": 1,
@@ -935,6 +988,13 @@
935988
"type": "string",
936989
"enum": ["public", "private"],
937990
"default": "private"
991+
},
992+
"tags": {
993+
"type": "object",
994+
"additionalProperties": {
995+
"type": "string"
996+
},
997+
"description": "Key-value tags for the app"
938998
}
939999
}
9401000
}

docs/spiceai/spec.md

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,16 @@ An **App** represents a Spice AI application. Apps contain configuration, are de
188188
"region": "us-east-2",
189189
"cluster_id": "cluster-abc123",
190190
"api_key": "sk_live_xxxxx",
191+
"tags": {
192+
"environment": "production",
193+
"team": "data"
194+
},
191195
"config": {
192196
"spicepod": { ... },
197+
"registry": "ghcr.io/spiceai",
198+
"image": "spiceai-enterprise",
193199
"image_tag": "1.5.0-models",
200+
"update_channel": "stable",
194201
"replicas": 2,
195202
"node_group": "standard",
196203
"storage_claim_size_gb": 10
@@ -210,14 +217,18 @@ An **App** represents a Spice AI application. Apps contain configuration, are de
210217
| `region` | string | No | Deployment region (e.g., `us-east-2`) |
211218
| `cluster_id` | string | Read-only | Kubernetes cluster identifier |
212219
| `api_key` | string | Read-only | Primary API key for runtime |
220+
| `tags` | object | No | Key-value tags for the app |
213221
| `config` | object | No | App configuration (see Config Object) |
214222

215223
#### Config Object
216224

217225
| Field | Type | Description |
218226
|-------|------|-------------|
219227
| `spicepod` | object | Spicepod configuration manifest |
228+
| `registry` | string | Registry for the spiced image (e.g., `ghcr.io/spiceai`) |
229+
| `image` | string | Image name for the spiced container (e.g., `spiceai-enterprise`) |
220230
| `image_tag` | string | Spice runtime container image tag |
231+
| `update_channel` | string | Update channel: `stable`, `nightly`, `internal`, or `internal-sandbox` |
221232
| `replicas` | integer | Number of runtime replicas (1-10) |
222233
| `node_group` | string | Compute node group |
223234
| `storage_claim_size_gb` | number | Persistent storage size in GB |
@@ -247,7 +258,10 @@ Returns all apps in the authenticated organization.
247258
"created_at": "2024-01-15T10:30:00Z",
248259
"region": "us-east-2",
249260
"cluster_id": "cluster-abc123",
250-
"api_key": "sk_live_xxxxx"
261+
"api_key": "sk_live_xxxxx",
262+
"tags": {
263+
"environment": "production"
264+
}
251265
}
252266
]
253267
}
@@ -272,14 +286,19 @@ Creates a new app in the authenticated organization.
272286
| `name` | string | Yes | 4+ chars, pattern: `^[a-zA-Z0-9-]+$` | Unique app name |
273287
| `description` | string | No | - | App description |
274288
| `visibility` | string | No | `public` \| `private` | Default: `private` |
289+
| `tags` | object | No | Key-value pairs | Custom tags for the app |
275290

276291
**Example Request:**
277292

278293
```json
279294
{
280295
"name": "my-new-app",
281296
"description": "A new Spice AI application",
282-
"visibility": "private"
297+
"visibility": "private",
298+
"tags": {
299+
"environment": "staging",
300+
"team": "engineering"
301+
}
283302
}
284303
```
285304

@@ -335,14 +354,21 @@ Returns details for a specific app, including its configuration.
335354
"created_at": "2024-01-15T10:30:00Z",
336355
"production_branch": "main",
337356
"api_key": "sk_live_xxxxx",
357+
"tags": {
358+
"environment": "production",
359+
"team": "data"
360+
},
338361
"config": {
339362
"spicepod": {
340363
"version": "v1",
341364
"kind": "Spicepod",
342365
"name": "my-app",
343366
"datasets": [...]
344367
},
368+
"registry": "ghcr.io/spiceai",
369+
"image": "spiceai-enterprise",
345370
"image_tag": "1.5.0-models",
371+
"update_channel": "stable",
346372
"replicas": 2,
347373
"region": "us-east-2",
348374
"node_group": "standard",
@@ -376,8 +402,12 @@ Updates an app's metadata and configuration.
376402
| `description` | string | App description |
377403
| `visibility` | string | `public` or `private` |
378404
| `production_branch` | string | Git branch for production |
405+
| `tags` | object | Key-value tags for the app |
379406
| `spicepod` | string \| object | Spicepod config (YAML string or JSON object) |
407+
| `registry` | string | Registry for the spiced image |
408+
| `image` | string | Image name for the spiced container |
380409
| `image_tag` | string | Runtime container image tag |
410+
| `update_channel` | string | Update channel: `stable`, `nightly`, `internal`, or `internal-sandbox` |
381411
| `replicas` | integer | Number of replicas (1-10) |
382412
| `node_group` | string | Compute node group |
383413
| `region` | string | Deployment region |
@@ -388,6 +418,10 @@ Updates an app's metadata and configuration.
388418
```json
389419
{
390420
"description": "Updated description",
421+
"tags": {
422+
"environment": "production",
423+
"version": "2.0"
424+
},
391425
"replicas": 3,
392426
"spicepod": {
393427
"version": "v1",
@@ -1428,6 +1462,12 @@ The OpenAPI spec is generated from JSDoc `@swagger` annotations in the route han
14281462

14291463
## Changelog
14301464

1465+
### 2025-12-12
1466+
1467+
- Added `registry`, `image`, and `update_channel` fields to App config
1468+
- `update_channel` supports values: `stable`, `nightly`, `internal`, `internal-sandbox`
1469+
- Added `tags` field to App object for custom key-value metadata
1470+
14311471
### 2025-12-11
14321472

14331473
- Added Members API for organization member management

internal/client/client.go

Lines changed: 31 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -153,22 +153,26 @@ func (c *SpiceAIClient) doRequest(ctx context.Context, method, path string, body
153153

154154
// App represents a Spice.ai app.
155155
type App struct {
156-
ID int64 `json:"id"`
157-
Name string `json:"name"`
158-
Description string `json:"description,omitempty"`
159-
Visibility string `json:"visibility,omitempty"`
160-
CreatedAt string `json:"created_at,omitempty"`
161-
Region string `json:"region,omitempty"`
162-
ClusterID string `json:"cluster_id,omitempty"`
163-
ProductionBranch string `json:"production_branch,omitempty"`
164-
APIKey string `json:"api_key,omitempty"`
165-
Config *AppConfig `json:"config,omitempty"`
156+
ID int64 `json:"id"`
157+
Name string `json:"name"`
158+
Description string `json:"description,omitempty"`
159+
Visibility string `json:"visibility,omitempty"`
160+
CreatedAt string `json:"created_at,omitempty"`
161+
Region string `json:"region,omitempty"`
162+
ClusterID string `json:"cluster_id,omitempty"`
163+
ProductionBranch string `json:"production_branch,omitempty"`
164+
APIKey string `json:"api_key,omitempty"`
165+
Tags map[string]string `json:"tags,omitempty"`
166+
Config *AppConfig `json:"config,omitempty"`
166167
}
167168

168169
// AppConfig represents the configuration of an app.
169170
type AppConfig struct {
170171
Spicepod interface{} `json:"spicepod,omitempty"`
172+
Registry string `json:"registry,omitempty"`
173+
Image string `json:"image,omitempty"`
171174
ImageTag string `json:"image_tag,omitempty"`
175+
UpdateChannel string `json:"update_channel,omitempty"`
172176
Replicas int `json:"replicas,omitempty"`
173177
Region string `json:"region,omitempty"`
174178
NodeGroup string `json:"node_group,omitempty"`
@@ -177,22 +181,27 @@ type AppConfig struct {
177181

178182
// CreateAppRequest represents the request to create an app.
179183
type CreateAppRequest struct {
180-
Name string `json:"name"`
181-
Description string `json:"description,omitempty"`
182-
Visibility string `json:"visibility,omitempty"`
184+
Name string `json:"name"`
185+
Description string `json:"description,omitempty"`
186+
Visibility string `json:"visibility,omitempty"`
187+
Tags map[string]string `json:"tags,omitempty"`
183188
}
184189

185190
// UpdateAppRequest represents the request to update an app.
186191
type UpdateAppRequest struct {
187-
Description string `json:"description,omitempty"`
188-
Visibility string `json:"visibility,omitempty"`
189-
ProductionBranch string `json:"production_branch,omitempty"`
190-
Spicepod interface{} `json:"spicepod,omitempty"`
191-
ImageTag string `json:"image_tag,omitempty"`
192-
Replicas *int `json:"replicas,omitempty"`
193-
NodeGroup string `json:"node_group,omitempty"`
194-
Region string `json:"region,omitempty"`
195-
StorageClaimSizeGB *float64 `json:"storage_claim_size_gb,omitempty"`
192+
Description string `json:"description,omitempty"`
193+
Visibility string `json:"visibility,omitempty"`
194+
ProductionBranch string `json:"production_branch,omitempty"`
195+
Tags map[string]string `json:"tags,omitempty"`
196+
Spicepod interface{} `json:"spicepod,omitempty"`
197+
Registry string `json:"registry,omitempty"`
198+
Image string `json:"image,omitempty"`
199+
ImageTag string `json:"image_tag,omitempty"`
200+
UpdateChannel string `json:"update_channel,omitempty"`
201+
Replicas *int `json:"replicas,omitempty"`
202+
NodeGroup string `json:"node_group,omitempty"`
203+
Region string `json:"region,omitempty"`
204+
StorageClaimSizeGB *float64 `json:"storage_claim_size_gb,omitempty"`
196205
}
197206

198207
// Deployment represents a Spice.ai deployment.

0 commit comments

Comments
 (0)