Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update operator.yaml and add schedule backup example #15969

Merged
merged 3 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
187 changes: 187 additions & 0 deletions examples/operator/401_scheduled_backups.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
apiVersion: planetscale.com/v2
kind: VitessCluster
metadata:
name: example
spec:
backup:
engine: xtrabackup
locations:
- volume:
hostPath:
path: /tmp
type: Directory
schedules:
- name: "every-minute-customer"
schedule: "* * * * *"
resources:
requests:
cpu: 100m
memory: 1024Mi
limits:
memory: 1024Mi
successfulJobsHistoryLimit: 2
failedJobsHistoryLimit: 3
jobTimeoutMinute: 5
strategies:
- name: BackupShard
keyspaceShard: "customer/-80"
- name: BackupShard
keyspaceShard: "customer/80-"
- name: "every-minute-commerce"
schedule: "* * * * *"
resources:
requests:
cpu: 100m
memory: 1024Mi
limits:
memory: 1024Mi
successfulJobsHistoryLimit: 2
failedJobsHistoryLimit: 3
jobTimeoutMinute: 5
strategies:
- name: BackupShard
keyspaceShard: "commerce/-"
images:
vtctld: vitess/lite:latest
vtadmin: vitess/vtadmin:latest
vtgate: vitess/lite:latest
vttablet: vitess/lite:latest
vtbackup: vitess/lite:latest
vtorc: vitess/lite:latest
mysqld:
mysql80Compatible: mysql:8.0.30
mysqldExporter: prom/mysqld-exporter:v0.11.0
cells:
- name: zone1
gateway:
authentication:
static:
secret:
name: example-cluster-config
key: users.json
replicas: 1
resources:
requests:
cpu: 100m
memory: 256Mi
limits:
memory: 256Mi
vitessDashboard:
cells:
- zone1
extraFlags:
security_policy: read-only
replicas: 1
resources:
limits:
memory: 128Mi
requests:
cpu: 100m
memory: 128Mi
vtadmin:
rbac:
name: example-cluster-config
key: rbac.yaml
cells:
- zone1
apiAddresses:
- http://localhost:14001
replicas: 1
readOnly: false
apiResources:
limits:
memory: 128Mi
requests:
cpu: 100m
memory: 128Mi
webResources:
limits:
memory: 128Mi
requests:
cpu: 100m
memory: 128Mi

keyspaces:
- name: commerce
durabilityPolicy: none
turndownPolicy: Immediate
vitessOrchestrator:
resources:
limits:
memory: 128Mi
requests:
cpu: 100m
memory: 128Mi
extraFlags:
recovery-period-block-duration: 5s
partitionings:
- equal:
parts: 1
shardTemplate:
databaseInitScriptSecret:
name: example-cluster-config
key: init_db.sql
tabletPools:
- cell: zone1
type: replica
replicas: 2
vttablet:
extraFlags:
db_charset: utf8mb4
wait_for_backup_interval: "0"
resources:
limits:
memory: 1024Mi
requests:
cpu: 100m
memory: 1024Mi
mysqld:
resources:
limits:
memory: 1024Mi
requests:
cpu: 100m
memory: 512Mi
dataVolumeClaimTemplate:
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 10Gi
- name: customer
durabilityPolicy: none
turndownPolicy: Immediate
partitionings:
- equal:
parts: 2
shardTemplate:
databaseInitScriptSecret:
name: example-cluster-config
key: init_db.sql
tabletPools:
- cell: zone1
type: replica
replicas: 2
vttablet:
extraFlags:
db_charset: utf8mb4
wait_for_backup_interval: "0"
resources:
limits:
memory: 1024Mi
requests:
cpu: 100m
memory: 1024Mi
mysqld:
resources:
limits:
memory: 1024Mi
requests:
cpu: 100m
memory: 512Mi
dataVolumeClaimTemplate:
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 10Gi
updateStrategy:
type: Immediate
Loading
Loading