Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support cron and timezone in manager task integration #1851

Merged
merged 6 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions deploy/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1146,6 +1146,9 @@ spec:
description: backups specifies backup tasks in Scylla Manager. When Scylla Manager is not installed, these will be ignored.
items:
properties:
cron:
description: cron specifies the task schedule as a cron expression. It supports an extended syntax including @monthly, @weekly, @daily, @midnight, @hourly, @every X[h|m|s].
type: string
dc:
description: dc is a list of datacenter glob patterns, e.g. 'dc1,!otherdc*' used to specify the DCs to include or exclude from backup.
items:
Expand Down Expand Up @@ -1190,6 +1193,9 @@ spec:
startDate:
description: startDate specifies the task start date expressed in the RFC3339 format or now[+duration], e.g. now+3d2h10m, valid units are d, h, m, s.
type: string
timezone:
description: timezone specifies the timezone of cron field.
type: string
uploadParallel:
description: 'uploadParallel is a list of upload parallelism limits in the format [<dc>:]<limit>. The <dc>: part is optional and allows for specifying different limits in selected datacenters. If The <dc>: part is not set the limit is global (e.g. ''dc1:2,5'') the runs are parallel in n nodes (2 in dc1) and n nodes in all the other datacenters.'
items:
Expand Down Expand Up @@ -3102,6 +3108,9 @@ spec:
description: repairs specify repair tasks in Scylla Manager. When Scylla Manager is not installed, these will be ignored.
items:
properties:
cron:
description: cron specifies the task schedule as a cron expression. It supports an extended syntax including @monthly, @weekly, @daily, @midnight, @hourly, @every X[h|m|s].
type: string
dc:
description: dc is a list of datacenter glob patterns, e.g. 'dc1', '!otherdc*' used to specify the DCs to include or exclude from backup.
items:
Expand Down Expand Up @@ -3145,6 +3154,9 @@ spec:
startDate:
description: startDate specifies the task start date expressed in the RFC3339 format or now[+duration], e.g. now+3d2h10m, valid units are d, h, m, s.
type: string
timezone:
description: timezone specifies the timezone of cron field.
type: string
type: object
type: array
repository:
Expand Down Expand Up @@ -3174,6 +3186,9 @@ spec:
description: backups reflects status of backup tasks.
items:
properties:
cron:
description: cron specifies the task schedule as a cron expression. It supports an extended syntax including @monthly, @weekly, @daily, @midnight, @hourly, @every X[h|m|s].
type: string
dc:
description: dc is a list of datacenter glob patterns, e.g. 'dc1,!otherdc*' used to specify the DCs to include or exclude from backup.
items:
Expand Down Expand Up @@ -3224,6 +3239,9 @@ spec:
startDate:
description: startDate specifies the task start date expressed in the RFC3339 format or now[+duration], e.g. now+3d2h10m, valid units are d, h, m, s.
type: string
timezone:
description: timezone specifies the timezone of cron field.
type: string
uploadParallel:
description: 'uploadParallel is a list of upload parallelism limits in the format [<dc>:]<limit>. The <dc>: part is optional and allows for specifying different limits in selected datacenters. If The <dc>: part is not set the limit is global (e.g. ''dc1:2,5'') the runs are parallel in n nodes (2 in dc1) and n nodes in all the other datacenters.'
items:
Expand Down Expand Up @@ -3345,6 +3363,9 @@ spec:
description: repairs reflects status of repair tasks.
items:
properties:
cron:
description: cron specifies the task schedule as a cron expression. It supports an extended syntax including @monthly, @weekly, @daily, @midnight, @hourly, @every X[h|m|s].
type: string
dc:
description: dc is a list of datacenter glob patterns, e.g. 'dc1', '!otherdc*' used to specify the DCs to include or exclude from backup.
items:
Expand Down Expand Up @@ -3394,6 +3415,9 @@ spec:
startDate:
description: startDate specifies the task start date expressed in the RFC3339 format or now[+duration], e.g. now+3d2h10m, valid units are d, h, m, s.
type: string
timezone:
description: timezone specifies the timezone of cron field.
type: string
type: object
type: array
upgrade:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,9 @@ object
* - Property
- Type
- Description
* - cron
- string
- cron specifies the task schedule as a cron expression. It supports an extended syntax including @monthly, @weekly, @daily, @midnight, @hourly, @every X[h|m|s].
* - dc
- array (string)
- dc is a list of datacenter glob patterns, e.g. 'dc1,!otherdc*' used to specify the DCs to include or exclude from backup.
Expand Down Expand Up @@ -320,6 +323,9 @@ object
* - startDate
- string
- startDate specifies the task start date expressed in the RFC3339 format or now[+duration], e.g. now+3d2h10m, valid units are d, h, m, s.
* - timezone
- string
- timezone specifies the timezone of cron field.
* - uploadParallel
- array (string)
- uploadParallel is a list of upload parallelism limits in the format [<dc>:]<limit>. The <dc>: part is optional and allows for specifying different limits in selected datacenters. If The <dc>: part is not set the limit is global (e.g. 'dc1:2,5') the runs are parallel in n nodes (2 in dc1) and n nodes in all the other datacenters.
Expand Down Expand Up @@ -4661,6 +4667,9 @@ object
* - Property
- Type
- Description
* - cron
- string
- cron specifies the task schedule as a cron expression. It supports an extended syntax including @monthly, @weekly, @daily, @midnight, @hourly, @every X[h|m|s].
* - dc
- array (string)
- dc is a list of datacenter glob patterns, e.g. 'dc1', '!otherdc*' used to specify the DCs to include or exclude from backup.
Expand Down Expand Up @@ -4694,6 +4703,9 @@ object
* - startDate
- string
- startDate specifies the task start date expressed in the RFC3339 format or now[+duration], e.g. now+3d2h10m, valid units are d, h, m, s.
* - timezone
- string
- timezone specifies the timezone of cron field.

