Skip to content

Commit 6d749ad

Browse files
committed
Bypassing webhook validation for Azure SharedGallery
1 parent e3c6f86 commit 6d749ad

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

api/v1beta1/azureimage_validation.go

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,17 @@ func validateSingleDetailsOnly(image *Image, fldPath *field.Path) field.ErrorLis
6363
}
6464
}
6565

66-
if image.SharedGallery != nil {
67-
if imageDetailsFound {
68-
allErrs = append(allErrs, field.Forbidden(fldPath.Child("SharedGallery"), "SharedGallery cannot be used as an image ID. Marketplace or ComputeGallery images has been specified"))
69-
} else {
70-
imageDetailsFound = true
71-
}
72-
}
66+
// TODO: VISHU
67+
// Commenting this out since after CAPZ upgrade to v1.18.0, palette will be using both ComputeGallery & Shared Gallery
68+
// to support palette version upgrade and not cause node repave.
69+
// This function was causing to either allow one of them.
70+
//if image.SharedGallery != nil {
71+
// if imageDetailsFound {
72+
// allErrs = append(allErrs, field.Forbidden(fldPath.Child("SharedGallery"), "SharedGallery cannot be used as an image ID. Marketplace or ComputeGallery images has been specified"))
73+
// } else {
74+
// imageDetailsFound = true
75+
// }
76+
//}
7377

7478
if image.ComputeGallery != nil {
7579
if imageDetailsFound {

0 commit comments

Comments
 (0)