diff --git a/charts/postgres-operator/crds/postgresqls.yaml b/charts/postgres-operator/crds/postgresqls.yaml index 8083e5e1d..47e70b32c 100644 --- a/charts/postgres-operator/crds/postgresqls.yaml +++ b/charts/postgres-operator/crds/postgresqls.yaml @@ -221,7 +221,7 @@ spec: type: string logicalBackupSchedule: type: string - pattern: '^(\d+|\*)(/\d+)?(\s+(\d+|\*)(/\d+)?){4}$' + pattern: '^((0?[0-9]|[1-5]?[0-9])|\*)(/(0?[0-9]|[1-5]?[0-9]))?(\s+(2[0-3]|1[0-9]|0?[0-9]|\*)(/(2[0-3]|1[0-9]|0?[0-9]))?)(\s+(3[01]|[12][0-9]|0?[1-9]|\*)(/(3[01]|[12][0-9]|0?[1-9]))?)(\s+(1[0-2]|0?[1-9]|\*)(/(1[0-2]|0?[1-9]))?)(\s+(0?[0-6]|\*)(/0?[0-6])?)$' maintenanceWindows: type: array items: diff --git a/manifests/postgresql.crd.yaml b/manifests/postgresql.crd.yaml index 39d751cef..243ab773f 100644 --- a/manifests/postgresql.crd.yaml +++ b/manifests/postgresql.crd.yaml @@ -219,7 +219,7 @@ spec: type: string logicalBackupSchedule: type: string - pattern: '^(\d+|\*)(/\d+)?(\s+(\d+|\*)(/\d+)?){4}$' + pattern: '^((0?[0-9]|[1-5]?[0-9])|\*)(/(0?[0-9]|[1-5]?[0-9]))?(\s+(2[0-3]|1[0-9]|0?[0-9]|\*)(/(2[0-3]|1[0-9]|0?[0-9]))?)(\s+(3[01]|[12][0-9]|0?[1-9]|\*)(/(3[01]|[12][0-9]|0?[1-9]))?)(\s+(1[0-2]|0?[1-9]|\*)(/(1[0-2]|0?[1-9]))?)(\s+(0?[0-6]|\*)(/0?[0-6])?)$' maintenanceWindows: type: array items: diff --git a/pkg/apis/acid.zalan.do/v1/crds.go b/pkg/apis/acid.zalan.do/v1/crds.go index 3f6bf25d9..76b682e14 100644 --- a/pkg/apis/acid.zalan.do/v1/crds.go +++ b/pkg/apis/acid.zalan.do/v1/crds.go @@ -351,7 +351,7 @@ var PostgresCRDResourceValidation = apiextv1.CustomResourceValidation{ }, "logicalBackupSchedule": { Type: "string", - Pattern: "^(\\d+|\\*)(/\\d+)?(\\s+(\\d+|\\*)(/\\d+)?){4}$", + Pattern: "^((0?[0-9]|[1-5]?[0-9])|\\*)(/(0?[0-9]|[1-5]?[0-9]))?(\\s+(2[0-3]|1[0-9]|0?[0-9]|\\*)(/(2[0-3]|1[0-9]|0?[0-9]))?)(\\s+(3[01]|[12][0-9]|0?[1-9]|\\*)(/(3[01]|[12][0-9]|0?[1-9]))?)(\\s+(1[0-2]|0?[1-9]|\\*)(/(1[0-2]|0?[1-9]))?)(\\s+(0?[0-6]|\\*)(/0?[0-6])?)$", }, "maintenanceWindows": { Type: "array",