Skip to content

Commit

Permalink
addressing comments for ingress_secret_provider_class
Browse files Browse the repository at this point in the history
  • Loading branch information
aamgayle committed Oct 19, 2023
1 parent 60b6925 commit 9369c4c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/controller/keyvault/ingress_secret_provider_class.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"context"
"encoding/json"
"fmt"
"github.com/Azure/aks-app-routing-operator/pkg/manifests"
"net/url"
"strings"

Expand All @@ -22,6 +21,7 @@ import (

"github.com/Azure/aks-app-routing-operator/pkg/config"
"github.com/Azure/aks-app-routing-operator/pkg/controller/metrics"
"github.com/Azure/aks-app-routing-operator/pkg/manifests"
"github.com/Azure/aks-app-routing-operator/pkg/util"
kvcsi "github.com/Azure/secrets-store-csi-driver-provider-azure/pkg/provider/types"
)
Expand Down Expand Up @@ -115,7 +115,6 @@ func (i *IngressSecretProviderClassReconciler) Reconcile(ctx context.Context, re
return result, err
}

logger.Info("cleaning unused managed spc for ingress")
logger.Info("getting secret provider class for ingress")
err = i.client.Get(ctx, client.ObjectKeyFromObject(spc), spc)
if err != nil {
Expand All @@ -136,7 +135,7 @@ func (i *IngressSecretProviderClassReconciler) buildSPC(ing *netv1.Ingress, spc
return false, nil
}

if len(ing.Labels) == 0 || !(manifests.HasRequiredLabels(ing.Labels, manifests.GetTopLevelLabels())) {
if len(spc.Labels) == 0 || !(manifests.HasRequiredLabels(spc.Labels, manifests.GetTopLevelLabels())) {
return false, nil
}

Expand Down

0 comments on commit 9369c4c

Please sign in to comment.