You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnfalse, fmt.Errorf("only a single instance of Non-Admin Controller can be installed across the entire cluster. Non-Admin controller is already configured and installed in %s namespace", dpa.Namespace)
returnfalse, fmt.Errorf("only a single instance of Non-Admin Controller can be installed across the entire cluster. Non-Admin controller is already configured and installed in %s namespace", dpa.Namespace)
messageErr: "only a single instance of Non-Admin Controller can be installed across the entire cluster. Non-Admin controller is already configured and installed in test-another-ns namespace",
1509
1509
},
1510
+
{
1511
+
name: "[valid] DPA CR: NonAdmin.Enable is true with another DPA having NonAdmin.Enable false",
1512
+
dpa: &oadpv1alpha1.DataProtectionApplication{
1513
+
ObjectMeta: metav1.ObjectMeta{
1514
+
Name: "test-DPA-CR",
1515
+
Namespace: "test-ns",
1516
+
},
1517
+
Spec: oadpv1alpha1.DataProtectionApplicationSpec{
1518
+
NonAdmin: &oadpv1alpha1.NonAdmin{
1519
+
Enable: pointer.Bool(true),
1520
+
},
1521
+
Configuration: &oadpv1alpha1.ApplicationConfig{
1522
+
Velero: &oadpv1alpha1.VeleroConfig{
1523
+
DefaultPlugins: []oadpv1alpha1.DefaultPlugin{
1524
+
oadpv1alpha1.DefaultPluginAWS,
1525
+
},
1526
+
NoDefaultBackupLocation: true,
1527
+
},
1528
+
},
1529
+
BackupImages: pointer.Bool(false),
1530
+
},
1531
+
},
1532
+
objects: []client.Object{
1533
+
&oadpv1alpha1.DataProtectionApplication{
1534
+
ObjectMeta: metav1.ObjectMeta{
1535
+
Name: "another-DPA-CR",
1536
+
Namespace: "test-another-ns",
1537
+
},
1538
+
Spec: oadpv1alpha1.DataProtectionApplicationSpec{
1539
+
NonAdmin: &oadpv1alpha1.NonAdmin{
1540
+
Enable: pointer.Bool(false),
1541
+
},
1542
+
},
1543
+
},
1544
+
&appsv1.Deployment{
1545
+
ObjectMeta: metav1.ObjectMeta{
1546
+
Name: "non-admin-controller",
1547
+
Namespace: "test-another-ns",
1548
+
},
1549
+
},
1550
+
},
1551
+
wantErr: false,
1552
+
},
1510
1553
{
1511
1554
name: "given invalid DPA CR aws and legacy-aws plugins both specified",
0 commit comments