diff --git a/charts/postgres-operator/crds/postgresqls.yaml b/charts/postgres-operator/crds/postgresqls.yaml index d2ad89da6..a2a2a5d00 100644 --- a/charts/postgres-operator/crds/postgresqls.yaml +++ b/charts/postgres-operator/crds/postgresqls.yaml @@ -217,7 +217,7 @@ spec: x-kubernetes-preserve-unknown-fields: true 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 b113c849f..6d1bbbee1 100644 --- a/manifests/postgresql.crd.yaml +++ b/manifests/postgresql.crd.yaml @@ -215,7 +215,7 @@ spec: x-kubernetes-preserve-unknown-fields: true 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 db11771e4..7afc822ea 100644 --- a/pkg/apis/acid.zalan.do/v1/crds.go +++ b/pkg/apis/acid.zalan.do/v1/crds.go @@ -344,7 +344,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",