@@ -36,6 +36,7 @@ import (
36
36
37
37
"github.com/kubernetes-sigs/ingress2gateway/pkg/i2gw"
38
38
"github.com/kubernetes-sigs/ingress2gateway/pkg/i2gw/intermediate"
39
+ "github.com/kubernetes-sigs/ingress2gateway/pkg/i2gw/notifications"
39
40
"github.com/kubernetes-sigs/ingress2gateway/pkg/i2gw/providers/common"
40
41
)
41
42
@@ -121,17 +122,21 @@ func (c *resourcesToIRConverter) Convert(storage Storage) (intermediate.IR, fiel
121
122
httpRoutes , gateways := c .toHTTPRoutesAndGateways (spec , resourcesNamePrefix , errors )
122
123
for _ , httpRoute := range httpRoutes {
123
124
ir .HTTPRoutes [types.NamespacedName {Name : httpRoute .GetName (), Namespace : httpRoute .GetNamespace ()}] = intermediate.HTTPRouteContext {HTTPRoute : httpRoute }
125
+ notify (notifications .InfoNotification , fmt .Sprintf ("successfully created HTTPRoute \" %v/%v\" from OpenAPI spec \" %v\" " , httpRoute .Namespace , httpRoute .Name , spec .Info .Title ))
124
126
}
125
127
126
128
// build reference grants for the resources
127
129
if referenceGrant := c .buildHTTPRouteBackendReferenceGrant (); referenceGrant != nil {
128
130
ir .ReferenceGrants [types.NamespacedName {Name : referenceGrant .GetName (), Namespace : referenceGrant .GetNamespace ()}] = * referenceGrant
131
+ notify (notifications .InfoNotification , fmt .Sprintf ("successfully created ReferenceGrant \" %v/%v\" from OpenAPI spec \" %v\" " , referenceGrant .Namespace , referenceGrant .Name , spec .Info .Title ))
129
132
}
130
133
for _ , gateway := range gateways {
131
134
ir .Gateways [types.NamespacedName {Name : gateway .GetName (), Namespace : gateway .GetNamespace ()}] = intermediate.GatewayContext {Gateway : gateway }
132
135
if referenceGrant := c .buildGatewayTLSSecretReferenceGrant (gateway ); referenceGrant != nil {
133
136
ir .ReferenceGrants [types.NamespacedName {Name : referenceGrant .GetName (), Namespace : referenceGrant .GetNamespace ()}] = * referenceGrant
137
+ notify (notifications .InfoNotification , fmt .Sprintf ("successfully created ReferenceGrant \" %v/%v\" from OpenAPI spec \" %v\" " , referenceGrant .Namespace , referenceGrant .Name , spec .Info .Title ))
134
138
}
139
+ notify (notifications .InfoNotification , fmt .Sprintf ("successfully created Gateway \" %v/%v\" from OpenAPI spec \" %v\" " , gateway .Namespace , gateway .Name , spec .Info .Title ))
135
140
}
136
141
}
137
142
0 commit comments