Skip to content

Commit 9a53a23

Browse files
Merge pull request #50 from PDOK/jd/ingressrouteurls-validation
Check if old url in part of ingressRouteURLs
2 parents 2e8004a + d159eda commit 9a53a23

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

api/v3/atom_validation.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ func (atom *Atom) ValidateUpdate(c client.Client, atomOld *Atom) ([]string, erro
4848
&allErrs,
4949
field.NewPath("spec").Child("service").Child("baseUrl"),
5050
)
51+
} else if atom.Spec.Service.BaseURL.String() != atomOld.Spec.Service.BaseURL.String() {
52+
err := smoothoperatorvalidation.ValidateIngressRouteURLsContainsBaseURL(atom.Spec.IngressRouteURLs, atomOld.Spec.Service.BaseURL, nil)
53+
if err != nil {
54+
allErrs = append(allErrs, err)
55+
}
5156
}
5257

5358
smoothoperatorvalidation.ValidateIngressRouteURLsNotRemoved(atomOld.Spec.IngressRouteURLs, atom.Spec.IngressRouteURLs, &allErrs, nil)

0 commit comments

Comments
 (0)