-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #383 from duanmengkk/add_clusterpodconvertpolicy_api
add clusterpodconvertpolicy api
- Loading branch information
Showing
17 changed files
with
2,047 additions
and
5 deletions.
There are no files selected for viewing
1,374 changes: 1,374 additions & 0 deletions
1,374
deploy/crds/kosmos.io_clusterpodconvertpolicies.yaml
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package v1alpha1 | ||
|
||
import ( | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
||
// +genclient | ||
// +genclient:nonNamespaced | ||
// +kubebuilder:resource:scope="Cluster" | ||
// +kubebuilder:subresource:status | ||
// +kubebuilder:resource:shortName=pc | ||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object | ||
|
||
type ClusterPodConvertPolicy struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ObjectMeta `json:"metadata,omitempty"` | ||
|
||
// Spec is the specification for the behaviour of the PodConvertPolicy. | ||
// +required | ||
Spec ClusterPodConvertPolicySpec `json:"spec"` | ||
} | ||
|
||
type ClusterPodConvertPolicySpec struct { | ||
// A label query over a set of resources. | ||
// If name is not empty, labelSelector will be ignored. | ||
// +required | ||
LabelSelector metav1.LabelSelector `json:"labelSelector"` | ||
|
||
// A label query over a set of resources. | ||
// If name is not empty, LeafNodeSelector will be ignored. | ||
// +option | ||
LeafNodeSelector *metav1.LabelSelector `json:"leafNodeSelector,omitempty"` | ||
|
||
// Converters are some converter for convert pod when pod synced from root cluster to leaf cluster | ||
// pod will use these converters to scheduled in leaf cluster | ||
// +optional | ||
Converters *Converters `json:"converters,omitempty"` | ||
} | ||
|
||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object | ||
|
||
type ClusterPodConvertPolicyList struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ListMeta `json:"metadata"` | ||
Items []ClusterPodConvertPolicy `json:"items"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
152 changes: 152 additions & 0 deletions
152
pkg/generated/clientset/versioned/typed/kosmos/v1alpha1/clusterpodconvertpolicy.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.