From 09b891c90a3ca20e070c2adaccc470248bd320c9 Mon Sep 17 00:00:00 2001 From: Robert Cardell <114396208+bwrobc@users.noreply.github.com> Date: Tue, 16 May 2023 14:59:40 +0100 Subject: [PATCH 1/3] Remove logicalBackupSchedule pattern spec from the postgresql CRD. The pattern only validates the most basic cron schedules, and fail with the use of intervals, lists, ranges, etc. --- manifests/postgresql.crd.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/manifests/postgresql.crd.yaml b/manifests/postgresql.crd.yaml index 6066abad1..8986bc0fa 100644 --- a/manifests/postgresql.crd.yaml +++ b/manifests/postgresql.crd.yaml @@ -215,7 +215,6 @@ spec: x-kubernetes-preserve-unknown-fields: true logicalBackupSchedule: type: string - pattern: '^(\d+|\*)(/\d+)?(\s+(\d+|\*)(/\d+)?){4}$' maintenanceWindows: type: array items: From 9192a4809f4b7a91e688562e0c443dc1347c896e Mon Sep 17 00:00:00 2001 From: Robert Cardell <114396208+bwrobc@users.noreply.github.com> Date: Wed, 17 May 2023 09:10:04 +0100 Subject: [PATCH 2/3] Remove pattern from postgresqls.yaml helm chart too --- charts/postgres-operator/crds/postgresqls.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/charts/postgres-operator/crds/postgresqls.yaml b/charts/postgres-operator/crds/postgresqls.yaml index 6f938cf8f..416b2489b 100644 --- a/charts/postgres-operator/crds/postgresqls.yaml +++ b/charts/postgres-operator/crds/postgresqls.yaml @@ -217,7 +217,6 @@ spec: x-kubernetes-preserve-unknown-fields: true logicalBackupSchedule: type: string - pattern: '^(\d+|\*)(/\d+)?(\s+(\d+|\*)(/\d+)?){4}$' maintenanceWindows: type: array items: From fee16233e4078e441d75f4a5933e4436527391e3 Mon Sep 17 00:00:00 2001 From: Robert Cardell <114396208+bwrobc@users.noreply.github.com> Date: Wed, 17 May 2023 09:11:55 +0100 Subject: [PATCH 3/3] Remove pattern from the api --- pkg/apis/acid.zalan.do/v1/crds.go | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg/apis/acid.zalan.do/v1/crds.go b/pkg/apis/acid.zalan.do/v1/crds.go index 558a03f0f..3acb5421e 100644 --- a/pkg/apis/acid.zalan.do/v1/crds.go +++ b/pkg/apis/acid.zalan.do/v1/crds.go @@ -344,7 +344,6 @@ var PostgresCRDResourceValidation = apiextv1.CustomResourceValidation{ }, "logicalBackupSchedule": { Type: "string", - Pattern: "^(\\d+|\\*)(/\\d+)?(\\s+(\\d+|\\*)(/\\d+)?){4}$", }, "maintenanceWindows": { Type: "array",