@@ -32,17 +32,15 @@ type BeforeClusterCreateRequest struct {
32
32
Cluster clusterv1.Cluster `json:"cluster"`
33
33
}
34
34
35
+ var _ RetryResponseObject = & BeforeClusterCreateResponse {}
36
+
35
37
// BeforeClusterCreateResponse is the response of the BeforeClusterCreate hook.
36
38
// +kubebuilder:object:root=true
37
39
type BeforeClusterCreateResponse struct {
38
40
metav1.TypeMeta `json:",inline"`
39
41
40
- // CommonResponse contains Status and Message fields common to all response types.
41
- CommonResponse `json:",inline"`
42
-
43
- // RetryAfterSeconds when set to a non-zero value signifies that the hook
44
- // will be called again at a future time.
45
- RetryAfterSeconds int `json:"retryAfterSeconds"`
42
+ // CommonRetryResponse contains RetryAfterSeconds field common to all retry response types.
43
+ CommonRetryResponse `json:",inline"`
46
44
}
47
45
48
46
// BeforeClusterCreate is the runtime hook that will be called right before a Cluster is created.
@@ -57,6 +55,8 @@ type AfterControlPlaneInitializedRequest struct {
57
55
Cluster clusterv1.Cluster `json:"cluster"`
58
56
}
59
57
58
+ var _ ResponseObject = & AfterControlPlaneInitializedResponse {}
59
+
60
60
// AfterControlPlaneInitializedResponse is the response of the AfterControlPlaneInitialized hook.
61
61
// +kubebuilder:object:root=true
62
62
type AfterControlPlaneInitializedResponse struct {
@@ -80,21 +80,20 @@ type BeforeClusterUpgradeRequest struct {
80
80
81
81
// The current Kubernetes version of the cluster.
82
82
FromKubernetesVersion string `json:"fromKubernetesVersion"`
83
+
83
84
// The target Kubernetes version of upgrade.
84
85
ToKubernetesVersion string `json:"toKubernetesVersion"`
85
86
}
86
87
88
+ var _ RetryResponseObject = & BeforeClusterUpgradeResponse {}
89
+
87
90
// BeforeClusterUpgradeResponse is the response of the BeforeClusterUpgrade hook.
88
91
// +kubebuilder:object:root=true
89
92
type BeforeClusterUpgradeResponse struct {
90
93
metav1.TypeMeta `json:",inline"`
91
94
92
- // CommonResponse contains Status and Message fields common to all response types.
93
- CommonResponse `json:",inline"`
94
-
95
- // RetryAfterSeconds when set to a non-zero value signifies that the hook
96
- // needs to be retried at a future time.
97
- RetryAfterSeconds int `json:"retryAfterSeconds"`
95
+ // CommonRetryResponse contains RetryAfterSeconds field common to all retry response types.
96
+ CommonRetryResponse `json:",inline"`
98
97
}
99
98
100
99
// BeforeClusterUpgrade is the runtime hook that will be called after a cluster.spec.version is upgraded and
@@ -113,17 +112,15 @@ type AfterControlPlaneUpgradeRequest struct {
113
112
KubernetesVersion string `json:"kubernetesVersion"`
114
113
}
115
114
115
+ var _ RetryResponseObject = & AfterControlPlaneUpgradeResponse {}
116
+
116
117
// AfterControlPlaneUpgradeResponse is the response of the AfterControlPlaneUpgrade hook.
117
118
// +kubebuilder:object:root=true
118
119
type AfterControlPlaneUpgradeResponse struct {
119
120
metav1.TypeMeta `json:",inline"`
120
121
121
- // CommonResponse contains Status and Message fields common to all response types.
122
- CommonResponse `json:",inline"`
123
-
124
- // RetryAfterSeconds when set to a non-zero value signifies that the hook
125
- // needs to be retried at a future time.
126
- RetryAfterSeconds int `json:"retryAfterSeconds"`
122
+ // CommonRetryResponse contains RetryAfterSeconds field common to all retry response types.
123
+ CommonRetryResponse `json:",inline"`
127
124
}
128
125
129
126
// AfterControlPlaneUpgrade is the runtime hook called after the control plane is successfully upgraded to the target
@@ -142,6 +139,8 @@ type AfterClusterUpgradeRequest struct {
142
139
KubernetesVersion string `json:"kubernetesVersion"`
143
140
}
144
141
142
+ var _ ResponseObject = & AfterClusterUpgradeResponse {}
143
+
145
144
// AfterClusterUpgradeResponse is the response of the AfterClusterUpgrade hook.
146
145
// +kubebuilder:object:root=true
147
146
type AfterClusterUpgradeResponse struct {
@@ -164,17 +163,15 @@ type BeforeClusterDeleteRequest struct {
164
163
Cluster clusterv1.Cluster `json:"cluster"`
165
164
}
166
165
166
+ var _ RetryResponseObject = & BeforeClusterDeleteResponse {}
167
+
167
168
// BeforeClusterDeleteResponse is the response of the BeforeClusterDelete hook.
168
169
// +kubebuilder:object:root=true
169
170
type BeforeClusterDeleteResponse struct {
170
171
metav1.TypeMeta `json:",inline"`
171
172
172
- // CommonResponse contains Status and Message fields common to all response types.
173
- CommonResponse `json:",inline"`
174
-
175
- // RetryAfterSeconds when set to a non-zero value signifies that the hook
176
- // needs to be retried at a future time.
177
- RetryAfterSeconds int `json:"retryAfterSeconds"`
173
+ // CommonRetryResponse contains RetryAfterSeconds field common to all retry response types.
174
+ CommonRetryResponse `json:",inline"`
178
175
}
179
176
180
177
// BeforeClusterDelete is the runtime hook that is called after a delete is issued on a cluster
0 commit comments