Skip to content

Commit bca6f48

Browse files
committed
Add a deprecation warning message to NIMService.spec.expose.ingress
Signed-off-by: Sheng Lin <[email protected]>
1 parent 8a2be3d commit bca6f48

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

internal/webhook/apps/v1alpha1/nimservice_webhook_validation_helper.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,15 @@ func validateNIMServiceSpec(spec *appsv1alpha1.NIMServiceSpec, fldPath *field.Pa
106106
return warningList, errList
107107
}
108108

109+
func validateExposeConfiguration(expose *appsv1alpha1.Expose, fldPath *field.Path) (admission.Warnings, field.ErrorList) {
110+
warningList := admission.Warnings{}
111+
errList := field.ErrorList{}
112+
if expose.Ingress.Enabled != nil && *expose.Ingress.Enabled {
113+
warningList = append(warningList, ".spec.expose.ingress is deprecated, use .spec.router instead.")
114+
}
115+
return warningList, errList
116+
}
117+
109118
func validateImageConfiguration(image *appsv1alpha1.Image, fldPath *field.Path) (admission.Warnings, field.ErrorList) {
110119
warningList := admission.Warnings{}
111120
errList := field.ErrorList{}

0 commit comments

Comments
 (0)