Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: bks参数logBackupTemplate

[TiDB Usage Environment] Test environment Kubernetes environment, operator version 1.4.6
[TiDB Version] Enterprise Edition 7.1.0
[Reproduction Path] What operations were performed to cause the issue
[Encountered Issue: Problem Phenomenon and Impact]
- When creating bks and specifying logBackupTemplate as empty (multi-version, currently only version 7.1.0 supports log backup), a bk creation failure occurs after the cluster is created.
- When creating bks without specifying logBackupTemplate, the creation of bks fails with the following error message:
BackupSchedule.pingcap.com “basic-backup-schedule” is invalid: spec.logBackupTemplate: Invalid value: “null”: spec.logBackupTemplate in body must be of type object: “null”
Questions:
- Can the logBackupTemplate parameter be omitted when creating bks?
- If the logBackupTemplate parameter must be specified, how can the bk creation failure issue be resolved?
bks configuration is as follows:
kubectl get bks -n $v5 -o yaml
apiVersion: v1
items:
- apiVersion: pingcap.com/v1alpha1
kind: BackupSchedule
metadata:
creationTimestamp: “2024-03-13T06:39:52Z”
generation: 22
name: basic-backup-schedule
namespace: 9015e36d-9378-4637-9169-c71bf8d659fb
resourceVersion: “641794849”
selfLink: /apis/pingcap.com/v1alpha1/namespaces/9015e36d-9378-4637-9169-c71bf8d659fb/backupschedules/basic-backup-schedule
uid: 6b6c9008-8fd6-4251-a7f8-f1a8f5341b95
spec:
backupTemplate:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: failure-domain.beta.kubernetes.io/zone
operator: In
values:
- cn-qingyangtest-1a
backoffRetryPolicy:
maxRetryTimes: 2
minRetryDuration: 300s
retryTimeout: 30m
backupMode: snapshot
backupType: full
br:
cluster: basic
clusterNamespace: 9015e36d-9378-4637-9169-c71bf8d659fb
sendCredToTikv: true
cleanPolicy: Retain
resources: {}
s3:
bucket: tidb-ks3-bucket
endpoint: http://ks.ksyun.com
prefix: 20001/9fb/manual/
provider: other
region: BEIJING
secretName: ks3-secret
toolImage: hub.kce.ksyun/b/br:v5.4.1
imagePullSecrets:- name: nosql-image
logBackupTemplate:
backoffRetryPolicy:
maxRetryTimes: 2
minRetryDuration: 300s
retryTimeout: 30m
backupMode: snapshot
resources: {}
maxBackups: 0
schedule: ‘*/5 * * * *’
storageClassName: openebs-hostpath
status:
lastBackup: basic-backup-schedule-2024-03-13t10-25-00
lastBackupTime: “2024-03-13T10:25:00Z”
logBackup: log-basic-backup-schedule
kind: List
metadata:
resourceVersion: “”
selfLink: “”
- name: nosql-image