mirror of
https://github.com/GlueOps/autoglue.git
synced 2026-04-17 19:49:23 +02:00
* feat: add cluster metadata key-value store
- Add ClusterMetadata model with ClusterID FK, key, value fields
- Add Metadata []ClusterMetadata relation to Cluster model
- Add CRUD handlers: List, Get, Create, Update, Delete cluster metadata
- Keys are forced to lowercase on create/update
- Values preserve case sensitivity
- Add metadata routes under /clusters/{clusterID}/metadata
- Include metadata in ClusterResponse DTO and clusterToDTO mapping
- Add Preload(Metadata) to all cluster queries
- Register ClusterMetadata in AutoMigrate
Closes: internal-GlueOps/issues#302
* feat: include cluster metadata in prepare payload
- Preload cluster Metadata in ClusterPrepareWorker
- Map cluster metadata into mapper.ClusterToDTO response payload
This ensures metadata key-value pairs are injected into the platform JSON payload used by prepare/bootstrap flows.
* feat: add cluster metadata UI section to configure dialog
* feat: simplify cluster metadata to map[string]string in response
* fix: address cluster metadata PR review feedback
Agent-Logs-Url: https://github.com/GlueOps/autoglue/sessions/f767d4b8-ecae-4cde-bb5c-f0845c5a7cdf
Co-authored-by: yesterdaysrebel <256862558+yesterdaysrebel@users.noreply.github.com>
* chore: finalize review feedback updates
Agent-Logs-Url: https://github.com/GlueOps/autoglue/sessions/f767d4b8-ecae-4cde-bb5c-f0845c5a7cdf
Co-authored-by: yesterdaysrebel <256862558+yesterdaysrebel@users.noreply.github.com>
* chore: revert unintended go.sum change
Agent-Logs-Url: https://github.com/GlueOps/autoglue/sessions/f767d4b8-ecae-4cde-bb5c-f0845c5a7cdf
Co-authored-by: yesterdaysrebel <256862558+yesterdaysrebel@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: yesterdaysrebel <256862558+yesterdaysrebel@users.noreply.github.com>
15 lines
554 B
Go
15 lines
554 B
Go
package models
|
|
|
|
import (
|
|
"github.com/glueops/autoglue/internal/common"
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
type ClusterMetadata struct {
|
|
common.AuditFields `gorm:"embedded"`
|
|
ClusterID uuid.UUID `gorm:"type:uuid;not null;uniqueIndex:idx_cluster_metadata_cluster_key" json:"cluster_id"`
|
|
Cluster Cluster `gorm:"foreignKey:ClusterID;constraint:OnDelete:CASCADE" json:"-"`
|
|
Key string `gorm:"not null;uniqueIndex:idx_cluster_metadata_cluster_key" json:"key"`
|
|
Value string `gorm:"not null" json:"value"`
|
|
}
|