Skip to content

Commit 28ba8da

Browse files
committed
support namespaceselectors for cluster propagation policies
1 parent 72b6bd7 commit 28ba8da

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Diff for: pkg/apis/policy/v1alpha1/propagation_types.go

+11
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ type PropagationSpec struct {
6868
// +kubebuilder:validation:MinItems=1
6969
ResourceSelectors []ResourceSelector `json:"resourceSelectors"`
7070

71+
// NamespaceSelectors used to select resources.
72+
// +optional
73+
NamespaceSelectors []NamespaceSelector `json:"namespaceSelectors"`
74+
7175
// Association tells if relevant resources should be selected automatically.
7276
// e.g. a ConfigMap referred by a Deployment.
7377
// default false.
@@ -228,6 +232,13 @@ type ResourceSelector struct {
228232
LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty"`
229233
}
230234

235+
// NamespaceSelector the resource namespace will be selected.
236+
type NamespaceSelector struct {
237+
// A label query over a set of namespaces.
238+
// +required
239+
LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty"`
240+
}
241+
231242
// FieldSelector is a field filter.
232243
type FieldSelector struct {
233244
// A list of field selector requirements.

0 commit comments

Comments
 (0)