Skip to content

Commit f2490fe

Browse files
committed
NS included via labelSelector act as IncludedNamespaces
every item under NS is included. Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
1 parent 294bbbc commit f2490fe

21 files changed

+156
-303
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
breaking: Namespaces included by labelSelector act as IncludedNamespaces, all items including unlabeled under a namespace with labelSelector selected by backup selector will be included in the backup.

config/crd/v1/bases/velero.io_backuprepositories.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.14.0
6+
controller-gen.kubebuilder.io/version: v0.16.5
77
name: backuprepositories.velero.io
88
spec:
99
group: velero.io

config/crd/v1/bases/velero.io_backups.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.14.0
6+
controller-gen.kubebuilder.io/version: v0.16.5
77
name: backups.velero.io
88
spec:
99
group: velero.io
@@ -63,7 +63,6 @@ spec:
6363
DefaultVolumesToRestic specifies whether restic should be used to take a
6464
backup of all pod volumes by default.
6565
66-
6766
Deprecated: this field is no longer used and will be removed entirely in future. Use DefaultVolumesToFsBackup instead.
6867
nullable: true
6968
type: boolean
@@ -337,7 +336,9 @@ spec:
337336
description: |-
338337
LabelSelector is a metav1.LabelSelector to filter with
339338
when adding individual objects to the backup. If empty
340-
or nil, all objects are included. Optional.
339+
or nil, all objects are included.
340+
If matched object is Namespace, the namespace will act as IncludedNamespaces,
341+
and all resources in the namespace are included in the backup. Optional.
341342
nullable: true
342343
properties:
343344
matchExpressions:

config/crd/v1/bases/velero.io_backupstoragelocations.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.14.0
6+
controller-gen.kubebuilder.io/version: v0.16.5
77
name: backupstoragelocations.velero.io
88
spec:
99
group: velero.io
@@ -92,9 +92,7 @@ spec:
9292
This field is effectively required, but due to backwards compatibility is
9393
allowed to be empty. Instances of this type with an empty value here are
9494
almost certainly wrong.
95-
TODO: Add other useful fields. apiVersion, kind, uid?
9695
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
97-
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
9896
type: string
9997
optional:
10098
description: Specify whether the Secret or its key must be defined
@@ -146,7 +144,6 @@ spec:
146144
description: |-
147145
AccessMode is an unused field.
148146
149-
150147
Deprecated: there is now an AccessMode field on the Spec and this field
151148
will be removed entirely as of v2.0.
152149
enum:
@@ -158,7 +155,6 @@ spec:
158155
LastSyncedRevision is the value of the `metadata/revision` file in the backup
159156
storage location the last time the BSL's contents were synced into the cluster.
160157
161-
162158
Deprecated: this field is no longer updated or used for detecting changes to
163159
the location's contents and will be removed entirely in v2.0.
164160
type: string

config/crd/v1/bases/velero.io_deletebackuprequests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.14.0
6+
controller-gen.kubebuilder.io/version: v0.16.5
77
name: deletebackuprequests.velero.io
88
spec:
99
group: velero.io

config/crd/v1/bases/velero.io_downloadrequests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.14.0
6+
controller-gen.kubebuilder.io/version: v0.16.5
77
name: downloadrequests.velero.io
88
spec:
99
group: velero.io

config/crd/v1/bases/velero.io_podvolumebackups.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.14.0
6+
controller-gen.kubebuilder.io/version: v0.16.5
77
name: podvolumebackups.velero.io
88
spec:
99
group: velero.io
@@ -96,7 +96,6 @@ spec:
9696
the event) or if no container name is specified "spec.containers[2]" (container with
9797
index 2 in this pod). This syntax is chosen only to have some well-defined way of
9898
referencing a part of an object.
99-
TODO: this design is not final and this field is subject to change in the future.
10099
type: string
101100
kind:
102101
description: |-

config/crd/v1/bases/velero.io_podvolumerestores.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.14.0
6+
controller-gen.kubebuilder.io/version: v0.16.5
77
name: podvolumerestores.velero.io
88
spec:
99
group: velero.io
@@ -93,7 +93,6 @@ spec:
9393
the event) or if no container name is specified "spec.containers[2]" (container with
9494
index 2 in this pod). This syntax is chosen only to have some well-defined way of
9595
referencing a part of an object.
96-
TODO: this design is not final and this field is subject to change in the future.
9796
type: string
9897
kind:
9998
description: |-

config/crd/v1/bases/velero.io_restores.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.14.0
6+
controller-gen.kubebuilder.io/version: v0.16.5
77
name: restores.velero.io
88
spec:
99
group: velero.io

config/crd/v1/bases/velero.io_schedules.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.14.0
6+
controller-gen.kubebuilder.io/version: v0.16.5
77
name: schedules.velero.io
88
spec:
99
group: velero.io
@@ -102,7 +102,6 @@ spec:
102102
DefaultVolumesToRestic specifies whether restic should be used to take a
103103
backup of all pod volumes by default.
104104
105-
106105
Deprecated: this field is no longer used and will be removed entirely in future. Use DefaultVolumesToFsBackup instead.
107106
nullable: true
108107
type: boolean
@@ -378,7 +377,9 @@ spec:
378377
description: |-
379378
LabelSelector is a metav1.LabelSelector to filter with
380379
when adding individual objects to the backup. If empty
381-
or nil, all objects are included. Optional.
380+
or nil, all objects are included.
381+
If matched object is Namespace, the namespace will act as IncludedNamespaces,
382+
and all resources in the namespace are included in the backup. Optional.
382383
nullable: true
383384
properties:
384385
matchExpressions:

0 commit comments

Comments
 (0)