feat(objectstorage): add Aliyun OSS support and auto-detect provider in deploy workflows

Introduces Aliyun OSS as an alternative to MinIO; deploy scripts and CI
workflows now read object_storage.provider from config and conditionally
include or skip MinIO resources in both Docker Compose and k3s paths.
Also adds ops scheduler domain and its migration tables.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-20 10:25:02 +08:00
parent 00eb514efc
commit 98f73c5bea
18 changed files with 901 additions and 34 deletions
+79
View File
@@ -0,0 +1,79 @@
package domain
import "time"
const (
SchedulerTriggerAuto = "auto"
SchedulerTriggerManual = "manual"
SchedulerTriggerDryRun = "dry_run"
SchedulerRunRunning = "running"
SchedulerRunSuccess = "success"
SchedulerRunFailed = "failed"
SchedulerRunSkipped = "skipped"
)
type SchedulerJob struct {
JobKey string `json:"job_key"`
DisplayName string `json:"display_name"`
Category string `json:"category"`
Description *string `json:"description,omitempty"`
Enabled bool `json:"enabled"`
ScheduleType string `json:"schedule_type"`
IntervalSeconds int `json:"interval_seconds"`
CronExpr *string `json:"cron_expr,omitempty"`
Timezone string `json:"timezone"`
TimeoutSeconds int `json:"timeout_seconds"`
BatchSize *int `json:"batch_size,omitempty"`
MaxConcurrency int `json:"max_concurrency"`
Config map[string]any `json:"config"`
Version int `json:"version"`
UpdatedBy *int64 `json:"updated_by,omitempty"`
UpdatedAt time.Time `json:"updated_at"`
CreatedAt time.Time `json:"created_at"`
LastRun *SchedulerRun `json:"last_run,omitempty"`
RunningRun *SchedulerRun `json:"running_run,omitempty"`
PendingTriggers int `json:"pending_triggers"`
}
type SchedulerRun struct {
ID int64 `json:"id"`
JobKey string `json:"job_key"`
TriggerID *int64 `json:"trigger_id,omitempty"`
SchedulerInstanceID *string `json:"scheduler_instance_id,omitempty"`
TriggerType string `json:"trigger_type"`
Status string `json:"status"`
ConfigVersion int `json:"config_version"`
ConfigSnapshot map[string]any `json:"config_snapshot"`
Stats map[string]any `json:"stats"`
ErrorMessage *string `json:"error_message,omitempty"`
StartedAt time.Time `json:"started_at"`
FinishedAt *time.Time `json:"finished_at,omitempty"`
DurationMilliseconds *int64 `json:"duration_ms,omitempty"`
}
type SchedulerInstance struct {
InstanceID string `json:"instance_id"`
Hostname string `json:"hostname"`
Process string `json:"process"`
BuildVersion *string `json:"build_version,omitempty"`
StartedAt time.Time `json:"started_at"`
LastSeenAt time.Time `json:"last_seen_at"`
Metadata map[string]any `json:"metadata"`
}
type SchedulerTrigger struct {
ID int64 `json:"id"`
JobKey string `json:"job_key"`
TriggerType string `json:"trigger_type"`
Status string `json:"status"`
RequestedBy *int64 `json:"requested_by,omitempty"`
Reason *string `json:"reason,omitempty"`
ConfigOverride map[string]any `json:"config_override"`
SchedulerInstanceID *string `json:"scheduler_instance_id,omitempty"`
RunID *int64 `json:"run_id,omitempty"`
RequestedAt time.Time `json:"requested_at"`
ClaimedAt *time.Time `json:"claimed_at,omitempty"`
FinishedAt *time.Time `json:"finished_at,omitempty"`
ErrorMessage *string `json:"error_message,omitempty"`
}