Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: release v0.31.3 #5206

Merged
merged 4 commits into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ linters-settings:
min-complexity: 11
govet:
check-shadowing: true
revive:
rules:
- name: dot-imports
disabled: true
stylecheck:
dot-import-whitelist:
- "github.com/onsi/ginkgo/v2"
- "github.com/onsi/gomega"
misspell:
locale: US
ignore-words: []
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/PuerkitoBio/goquery v1.8.1
github.com/avast/retry-go v3.0.0+incompatible
github.com/aws/aws-sdk-go v1.45.15
github.com/aws/karpenter-core v0.31.2
github.com/aws/karpenter-core v0.31.3
github.com/aws/karpenter/tools/kompat v0.0.0-20230915222222-abfbf5fa3644
github.com/imdario/mergo v0.3.16
github.com/mitchellh/hashstructure/v2 v2.0.2
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ 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.45.15 h1:gYBTVSYuhXdatrLbsPaRgVcc637zzdgThWmsDRwXLOo=
github.com/aws/aws-sdk-go v1.45.15/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
github.com/aws/karpenter-core v0.31.2 h1:amhUzexn2drKXNOgjJR8TKFFcQRgXDRmp0CBVaOI39k=
github.com/aws/karpenter-core v0.31.2/go.mod h1:z5aEstzzERZMO2L0AkhxtBtaSI6yZ806XC9WSPgrHyM=
github.com/aws/karpenter-core v0.31.3 h1:sL2rYBEXZAJMityDltfXLOGRwR7R9Vj95iZhHlwUiNo=
github.com/aws/karpenter-core v0.31.3/go.mod h1:z5aEstzzERZMO2L0AkhxtBtaSI6yZ806XC9WSPgrHyM=
github.com/aws/karpenter/tools/kompat v0.0.0-20230915222222-abfbf5fa3644 h1:M1fxGlOfvSqFYI01HL2zzvomy8e7LiTHk77KDuChWZQ=
github.com/aws/karpenter/tools/kompat v0.0.0-20230915222222-abfbf5fa3644/go.mod h1:l/TIBsaCx/IrOr0Xvlj/cHLOf05QzuQKEZ1hx2XWmfU=
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
Expand Down
3 changes: 2 additions & 1 deletion pkg/providers/instance/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"fmt"
"math"
"sort"
"strings"

"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
Expand Down Expand Up @@ -485,7 +486,7 @@ func filterExoticInstanceTypes(instanceTypes []*cloudprovider.InstanceType, isMa
for _, it := range instanceTypes {
// deprioritize metal even if our opinionated filter isn't applied due to something like an instance family
// requirement
if it.Requirements.Get(lo.Ternary(isMachine, v1alpha1.LabelInstanceSize, v1beta1.LabelInstanceSize)).Has("metal") {
if _, ok := lo.Find(it.Requirements.Get(lo.Ternary(isMachine, v1alpha1.LabelInstanceSize, v1beta1.LabelInstanceSize)).Values(), func(size string) bool { return strings.Contains(size, "metal") }); ok {
continue
}
if !resources.IsZero(it.Capacity[lo.Ternary(isMachine, v1alpha1.ResourceAWSNeuron, v1beta1.ResourceAWSNeuron)]) ||
Expand Down
3 changes: 3 additions & 0 deletions pkg/providers/instancetype/instancetype.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ func (p *Provider) createOfferings(ctx context.Context, instanceType *ec2.Instan
price, ok = p.pricingProvider.SpotPrice(*instanceType.InstanceType, zone)
case ec2.UsageClassTypeOnDemand:
price, ok = p.pricingProvider.OnDemandPrice(*instanceType.InstanceType)
case "capacity-block":
// ignore since karpenter doesn't support it yet, but do not log an unknown capacity type error
continue
default:
logging.FromContext(ctx).Errorf("Received unknown capacity type %s for instance type %s", capacityType, *instanceType.InstanceType)
continue
Expand Down
2 changes: 1 addition & 1 deletion pkg/providers/instancetype/nodeclass_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ var _ = Describe("NodeClass/InstanceTypes", func() {
call := awsEnv.EC2API.CreateFleetBehavior.CalledWithInput.Pop()
for _, ltc := range call.LaunchTemplateConfigs {
for _, ovr := range ltc.Overrides {
Expect(strings.HasSuffix(aws.StringValue(ovr.InstanceType), "metal")).To(BeFalse())
Expect(strings.Contains(aws.StringValue(ovr.InstanceType), "metal")).To(BeFalse())
}
}
})
Expand Down
2 changes: 1 addition & 1 deletion pkg/providers/instancetype/nodetemplate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ var _ = Describe("NodeTemplate/InstanceTypes", func() {
call := awsEnv.EC2API.CreateFleetBehavior.CalledWithInput.Pop()
for _, ltc := range call.LaunchTemplateConfigs {
for _, ovr := range ltc.Overrides {
Expect(strings.HasSuffix(aws.StringValue(ovr.InstanceType), "metal")).To(BeFalse())
Expect(strings.Contains(aws.StringValue(ovr.InstanceType), "metal")).To(BeFalse())
}
}
})
Expand Down
Loading