cmd/k8s-operator: support default proxy class in k8s-operator (#12711)

Signed-off-by: ChandonPierre <cpierre@coreweave.com>

Closes #12421
This commit is contained in:
ChandonPierre
2024-08-20 10:50:40 -04:00
committed by GitHub
parent 8f6a2353d8
commit 93dc2ded6e
5 changed files with 29 additions and 4 deletions

View File

@@ -46,6 +46,8 @@ type IngressReconciler struct {
// managedIngresses is a set of all ingress resources that we're currently
// managing. This is only used for metrics.
managedIngresses set.Slice[types.UID]
proxyDefaultClass string
}
var (
@@ -133,7 +135,7 @@ func (a *IngressReconciler) maybeProvision(ctx context.Context, logger *zap.Suga
}
}
proxyClass := proxyClassForObject(ing)
proxyClass := proxyClassForObject(ing, a.proxyDefaultClass)
if proxyClass != "" {
if ready, err := proxyClassIsReady(ctx, proxyClass, a.Client); err != nil {
return fmt.Errorf("error verifying ProxyClass for Ingress: %w", err)