Skip to content

Commit

Permalink
remove tag validation from readiness controller
Browse files Browse the repository at this point in the history
  • Loading branch information
rschalo committed Nov 19, 2024
1 parent ec81a2e commit 7a607d5
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions pkg/controllers/nodeclass/status/readiness.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@ package status
import (
"context"
"fmt"
"strings"

"github.com/awslabs/operatorpkg/status"
"github.com/samber/lo"

"github.com/aws/karpenter-provider-aws/pkg/providers/launchtemplate"

Expand All @@ -43,11 +41,5 @@ func (n Readiness) Reconcile(ctx context.Context, nodeClass *v1.EC2NodeClass) (r
return reconcile.Result{}, fmt.Errorf("failed to detect the cluster CIDR, %w", err)
}
}
if _, found := lo.FindKeyBy(nodeClass.Spec.Tags, func(key string, _ string) bool {
return strings.HasPrefix(key, "kubernetes.io/cluster/")
}); found {
nodeClass.StatusConditions().SetFalse(status.ConditionReady, "NodeClassNotReady", "validation bypassed")
return reconcile.Result{}, fmt.Errorf("validation bypassed")
}
return reconcile.Result{}, nil
}

0 comments on commit 7a607d5

Please sign in to comment.