Skip to content

Commit

Permalink
Explicitly call enterprise meta
Browse files Browse the repository at this point in the history
  • Loading branch information
jm96441n committed Mar 27, 2023
1 parent 2835cbd commit 9edac16
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions agent/structs/config_entry_gateways.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}
Expand Down
16 changes: 8 additions & 8 deletions agent/structs/config_entry_routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand All @@ -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
}
Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit 9edac16

Please sign in to comment.