From 892036fa3d36ed2cbba7e44827904dbe9be065fd Mon Sep 17 00:00:00 2001 From: Florent Poinsard Date: Tue, 25 Feb 2025 16:14:23 -0600 Subject: [PATCH 1/2] Port the changes made in #658 Signed-off-by: Florent Poinsard --- examples/operator/101_initial_cluster.yaml | 9 ++++++- examples/operator/201_customer_tablets.yaml | 7 ++++++ examples/operator/302_new_shards.yaml | 7 ++++++ examples/operator/306_down_shard_0.yaml | 7 ++++++ examples/operator/401_scheduled_backups.yaml | 26 ++++++++++---------- examples/operator/operator.yaml | 14 +++++++---- 6 files changed, 51 insertions(+), 19 deletions(-) diff --git a/examples/operator/101_initial_cluster.yaml b/examples/operator/101_initial_cluster.yaml index 272bc2ade35..0c1aae9e59f 100644 --- a/examples/operator/101_initial_cluster.yaml +++ b/examples/operator/101_initial_cluster.yaml @@ -7,6 +7,13 @@ kind: VitessCluster metadata: name: example spec: + backup: + engine: xtrabackup + locations: + - volume: + hostPath: + path: /tmp + type: Directory images: vtctld: vitess/lite:latest vtadmin: vitess/vtadmin:latest @@ -15,7 +22,7 @@ spec: vtbackup: vitess/lite:latest vtorc: vitess/lite:latest mysqld: - mysql80Compatible: mysql:8.0.40 + mysql80Compatible: vitess/lite:latest mysqldExporter: prom/mysqld-exporter:v0.14.0 cells: - name: zone1 diff --git a/examples/operator/201_customer_tablets.yaml b/examples/operator/201_customer_tablets.yaml index eec187ca0d9..1326ac447dd 100644 --- a/examples/operator/201_customer_tablets.yaml +++ b/examples/operator/201_customer_tablets.yaml @@ -3,6 +3,13 @@ kind: VitessCluster metadata: name: example spec: + backup: + engine: xtrabackup + locations: + - volume: + hostPath: + path: /tmp + type: Directory images: vtctld: vitess/lite:latest vtadmin: vitess/vtadmin:latest diff --git a/examples/operator/302_new_shards.yaml b/examples/operator/302_new_shards.yaml index 99cb64917de..7b617f68ff3 100644 --- a/examples/operator/302_new_shards.yaml +++ b/examples/operator/302_new_shards.yaml @@ -3,6 +3,13 @@ kind: VitessCluster metadata: name: example spec: + backup: + engine: xtrabackup + locations: + - volume: + hostPath: + path: /tmp + type: Directory images: vtctld: vitess/lite:latest vtadmin: vitess/vtadmin:latest diff --git a/examples/operator/306_down_shard_0.yaml b/examples/operator/306_down_shard_0.yaml index ce2b0adb142..f78ff27c35c 100644 --- a/examples/operator/306_down_shard_0.yaml +++ b/examples/operator/306_down_shard_0.yaml @@ -3,6 +3,13 @@ kind: VitessCluster metadata: name: example spec: + backup: + engine: xtrabackup + locations: + - volume: + hostPath: + path: /tmp + type: Directory images: vtctld: vitess/lite:latest vtadmin: vitess/vtadmin:latest diff --git a/examples/operator/401_scheduled_backups.yaml b/examples/operator/401_scheduled_backups.yaml index e1db0606061..661fc11fb64 100644 --- a/examples/operator/401_scheduled_backups.yaml +++ b/examples/operator/401_scheduled_backups.yaml @@ -11,8 +11,8 @@ spec: path: /tmp type: Directory schedules: - - name: "every-minute-customer" - schedule: "* * * * *" + - name: "commerce" + schedule: "*/2 * * * *" resources: requests: cpu: 100m @@ -23,14 +23,11 @@ spec: failedJobsHistoryLimit: 3 jobTimeoutMinute: 5 strategies: - - name: BackupShard - keyspace: "customer" - shard: "-80" - - name: BackupShard - keyspace: "customer" - shard: "80-" - - name: "every-minute-commerce" - schedule: "* * * * *" + - name: commerce_x + keyspace: "commerce" + shard: "-" + - name: "customer" + schedule: "*/2 * * * *" resources: requests: cpu: 100m @@ -41,9 +38,12 @@ spec: failedJobsHistoryLimit: 3 jobTimeoutMinute: 5 strategies: - - name: BackupShard - keyspace: "commerce" - shard: "-" + - name: customer_80-x + keyspace: "customer" + shard: "80-" + - name: customer_x-80 + keyspace: "customer" + shard: "-80" images: vtctld: vitess/lite:latest vtadmin: vitess/vtadmin:latest diff --git a/examples/operator/operator.yaml b/examples/operator/operator.yaml index 0098bded632..c98c60296be 100644 --- a/examples/operator/operator.yaml +++ b/examples/operator/operator.yaml @@ -416,6 +416,7 @@ spec: cluster: type: string concurrencyPolicy: + default: Forbid enum: - Allow - Forbid @@ -491,8 +492,6 @@ spec: example: commerce type: string name: - enum: - - BackupShard type: string shard: example: '-' @@ -542,6 +541,11 @@ spec: lastScheduledTime: format: date-time type: string + lastScheduledTimes: + additionalProperties: + format: date-time + type: string + type: object type: object type: object served: true @@ -2028,6 +2032,7 @@ spec: type: string type: object concurrencyPolicy: + default: Forbid enum: - Allow - Forbid @@ -2099,8 +2104,6 @@ spec: example: commerce type: string name: - enum: - - BackupShard type: string shard: example: '-' @@ -7695,7 +7698,8 @@ spec: fieldPath: metadata.name - name: OPERATOR_NAME value: vitess-operator - image: planetscale/vitess-operator:latest + image: docker.io/planetscale/vitess-operator:latest + imagePullPolicy: Never name: vitess-operator resources: limits: From 7f54af036f3e3f800151790775362445df0d4845 Mon Sep 17 00:00:00 2001 From: Florent Poinsard Date: Thu, 6 Mar 2025 11:34:44 -0600 Subject: [PATCH 2/2] revert unwanted change Signed-off-by: Florent Poinsard --- examples/operator/operator.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/operator/operator.yaml b/examples/operator/operator.yaml index c98c60296be..9cd9a8bd8f1 100644 --- a/examples/operator/operator.yaml +++ b/examples/operator/operator.yaml @@ -7698,8 +7698,7 @@ spec: fieldPath: metadata.name - name: OPERATOR_NAME value: vitess-operator - image: docker.io/planetscale/vitess-operator:latest - imagePullPolicy: Never + image: planetscale/vitess-operator:latest name: vitess-operator resources: limits: