From 88ad6c22eff10b4aaec2e184a335bf08af186d4f Mon Sep 17 00:00:00 2001 From: tengu-alt Date: Wed, 20 Sep 2023 15:25:34 +0300 Subject: [PATCH] hot-fix change var for postgres clusterkind --- config/crd/bases/clusters.instaclustr.com_cassandras.yaml | 7 +++++++ .../crd/bases/clusters.instaclustr.com_opensearches.yaml | 7 +++++++ config/crd/bases/clusters.instaclustr.com_postgresqls.yaml | 7 +++++++ config/crd/bases/clusters.instaclustr.com_redis.yaml | 7 +++++++ config/samples/clusterresources_v1beta1_clusterbackup.yaml | 2 +- controllers/clusterresources/clusterbackup_controller.go | 2 +- 6 files changed, 30 insertions(+), 2 deletions(-) diff --git a/config/crd/bases/clusters.instaclustr.com_cassandras.yaml b/config/crd/bases/clusters.instaclustr.com_cassandras.yaml index 941778c81..a28675bc9 100644 --- a/config/crd/bases/clusters.instaclustr.com_cassandras.yaml +++ b/config/crd/bases/clusters.instaclustr.com_cassandras.yaml @@ -143,9 +143,16 @@ spec: type: string vpcId: type: string + required: + - network + - vpcId type: object restoreMode: type: string + required: + - cdcId + - customVpcSettings + - restoreMode type: object type: array clusterID: diff --git a/config/crd/bases/clusters.instaclustr.com_opensearches.yaml b/config/crd/bases/clusters.instaclustr.com_opensearches.yaml index ea5c1ac9f..628ea13f4 100644 --- a/config/crd/bases/clusters.instaclustr.com_opensearches.yaml +++ b/config/crd/bases/clusters.instaclustr.com_opensearches.yaml @@ -184,9 +184,16 @@ spec: type: string vpcId: type: string + required: + - network + - vpcId type: object restoreMode: type: string + required: + - cdcId + - customVpcSettings + - restoreMode type: object type: array clusterId: diff --git a/config/crd/bases/clusters.instaclustr.com_postgresqls.yaml b/config/crd/bases/clusters.instaclustr.com_postgresqls.yaml index 43332fd5e..86fbce8df 100644 --- a/config/crd/bases/clusters.instaclustr.com_postgresqls.yaml +++ b/config/crd/bases/clusters.instaclustr.com_postgresqls.yaml @@ -153,9 +153,16 @@ spec: type: string vpcId: type: string + required: + - network + - vpcId type: object restoreMode: type: string + required: + - cdcId + - customVpcSettings + - restoreMode type: object type: array clusterId: diff --git a/config/crd/bases/clusters.instaclustr.com_redis.yaml b/config/crd/bases/clusters.instaclustr.com_redis.yaml index 431d73682..f37da108c 100644 --- a/config/crd/bases/clusters.instaclustr.com_redis.yaml +++ b/config/crd/bases/clusters.instaclustr.com_redis.yaml @@ -150,9 +150,16 @@ spec: type: string vpcId: type: string + required: + - network + - vpcId type: object restoreMode: type: string + required: + - cdcId + - customVpcSettings + - restoreMode type: object type: array clusterId: diff --git a/config/samples/clusterresources_v1beta1_clusterbackup.yaml b/config/samples/clusterresources_v1beta1_clusterbackup.yaml index d007b8e23..5c1afa170 100644 --- a/config/samples/clusterresources_v1beta1_clusterbackup.yaml +++ b/config/samples/clusterresources_v1beta1_clusterbackup.yaml @@ -4,4 +4,4 @@ metadata: name: clusterbackup-sample spec: clusterId: 2ae611cf-ac91-4325-941c-a35c043f9c34 - clusterKind: PostgreSQl \ No newline at end of file + clusterKind: PostgreSQL \ No newline at end of file diff --git a/controllers/clusterresources/clusterbackup_controller.go b/controllers/clusterresources/clusterbackup_controller.go index d89d9f274..cbd72f2c6 100644 --- a/controllers/clusterresources/clusterbackup_controller.go +++ b/controllers/clusterresources/clusterbackup_controller.go @@ -114,7 +114,7 @@ func (r *ClusterBackupReconciler) Reconcile(ctx context.Context, req ctrl.Reques } clusterKind := models.ClusterKindsMap[backup.Spec.ClusterKind] - if backup.Spec.ClusterKind == models.DefaultPgDbNameValue { + if backup.Spec.ClusterKind == models.PgClusterKind { clusterKind = models.PgAppKind }