Skip to content

Commit 3f18a63

Browse files
committed
feat: support ingress translator
Signed-off-by: ashing <[email protected]>
1 parent ab0a67d commit 3f18a63

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

internal/controller/indexer/indexer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ const (
1414
ExtensionRef = "extensionRef"
1515
ParametersRef = "parametersRef"
1616
ParentRefs = "parentRefs"
17-
IngressClass = "ingressClass"
1817
SecretIndexRef = "secretRefs"
18+
IngressClass = "ingressClass"
1919
IngressClassRef = "ingressClassRef"
2020
)
2121

internal/controller/ingress_controller.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,19 +283,16 @@ func (r *IngressReconciler) processBackends(ctx context.Context, tctx *provider.
283283
if rule.HTTP == nil {
284284
continue
285285
}
286-
287286
for _, path := range rule.HTTP.Paths {
288287
if path.Backend.Service == nil {
289288
continue
290289
}
291-
292290
service := path.Backend.Service
293291
if err := r.processBackendService(ctx, tctx, ingress.Namespace, service); err != nil {
294292
terr = err
295293
}
296294
}
297295
}
298-
299296
return terr
300297
}
301298

@@ -383,6 +380,7 @@ func (r *IngressReconciler) updateStatus(ctx context.Context, ingress *networkin
383380
if err != nil {
384381
return fmt.Errorf("invalid ingress-publish-service format: %s, expected format: namespace/name", publishService)
385382
}
383+
// if the namespace is not specified, use the ingress namespace
386384
if namespace == "" {
387385
namespace = ingress.Namespace
388386
}

0 commit comments

Comments
 (0)