.. _api-scylla.scylladb.com-scyllaclusters-v1-.status:

Expand Down Expand Up @@ -4771,6 +4783,9 @@ object
* - Property
- Type
- Description
* - cron
- string
- cron specifies the task schedule as a cron expression. It supports an extended syntax including @monthly, @weekly, @daily, @midnight, @hourly, @every X[h|m|s].
* - dc
- array (string)
- dc is a list of datacenter glob patterns, e.g. 'dc1,!otherdc*' used to specify the DCs to include or exclude from backup.
Expand Down Expand Up @@ -4807,6 +4822,9 @@ object
* - startDate
- string
- startDate specifies the task start date expressed in the RFC3339 format or now[+duration], e.g. now+3d2h10m, valid units are d, h, m, s.
* - timezone
- string
- timezone specifies the timezone of cron field.
* - uploadParallel
- array (string)
- uploadParallel is a list of upload parallelism limits in the format [<dc>:]<limit>. The <dc>: part is optional and allows for specifying different limits in selected datacenters. If The <dc>: part is not set the limit is global (e.g. 'dc1:2,5') the runs are parallel in n nodes (2 in dc1) and n nodes in all the other datacenters.
Expand Down Expand Up @@ -4888,6 +4906,9 @@ object
* - Property
- Type
- Description
* - cron
- string
- cron specifies the task schedule as a cron expression. It supports an extended syntax including @monthly, @weekly, @daily, @midnight, @hourly, @every X[h|m|s].
* - dc
- array (string)
- dc is a list of datacenter glob patterns, e.g. 'dc1', '!otherdc*' used to specify the DCs to include or exclude from backup.
Expand Down Expand Up @@ -4927,6 +4948,9 @@ object
* - startDate
- string
- startDate specifies the task start date expressed in the RFC3339 format or now[+duration], e.g. now+3d2h10m, valid units are d, h, m, s.
* - timezone
- string
- timezone specifies the timezone of cron field.

