mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
deepcopy: add interface deepcopy funcs
- add DeepCopyObject() to runtime.Object interface - add DeepCopyObject() via deepcopy-gen - add DeepCopyObject() manually - add DeepCopySelector() to selector interfaces - add custom DeepCopy func for TableRow.Cells
This commit is contained in:
@@ -22,6 +22,7 @@ import (
|
||||
)
|
||||
|
||||
// +genclient=true
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// Job represents the configuration of a single job.
|
||||
type Job struct {
|
||||
@@ -42,6 +43,8 @@ type Job struct {
|
||||
Status JobStatus
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// JobList is a collection of jobs.
|
||||
type JobList struct {
|
||||
metav1.TypeMeta
|
||||
@@ -54,6 +57,8 @@ type JobList struct {
|
||||
Items []Job
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// JobTemplate describes a template for creating copies of a predefined pod.
|
||||
type JobTemplate struct {
|
||||
metav1.TypeMeta
|
||||
@@ -188,6 +193,7 @@ type JobCondition struct {
|
||||
}
|
||||
|
||||
// +genclient=true
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// CronJob represents the configuration of a single cron job.
|
||||
type CronJob struct {
|
||||
@@ -208,6 +214,8 @@ type CronJob struct {
|
||||
Status CronJobStatus
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// CronJobList is a collection of cron jobs.
|
||||
type CronJobList struct {
|
||||
metav1.TypeMeta
|
||||
|
||||
Reference in New Issue
Block a user