@@ -180,11 +180,11 @@ type ContainerSpec struct {
180
180
181
181
type PodSpec struct {
182
182
// +kubebuilder:validation:Required
183
- Size int32 `json:"size,omitempty"`
184
- Annotations map [string ]string `json:"annotations,omitempty"`
185
- Labels map [string ]string `json:"labels,omitempty"`
186
- VolumeSpec * VolumeSpec `json:"volumeSpec,omitempty"`
187
- InitImage string `json:"initImage ,omitempty"`
183
+ Size int32 `json:"size,omitempty"`
184
+ Annotations map [string ]string `json:"annotations,omitempty"`
185
+ Labels map [string ]string `json:"labels,omitempty"`
186
+ VolumeSpec * VolumeSpec `json:"volumeSpec,omitempty"`
187
+ InitContainer InitContainerSpec `json:"initContainer ,omitempty"`
188
188
189
189
Affinity * PodAffinity `json:"affinity,omitempty"`
190
190
TopologySpreadConstraints []corev1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
@@ -213,9 +213,8 @@ func (s PodSpec) GetTerminationGracePeriodSeconds() *int64 {
213
213
return & gp
214
214
}
215
215
216
- // Retrieves the initialization image for the pod.
217
- func (s * PodSpec ) GetInitImage () string {
218
- return s .InitImage
216
+ func (s * PodSpec ) GetInitSpec () InitContainerSpec {
217
+ return s .InitContainer
219
218
}
220
219
221
220
type PMMSpec struct {
@@ -231,7 +230,7 @@ type PMMSpec struct {
231
230
type BackupSpec struct {
232
231
Enabled bool `json:"enabled,omitempty"`
233
232
Image string `json:"image"`
234
- InitImage string `json:"initImage ,omitempty"`
233
+ InitContainer InitContainerSpec `json:"initContainer ,omitempty"`
235
234
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
236
235
ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
237
236
ServiceAccountName string `json:"serviceAccountName,omitempty"`
@@ -253,9 +252,8 @@ type BackupSchedule struct {
253
252
StorageName string `json:"storageName,omitempty"`
254
253
}
255
254
256
- // Retrieves the initialization image for the backup.
257
- func (s * BackupSpec ) GetInitImage () string {
258
- return s .InitImage
255
+ func (s * BackupSpec ) GetInitSpec () InitContainerSpec {
256
+ return s .InitContainer
259
257
}
260
258
261
259
type BackupStorageType string
0 commit comments