diff --git a/api/v1alpha1/serviceintentions_types.go b/api/v1alpha1/serviceintentions_types.go index e3532a77b2..3cca51bf38 100644 --- a/api/v1alpha1/serviceintentions_types.go +++ b/api/v1alpha1/serviceintentions_types.go @@ -324,11 +324,11 @@ func (in *ServiceIntentions) validateNamespaces(namespacesEnabled bool) field.Er path := field.NewPath("spec") if !namespacesEnabled { if in.Spec.Destination.Namespace != "" { - errs = append(errs, field.Invalid(path.Child("destination").Child("namespace"), in.Spec.Destination.Namespace, `consul namespaces must be enabled to set destination.namespace`)) + errs = append(errs, field.Invalid(path.Child("destination").Child("namespace"), in.Spec.Destination.Namespace, `Consul Enterprise namespaces must be enabled to set destination.namespace`)) } for i, source := range in.Spec.Sources { if source.Namespace != "" { - errs = append(errs, field.Invalid(path.Child("sources").Index(i).Child("namespace"), source.Namespace, `consul namespaces must be enabled to set source.namespace`)) + errs = append(errs, field.Invalid(path.Child("sources").Index(i).Child("namespace"), source.Namespace, `Consul Enterprise namespaces must be enabled to set source.namespace`)) } } } diff --git a/api/v1alpha1/serviceintentions_webhook_test.go b/api/v1alpha1/serviceintentions_webhook_test.go index 33b14665f2..b8ee8044c9 100644 --- a/api/v1alpha1/serviceintentions_webhook_test.go +++ b/api/v1alpha1/serviceintentions_webhook_test.go @@ -496,7 +496,7 @@ func TestHandle_ServiceIntentions_Patches(t *testing.T) { }, }, expPatches: []jsonpatch.Operation{}, - errMsg: `serviceintentions.consul.hashicorp.com "foo-intention" is invalid: [spec.destination.namespace: Invalid value: "bar": consul namespaces must be enabled to set destination.namespace, spec.sources[0].namespace: Invalid value: "baz": consul namespaces must be enabled to set source.namespace]`, + errMsg: `serviceintentions.consul.hashicorp.com "foo-intention" is invalid: [spec.destination.namespace: Invalid value: "bar": Consul Enterprise namespaces must be enabled to set destination.namespace, spec.sources[0].namespace: Invalid value: "baz": Consul Enterprise namespaces must be enabled to set source.namespace]`, }, "destination.namespace empty": { newResource: &ServiceIntentions{ @@ -577,7 +577,7 @@ func TestHandle_ServiceIntentions_Patches(t *testing.T) { }, }, expPatches: []jsonpatch.Operation{}, - errMsg: `serviceintentions.consul.hashicorp.com "foo-intention" is invalid: spec.destination.namespace: Invalid value: "bar": consul namespaces must be enabled to set destination.namespace`, + errMsg: `serviceintentions.consul.hashicorp.com "foo-intention" is invalid: spec.destination.namespace: Invalid value: "bar": Consul Enterprise namespaces must be enabled to set destination.namespace`, }, } for name, c := range cases { diff --git a/api/v1alpha1/serviceresolver_types.go b/api/v1alpha1/serviceresolver_types.go index 9d636979ee..8f9883d157 100644 --- a/api/v1alpha1/serviceresolver_types.go +++ b/api/v1alpha1/serviceresolver_types.go @@ -155,12 +155,12 @@ func (in *ServiceResolver) validateNamespaces(namespacesEnabled bool) field.Erro if !namespacesEnabled { if in.Spec.Redirect != nil { if in.Spec.Redirect.Namespace != "" { - errs = append(errs, field.Invalid(path.Child("redirect").Child("namespace"), in.Spec.Redirect.Namespace, `consul namespaces must be enabled to set redirect.namespace`)) + errs = append(errs, field.Invalid(path.Child("redirect").Child("namespace"), in.Spec.Redirect.Namespace, `Consul Enterprise namespaces must be enabled to set redirect.namespace`)) } } for k, v := range in.Spec.Failover { if v.Namespace != "" { - errs = append(errs, field.Invalid(path.Child("failover").Key(k).Child("namespace"), v.Namespace, `consul namespaces must be enabled to set failover.namespace`)) + errs = append(errs, field.Invalid(path.Child("failover").Key(k).Child("namespace"), v.Namespace, `Consul Enterprise namespaces must be enabled to set failover.namespace`)) } } diff --git a/api/v1alpha1/servicerouter_types.go b/api/v1alpha1/servicerouter_types.go index bae63b3771..3fa5f3eb4e 100644 --- a/api/v1alpha1/servicerouter_types.go +++ b/api/v1alpha1/servicerouter_types.go @@ -402,7 +402,7 @@ func (in *ServiceRouter) validateNamespaces(namespacesEnabled bool) field.ErrorL for i, r := range in.Spec.Routes { if r.Destination != nil { if r.Destination.Namespace != "" { - errs = append(errs, field.Invalid(path.Child("routes").Index(i).Child("destination").Child("namespace"), r.Destination.Namespace, `consul namespaces must be enabled to set destination.namespace`)) + errs = append(errs, field.Invalid(path.Child("routes").Index(i).Child("destination").Child("namespace"), r.Destination.Namespace, `Consul Enterprise namespaces must be enabled to set destination.namespace`)) } } } diff --git a/api/v1alpha1/servicesplitter_types.go b/api/v1alpha1/servicesplitter_types.go index 67de911205..a8446fa38b 100644 --- a/api/v1alpha1/servicesplitter_types.go +++ b/api/v1alpha1/servicesplitter_types.go @@ -172,7 +172,7 @@ func (in *ServiceSplitter) validateNamespaces(namespacesEnabled bool) field.Erro if !namespacesEnabled { for i, s := range in.Spec.Splits { if s.Namespace != "" { - errs = append(errs, field.Invalid(path.Child("splits").Index(i).Child("namespace"), s.Namespace, `consul namespaces must be enabled to set split.namespace`)) + errs = append(errs, field.Invalid(path.Child("splits").Index(i).Child("namespace"), s.Namespace, `Consul Enterprise namespaces must be enabled to set split.namespace`)) } }