diff --git a/go.mod b/go.mod index 28e42086d23a..51151d670bab 100644 --- a/go.mod +++ b/go.mod @@ -30,6 +30,8 @@ require ( sigs.k8s.io/controller-runtime v0.14.6 ) +replace github.com/aws/karpenter-core => github.com/jonathan-innis/karpenter-core v0.0.0-20230808063057-b6fe093fe6e5 + require ( contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d // indirect contrib.go.opencensus.io/exporter/prometheus v0.4.0 // indirect diff --git a/go.sum b/go.sum index 8eabb69f0b6a..02b39f62bcf9 100644 --- a/go.sum +++ b/go.sum @@ -53,8 +53,6 @@ github.com/avast/retry-go v3.0.0+incompatible h1:4SOWQ7Qs+oroOTQOYnAHqelpCO0biHS github.com/avast/retry-go v3.0.0+incompatible/go.mod h1:XtSnn+n/sHqQIpZ10K1qAevBhOOCWBLXXy3hyiqqBrY= github.com/aws/aws-sdk-go v1.44.294 h1:3x7GaEth+pDU9HwFcAU0awZlEix5CEdyIZvV08SlHa8= github.com/aws/aws-sdk-go v1.44.294/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= -github.com/aws/karpenter-core v0.29.2-0.20230803235302-95bd9f61a18b h1:88YeEA65jQNCj4/AdH0qixJeuGuIOi5QxOzsRCXsJQA= -github.com/aws/karpenter-core v0.29.2-0.20230803235302-95bd9f61a18b/go.mod h1:+C8X0N378fQ/+YmopvRHflj2JFrVP8sPs9xL7v4A6eM= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -220,6 +218,8 @@ github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9Y github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/jonathan-innis/karpenter-core v0.0.0-20230808063057-b6fe093fe6e5 h1:L9NYjqmZtdNh3/luVs3e3jBOBLIGaSI6a6iVBJ90eMU= +github.com/jonathan-innis/karpenter-core v0.0.0-20230808063057-b6fe093fe6e5/go.mod h1:+C8X0N378fQ/+YmopvRHflj2JFrVP8sPs9xL7v4A6eM= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= diff --git a/test/pkg/environment/common/expectations.go b/test/pkg/environment/common/expectations.go index 409cdb3bb804..e0683d04a7eb 100644 --- a/test/pkg/environment/common/expectations.go +++ b/test/pkg/environment/common/expectations.go @@ -43,6 +43,7 @@ import ( pscheduling "github.com/aws/karpenter-core/pkg/controllers/provisioning/scheduling" "github.com/aws/karpenter-core/pkg/scheduling" "github.com/aws/karpenter-core/pkg/test" + nodepoolutil "github.com/aws/karpenter-core/pkg/utils/nodepool" ) func (env *Environment) ExpectCreatedWithOffset(offset int, objects ...client.Object) { @@ -572,8 +573,8 @@ func (env *Environment) GetDaemonSetCount(prov *v1alpha5.Provisioner) int { return lo.CountBy(daemonSetList.Items, func(d appsv1.DaemonSet) bool { p := &v1.Pod{Spec: d.Spec.Template.Spec} - nodeTemplate := pscheduling.NewMachineTemplate(prov) - if err := nodeTemplate.Taints.Tolerates(p); err != nil { + nodeTemplate := pscheduling.NewNodeClaimTemplate(nodepoolutil.New(prov)) + if err := scheduling.Taints(nodeTemplate.Spec.Taints).Tolerates(p); err != nil { return false } if err := nodeTemplate.Requirements.Compatible(scheduling.NewPodRequirements(p)); err != nil {