@@ -23,8 +23,6 @@ import (
23
23
corev1 "k8s.io/api/core/v1"
24
24
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
25
25
"k8s.io/apimachinery/pkg/runtime"
26
- "k8s.io/apimachinery/pkg/runtime/schema"
27
- "sigs.k8s.io/controller-runtime/pkg/scheme"
28
26
"sigs.k8s.io/controller-runtime/pkg/webhook"
29
27
)
30
28
@@ -41,12 +39,11 @@ type ChaosPodStatus struct {
41
39
LastRun metav1.Time `json:"lastRun,omitempty"`
42
40
}
43
41
44
- // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
42
+ // +kubebuilder:object:root=true
45
43
46
44
// ChaosPod is the Schema for the randomjobs API
47
45
// +kubebuilder:printcolumn:name="next stop",type="string",JSONPath=".spec.nextStop",format="date"
48
46
// +kubebuilder:printcolumn:name="last run",type="string",JSONPath=".status.lastRun",format="date"
49
- // +k8s:openapi-gen=true
50
47
type ChaosPod struct {
51
48
metav1.TypeMeta `json:",inline"`
52
49
metav1.ObjectMeta `json:"metadata,omitempty"`
@@ -55,7 +52,7 @@ type ChaosPod struct {
55
52
Status ChaosPodStatus `json:"status,omitempty"`
56
53
}
57
54
58
- // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
55
+ // +kubebuilder:object:root=true
59
56
60
57
// ChaosPodList contains a list of ChaosPod
61
58
type ChaosPodList struct {
@@ -106,14 +103,3 @@ func (c *ChaosPod) Default() {
106
103
func init () {
107
104
SchemeBuilder .Register (& ChaosPod {}, & ChaosPodList {})
108
105
}
109
-
110
- var (
111
- // SchemeGroupVersion is group version used to register these objects
112
- SchemeGroupVersion = schema.GroupVersion {Group : "chaosapps.metamagical.io" , Version : "v1" }
113
-
114
- // SchemeBuilder is used to add go types to the GroupVersionKind scheme
115
- SchemeBuilder = & scheme.Builder {GroupVersion : SchemeGroupVersion }
116
-
117
- // AddToScheme is required by pkg/client/...
118
- AddToScheme = SchemeBuilder .AddToScheme
119
- )
0 commit comments