postgres-operator/pkg/apis/acid.zalan.do
Mikhail Vishnyakov a7a03ab0b2
Fix postgresql CRD for more safely validation
This change will allow to immediately discard invalid values when parsing a logicalBackupSchedule string.

Previously used regular expression '^(\d+|\*)(/\d+)?(\s+(\d+|\*)(/\d+)?){4}$' may pass invalid values to cron, like "00 03 * * 7"
Although "00 03 * * 7" may be valid on some systems, but this value will throw an error when applied to kubernetes.
https://en.wikipedia.org/wiki/Cron

FYI: kubernetes uses cron implementation from go module "github.com/robfig/cron/v3"
https://github.com/robfig/cron/blob/v3/spec.go
https://github.com/robfig/cron/blob/v3/parser.go
2022-08-10 22:03:07 +03:00
..
v1 Fix postgresql CRD for more safely validation 2022-08-10 22:03:07 +03:00
register.go Use code-generation for CRD API and deepcopy methods (#369) 2018-08-15 17:22:25 +02:00