.. _api-scylla.scylladb.com-scyllaclusters-v1-.status.upgrade:

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ require (
github.com/onsi/gomega v1.32.0
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.19.0
github.com/robfig/cron/v3 v3.0.1
github.com/scylladb/go-set v1.0.2
github.com/scylladb/gocqlx/v2 v2.8.0
github.com/scylladb/scylla-manager/v3 v3.2.7
Expand Down Expand Up @@ -174,7 +175,6 @@ require (
github.com/rclone/rclone v1.66.0 // indirect
github.com/rfjakob/eme v1.1.2 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/robfig/cron/v3 v3.0.1 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/scylladb/go-log v0.0.7 // indirect
github.com/scylladb/go-reflectx v1.0.1 // indirect
Expand Down
16 changes: 16 additions & 0 deletions helm/scylla-manager/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@
"description": "backups specifies backup tasks in Scylla Manager. When Scylla Manager is not installed, these will be ignored.",
"items": {
"properties": {
"cron": {
"description": "cron specifies the task schedule as a cron expression. It supports an extended syntax including @monthly, @weekly, @daily, @midnight, @hourly, @every X[h|m|s].",
"type": "string"
},
"dc": {
"description": "dc is a list of datacenter glob patterns, e.g. 'dc1,!otherdc*' used to specify the DCs to include or exclude from backup.",
"items": {
Expand Down Expand Up @@ -260,6 +264,10 @@
"description": "startDate specifies the task start date expressed in the RFC3339 format or now[+duration], e.g. now+3d2h10m, valid units are d, h, m, s.",
"type": "string"
},
"timezone": {
"description": "timezone specifies the timezone of cron field.",
"type": "string"
},
"uploadParallel": {
"description": "uploadParallel is a list of upload parallelism limits in the format [<dc>:]<limit>. The <dc>: part is optional and allows for specifying different limits in selected datacenters. If The <dc>: part is not set the limit is global (e.g. 'dc1:2,5') the runs are parallel in n nodes (2 in dc1) and n nodes in all the other datacenters.",
"items": {
Expand Down Expand Up @@ -537,6 +545,10 @@
"description": "repairs specify repair tasks in Scylla Manager. When Scylla Manager is not installed, these will be ignored.",
"items": {
"properties": {
"cron": {
"description": "cron specifies the task schedule as a cron expression. It supports an extended syntax including @monthly, @weekly, @daily, @midnight, @hourly, @every X[h|m|s].",
"type": "string"
},
"dc": {
"description": "dc is a list of datacenter glob patterns, e.g. 'dc1', '!otherdc*' used to specify the DCs to include or exclude from backup.",
"items": {
Expand Down Expand Up @@ -592,6 +604,10 @@
"startDate": {
"description": "startDate specifies the task start date expressed in the RFC3339 format or now[+duration], e.g. now+3d2h10m, valid units are d, h, m, s.",
"type": "string"
},
"timezone": {
"description": "timezone specifies the timezone of cron field.",
"type": "string"
}
},
"type": "object"
Expand Down
16 changes: 16 additions & 0 deletions helm/scylla/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@
"description": "backups specifies backup tasks in Scylla Manager. When Scylla Manager is not installed, these will be ignored.",
"items": {
"properties": {
"cron": {
"description": "cron specifies the task schedule as a cron expression. It supports an extended syntax including @monthly, @weekly, @daily, @midnight, @hourly, @every X[h|m|s].",
"type": "string"
},
"dc": {
"description": "dc is a list of datacenter glob patterns, e.g. 'dc1,!otherdc*' used to specify the DCs to include or exclude from backup.",
"items": {
Expand Down Expand Up @@ -149,6 +153,10 @@
"description": "startDate specifies the task start date expressed in the RFC3339 format or now[+duration], e.g. now+3d2h10m, valid units are d, h, m, s.",
"type": "string"
},
"timezone": {
"description": "timezone specifies the timezone of cron field.",
"type": "string"
},
"uploadParallel": {
"description": "uploadParallel is a list of upload parallelism limits in the format [<dc>:]<limit>. The <dc>: part is optional and allows for specifying different limits in selected datacenters. If The <dc>: part is not set the limit is global (e.g. 'dc1:2,5') the runs are parallel in n nodes (2 in dc1) and n nodes in all the other datacenters.",
"items": {
Expand Down Expand Up @@ -426,6 +434,10 @@
"description": "repairs specify repair tasks in Scylla Manager. When Scylla Manager is not installed, these will be ignored.",
"items": {
"properties": {
"cron": {
"description": "cron specifies the task schedule as a cron expression. It supports an extended syntax including @monthly, @weekly, @daily, @midnight, @hourly, @every X[h|m|s].",
"type": "string"
},
"dc": {
"description": "dc is a list of datacenter glob patterns, e.g. 'dc1', '!otherdc*' used to specify the DCs to include or exclude from backup.",
"items": {
Expand Down Expand Up @@ -481,6 +493,10 @@
"startDate": {
"description": "startDate specifies the task start date expressed in the RFC3339 format or now[+duration], e.g. now+3d2h10m, valid units are d, h, m, s.",
"type": "string"
},
"timezone": {
"description": "timezone specifies the timezone of cron field.",
"type": "string"
}
},
"type": "object"
Expand Down
Loading