Add clusterPropagationPolicy API
Signed-off-by: Kevin Wang <kevinwzf0126@gmail.com>
This commit is contained in:
parent
aaef8770ba
commit
6cd14a872f
|
@ -160,3 +160,30 @@ type PropagationPolicyList struct {
|
||||||
metav1.ListMeta `json:"metadata,omitempty"`
|
metav1.ListMeta `json:"metadata,omitempty"`
|
||||||
Items []PropagationPolicy `json:"items"`
|
Items []PropagationPolicy `json:"items"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// +genclient
|
||||||
|
// +genclient:nonNamespaced
|
||||||
|
// +kubebuilder:resource:scope="Cluster"
|
||||||
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
|
|
||||||
|
// ClusterPropagationPolicy represents the cluster-wide policy that propagates a group of resources to one or more clusters.
|
||||||
|
// Different with PropagationPolicy that could only propagate resources in its own namespace, ClusterPropagationPolicy
|
||||||
|
// is able to propagate cluster level resources and resources in any namespace other than system reserved ones.
|
||||||
|
// System reserved namespaces are: karmada-system, karmada-cluster, karmada-es-*.
|
||||||
|
type ClusterPropagationPolicy struct {
|
||||||
|
metav1.TypeMeta `json:",inline"`
|
||||||
|
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||||
|
|
||||||
|
// Spec represents the desired behavior of ClusterPropagationPolicy.
|
||||||
|
Spec PropagationSpec `json:"spec"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// +kubebuilder:resource:scope="Cluster"
|
||||||
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
|
|
||||||
|
// ClusterPropagationPolicyList contains a list of ClusterPropagationPolicy.
|
||||||
|
type ClusterPropagationPolicyList struct {
|
||||||
|
metav1.TypeMeta `json:",inline"`
|
||||||
|
metav1.ListMeta `json:"metadata,omitempty"`
|
||||||
|
Items []ClusterPropagationPolicy `json:"items"`
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue