mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2026-02-11 13:31:45 +01:00
116 lines
3.8 KiB
Go
116 lines
3.8 KiB
Go
// Copyright (C) NHR@FAU, University Erlangen-Nuremberg.
|
|
// All rights reserved. This file is part of cc-backend.
|
|
// Use of this source code is governed by a MIT-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package archive
|
|
|
|
var configSchema = `
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": {
|
|
"description": "Backend type for job-archive",
|
|
"type": "string",
|
|
"enum": ["file", "s3", "sqlite"]
|
|
},
|
|
"path": {
|
|
"description": "Path to job archive for file backend",
|
|
"type": "string"
|
|
},
|
|
"db-path": {
|
|
"description": "Path to SQLite database file for sqlite backend",
|
|
"type": "string"
|
|
},
|
|
"endpoint": {
|
|
"description": "S3 endpoint URL (for S3-compatible services like MinIO)",
|
|
"type": "string"
|
|
},
|
|
"access-key": {
|
|
"description": "S3 access key ID",
|
|
"type": "string"
|
|
},
|
|
"secret-key": {
|
|
"description": "S3 secret access key",
|
|
"type": "string"
|
|
},
|
|
"bucket": {
|
|
"description": "S3 bucket name for job archive",
|
|
"type": "string"
|
|
},
|
|
"region": {
|
|
"description": "AWS region for S3 bucket",
|
|
"type": "string"
|
|
},
|
|
"use-path-style": {
|
|
"description": "Use path-style S3 URLs (required for MinIO and some S3-compatible services)",
|
|
"type": "boolean"
|
|
},
|
|
"compression": {
|
|
"description": "Setup automatic compression for jobs older than number of days",
|
|
"type": "integer"
|
|
},
|
|
"retention": {
|
|
"description": "Configuration keys for retention",
|
|
"type": "object",
|
|
"properties": {
|
|
"policy": {
|
|
"description": "Retention policy",
|
|
"type": "string",
|
|
"enum": ["none", "delete", "move", "parquet"]
|
|
},
|
|
"include-db": {
|
|
"description": "Also remove jobs from database",
|
|
"type": "boolean"
|
|
},
|
|
"age": {
|
|
"description": "Act on jobs with startTime older than age (in days)",
|
|
"type": "integer"
|
|
},
|
|
"location": {
|
|
"description": "The target directory for retention. Only applicable for retention move.",
|
|
"type": "string"
|
|
},
|
|
"target-kind": {
|
|
"description": "Target storage kind for parquet retention: file or s3",
|
|
"type": "string",
|
|
"enum": ["file", "s3"]
|
|
},
|
|
"target-path": {
|
|
"description": "Target directory path for parquet file storage",
|
|
"type": "string"
|
|
},
|
|
"target-endpoint": {
|
|
"description": "S3 endpoint URL for parquet target",
|
|
"type": "string"
|
|
},
|
|
"target-bucket": {
|
|
"description": "S3 bucket name for parquet target",
|
|
"type": "string"
|
|
},
|
|
"target-access-key": {
|
|
"description": "S3 access key for parquet target",
|
|
"type": "string"
|
|
},
|
|
"target-secret-key": {
|
|
"description": "S3 secret key for parquet target",
|
|
"type": "string"
|
|
},
|
|
"target-region": {
|
|
"description": "S3 region for parquet target",
|
|
"type": "string"
|
|
},
|
|
"target-use-path-style": {
|
|
"description": "Use path-style S3 URLs for parquet target",
|
|
"type": "boolean"
|
|
},
|
|
"max-file-size-mb": {
|
|
"description": "Maximum parquet file size in MB before splitting",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": ["policy"]
|
|
}
|
|
},
|
|
"required": ["kind"]}`
|