diff --git a/agent/structs/config_entry_gateways.go b/agent/structs/config_entry_gateways.go index e805e3bf0d5e..32fd966f6000 100644 --- a/agent/structs/config_entry_gateways.go +++ b/agent/structs/config_entry_gateways.go @@ -755,8 +755,8 @@ func (e *APIGatewayConfigEntry) Normalize() error { if cert.Kind == "" { cert.Kind = InlineCertificate } - cert.Merge(e.GetEnterpriseMeta()) - cert.Normalize() + cert.EnterpriseMeta.Merge(e.GetEnterpriseMeta()) + cert.EnterpriseMeta.Normalize() listener.TLS.Certificates[i] = cert } @@ -986,14 +986,14 @@ func (e *BoundAPIGatewayConfigEntry) GetMeta() map[string]string { return e.Meta func (e *BoundAPIGatewayConfigEntry) Normalize() error { for i, listener := range e.Listeners { for j, route := range listener.Routes { - route.Merge(&e.EnterpriseMeta) - route.Normalize() + route.EnterpriseMeta.Merge(&e.EnterpriseMeta) + route.EnterpriseMeta.Normalize() listener.Routes[j] = route } for j, cert := range listener.Certificates { - cert.Merge(&e.EnterpriseMeta) - cert.Normalize() + cert.EnterpriseMeta.Merge(&e.EnterpriseMeta) + cert.EnterpriseMeta.Normalize() listener.Certificates[j] = cert } diff --git a/agent/structs/config_entry_routes.go b/agent/structs/config_entry_routes.go index 0366d916ab3c..ca092c07d196 100644 --- a/agent/structs/config_entry_routes.go +++ b/agent/structs/config_entry_routes.go @@ -81,8 +81,8 @@ func (e *HTTPRouteConfigEntry) Normalize() error { if parent.Kind == "" { parent.Kind = APIGateway } - parent.Merge(e.GetEnterpriseMeta()) - parent.Normalize() + parent.EnterpriseMeta.Merge(e.GetEnterpriseMeta()) + parent.EnterpriseMeta.Normalize() e.Parents[i] = parent } @@ -101,8 +101,8 @@ func (e *HTTPRouteConfigEntry) Normalize() error { } func (e *HTTPRouteConfigEntry) normalizeHTTPService(service HTTPService) HTTPService { - service.Merge(e.GetEnterpriseMeta()) - service.Normalize() + service.EnterpriseMeta.Merge(e.GetEnterpriseMeta()) + service.EnterpriseMeta.Normalize() if service.Weight <= 0 { service.Weight = 1 } @@ -509,14 +509,14 @@ func (e *TCPRouteConfigEntry) Normalize() error { if parent.Kind == "" { parent.Kind = APIGateway } - parent.Merge(e.GetEnterpriseMeta()) - parent.Normalize() + parent.EnterpriseMeta.Merge(e.GetEnterpriseMeta()) + parent.EnterpriseMeta.Normalize() e.Parents[i] = parent } for i, service := range e.Services { - service.Merge(e.GetEnterpriseMeta()) - service.Normalize() + service.EnterpriseMeta.Merge(e.GetEnterpriseMeta()) + service.EnterpriseMeta.Normalize() e.Services[i] = service }