-
Bug
-
Resolution: Not a Bug
-
Normal
-
None
-
False
-
-
False
-
Passed
-
0
-
0
-
Very Likely
-
0
-
None
-
Unset
-
Unknown
-
No
Description of problem:
orLabelSelectors as well as labelSelector cannot co-exist, only one of them can be specified in the backup request.
However when use creates the following request:
apiVersion: velero.io/v1
kind: Backup
metadata:
name: backup11x
namespace: openshift-adp
spec:
LabelSelector:
matchLabels:
app: velero
component: server
orLabelSelectors:
- matchLabels:
app: mysql
- matchLabels:
testing: fooddd
hooks: {}
storageLocation: example-velero-1
ttl: 720h0m0s
the backup ignores the LabelSelector and go ahead and create a back for an up have one of the lables mentioned in orLabelSelectors
Version-Release number of selected component (if applicable):
Client:
Version: v1.9.0-OADP
Git commit: -
Server:
Version: v1.9.0-OADP
registry.redhat.io/oadp/oadp-rhel8-operator@sha256:6321acebb1419f36d1348924dff74df370b31888a40004a3291119a389b04bb5
brew.registry.redhat.io/rh-osbs/iib:289368
How reproducible:
always
Steps to Reproduce:
Create an app that have 2 labels:
app: mysql
testing: foo
create a backup with the request above
Actual results:
velero backup logs backup11x -n openshift-adp
time="2022-08-09T11:05:19Z" level=info msg="Backed up 11 items out of an estimated total of 11 (estimate will change throughout the backup)" backup=openshift-adp/backup1
1x logSource="pkg/backup/backup.go:380" name=mysql-persistent namespace= progress= resource=projects.project.openshift.io
time="2022-08-09T11:05:20Z" level=info msg="Backed up a total of 11 items" backup=openshift-adp/backup11x logSource="pkg/backup/backup.go:405" progress=
Expected results:
error msg: Lableselectoprs and or labelselectors cannot coexsit
reference to documentation: https://velero.io/docs/v1.9/api-types/backup/
Expected results:
Additional info: