Skip to content

Commit f961bc7

Browse files
igor-karpukhinfabritsius
authored andcommitted
Fixed missing export field (#897)
1 parent 7105329 commit f961bc7

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

pkg/controller/atlasdeployment/backup.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,13 @@ func (r *AtlasDeploymentReconciler) updateBackupScheduleAndPolicy(
209209
CopySettings: make([]mongodbatlas.CopySetting, 0, len(bSchedule.Spec.CopySettings)),
210210
}
211211

212+
if bSchedule.Spec.Export != nil {
213+
apiScheduleReq.Export = &mongodbatlas.Export{
214+
ExportBucketID: bSchedule.Spec.Export.ExportBucketID,
215+
FrequencyType: bSchedule.Spec.Export.FrequencyType,
216+
}
217+
}
218+
212219
for _, copySetting := range bSchedule.Spec.CopySettings {
213220
apiScheduleReq.CopySettings = append(
214221
apiScheduleReq.CopySettings,

test/int/deployment_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,7 +1102,6 @@ var _ = Describe("AtlasDeployment", Label("int", "AtlasDeployment"), func() {
11021102
ReferenceMinuteOfHour: 10,
11031103
RestoreWindowDays: 5,
11041104
UpdateSnapshots: false,
1105-
Export: &mdbv1.AtlasBackupExportSpec{FrequencyType: "MONTHLY"},
11061105
},
11071106
}
11081107

@@ -1216,7 +1215,6 @@ var _ = Describe("AtlasDeployment", Label("int", "AtlasDeployment"), func() {
12161215
ReferenceMinuteOfHour: 10,
12171216
RestoreWindowDays: 5,
12181217
UpdateSnapshots: false,
1219-
Export: &mdbv1.AtlasBackupExportSpec{FrequencyType: "MONTHLY"},
12201218
CopySettings: []mdbv1.CopySetting{
12211219
{
12221220
CloudProvider: toptr.MakePtr("AWS"),

0 commit comments

Comments
 (0)