@@ -25,7 +25,8 @@ func (atom *Atom) ValidateCreate(c client.Client) ([]string, error) {
2525 allErrs = append (allErrs , err )
2626 }
2727
28- ValidateAtom (c , atom , & warnings , & allErrs )
28+ ValidateAtom (atom , & warnings , & allErrs )
29+ ValidateOwnerInfo (c , atom , & allErrs )
2930
3031 if len (allErrs ) == 0 {
3132 return warnings , nil
@@ -57,7 +58,8 @@ func (atom *Atom) ValidateUpdate(c client.Client, atomOld *Atom) ([]string, erro
5758
5859 smoothoperatorvalidation .ValidateIngressRouteURLsNotRemoved (atomOld .Spec .IngressRouteURLs , atom .Spec .IngressRouteURLs , & allErrs , nil )
5960
60- ValidateAtom (c , atom , & warnings , & allErrs )
61+ ValidateAtom (atom , & warnings , & allErrs )
62+ ValidateOwnerInfo (c , atom , & allErrs )
6163
6264 if len (allErrs ) == 0 {
6365 return warnings , nil
@@ -68,9 +70,7 @@ func (atom *Atom) ValidateUpdate(c client.Client, atomOld *Atom) ([]string, erro
6870 atom .Name , allErrs )
6971}
7072
71- func ValidateAtom (c client.Client , atom * Atom , warnings * []string , allErrs * field.ErrorList ) {
72- ValidateAtomWithoutClusterChecks (atom , warnings , allErrs )
73-
73+ func ValidateOwnerInfo (c client.Client , atom * Atom , allErrs * field.ErrorList ) {
7474 ownerInfoRef := atom .Spec .Service .OwnerInfoRef
7575 ownerInfo := & smoothoperatorv1.OwnerInfo {}
7676 objectKey := client.ObjectKey {
@@ -90,7 +90,7 @@ func ValidateAtom(c client.Client, atom *Atom, warnings *[]string, allErrs *fiel
9090 }
9191}
9292
93- func ValidateAtomWithoutClusterChecks (atom * Atom , warnings * []string , allErrs * field.ErrorList ) {
93+ func ValidateAtom (atom * Atom , warnings * []string , allErrs * field.ErrorList ) {
9494 var fieldPath * field.Path
9595 if strings .Contains (atom .GetName (), "atom" ) {
9696 fieldPath = field .NewPath ("metadata" ).Child ("name" )
0 commit comments