-
Notifications
You must be signed in to change notification settings - Fork 222
Open
Labels
kind/bugSomething isn't workingSomething isn't working
Description
Describe the bug
Restore job's apps.kubeblocks.io/pod-name
label did not respect InstanceTemplate and ordinals.
- pod name does not respect InstanceTemplate

- pod name's ordinal does not match pvc's ordinal

To Reproduce
Using cluster yaml likes below:
apiVersion: apps.kubeblocks.io/v1
kind: Cluster
metadata:
annotations:
kubeblocks.io/crd-api-version: apps.kubeblocks.io/v1
# kubeblocks.io/restore-from-backup: '{"mysql":{"encryptedSystemAccounts":"abc","name":"t-vip-mysql57-xaz-backup-qz4nw","namespace":"thomas-demo","volumeRestorePolicy":"Parallel"}}'
kubeblocks.io/restore-from-backup: '{"mysql":{"encryptedSystemAccounts":"abc","name":"t-vip-mysql57-xaz-backup-qz4nw","namespace":"thomas-demo","volumeRestorePolicy":"Serial"}}'
name: mysql57-restore
namespace: thomas-demo
spec:
clusterDef: vip-mysql
componentSpecs:
- componentDef: vip-mysql-5.7-1.0.0-alpha.0
instanceUpdateStrategy:
type: OnDelete
instances:
- annotations:
tpl: q9n0
name: q9n0
ordinals:
ranges:
- end: 299
start: 0
replicas: 2
- annotations:
tpl: iph1
name: iph1
ordinals:
ranges:
- end: 599
start: 300
replicas: 1
- annotations:
tpl: wte2
name: wte2
ordinals:
ranges:
- end: 899
start: 600
replicas: 2
name: mysql
persistentVolumeClaimRetentionPolicy:
whenDeleted: Delete
whenScaled: Retain
replicas: 5
resources:
limits:
cpu: "2"
memory: 4G
requests:
cpu: "2"
memory: 4G
# serviceVersion: 5.7.44-vip.1
volumeClaimTemplates:
- name: data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10G
# storageClassName: open-local-lvm
terminationPolicy: Delete
# topology: replset
Expected behavior
Restore job's pod label should respect InstanceTemplate and pvc ordinals
Desktop (please complete the following information):
- KB: 1.0.1-beta.7
Metadata
Metadata
Assignees
Labels
kind/bugSomething isn't workingSomething isn't working