Skip to content

Commit

Permalink
Add upgrade note
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-innis committed Sep 26, 2024
1 parent 8dc4c1f commit ba34fdb
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 33 deletions.
2 changes: 0 additions & 2 deletions pkg/apis/v1/labels.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ func init() {
LabelInstanceGeneration,
LabelInstanceSize,
LabelInstanceLocalNVME,
LabelInstanceLocalStorage,
LabelInstanceCPU,
LabelInstanceCPUManufacturer,
LabelInstanceMemory,
Expand Down Expand Up @@ -108,7 +107,6 @@ var (
LabelInstanceFamily = apis.Group + "/instance-family"
LabelInstanceGeneration = apis.Group + "/instance-generation"
LabelInstanceLocalNVME = apis.Group + "/instance-local-nvme"
LabelInstanceLocalStorage = apis.Group + "/instance-local-storage"
LabelInstanceSize = apis.Group + "/instance-size"
LabelInstanceCPU = apis.Group + "/instance-cpu"
LabelInstanceCPUManufacturer = apis.Group + "/instance-cpu-manufacturer"
Expand Down
3 changes: 0 additions & 3 deletions pkg/providers/instancetype/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ var _ = Describe("InstanceTypeProvider", func() {
v1.LabelInstanceGPUCount: "1",
v1.LabelInstanceGPUMemory: "16384",
v1.LabelInstanceLocalNVME: "900",
v1.LabelInstanceLocalStorage: "900",
v1.LabelInstanceAcceleratorName: "inferentia",
v1.LabelInstanceAcceleratorManufacturer: "aws",
v1.LabelInstanceAcceleratorCount: "1",
Expand Down Expand Up @@ -300,7 +299,6 @@ var _ = Describe("InstanceTypeProvider", func() {
v1.LabelInstanceGPUCount: "1",
v1.LabelInstanceGPUMemory: "16384",
v1.LabelInstanceLocalNVME: "900",
v1.LabelInstanceLocalStorage: "900",
v1.LabelTopologyZoneID: "tstz1-1a",
// Deprecated Labels
corev1.LabelFailureDomainBetaRegion: fake.DefaultRegion,
Expand Down Expand Up @@ -369,7 +367,6 @@ var _ = Describe("InstanceTypeProvider", func() {
v1.LabelInstanceGPUManufacturer,
v1.LabelInstanceGPUMemory,
v1.LabelInstanceLocalNVME,
v1.LabelInstanceLocalStorage,
corev1.LabelWindowsBuild,
)).UnsortedList(), lo.Keys(karpv1.NormalizedLabels)...)
Expect(lo.Keys(nodeSelector)).To(ContainElements(expectedLabels))
Expand Down
8 changes: 2 additions & 6 deletions pkg/providers/instancetype/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ func computeRequirements(info *ec2.InstanceTypeInfo, offerings cloudprovider.Off
scheduling.NewRequirement(v1.LabelInstanceFamily, corev1.NodeSelectorOpDoesNotExist),
scheduling.NewRequirement(v1.LabelInstanceGeneration, corev1.NodeSelectorOpDoesNotExist),
scheduling.NewRequirement(v1.LabelInstanceLocalNVME, corev1.NodeSelectorOpDoesNotExist),
scheduling.NewRequirement(v1.LabelInstanceLocalStorage, corev1.NodeSelectorOpDoesNotExist),
scheduling.NewRequirement(v1.LabelInstanceSize, corev1.NodeSelectorOpDoesNotExist),
scheduling.NewRequirement(v1.LabelInstanceGPUName, corev1.NodeSelectorOpDoesNotExist),
scheduling.NewRequirement(v1.LabelInstanceGPUManufacturer, corev1.NodeSelectorOpDoesNotExist),
Expand Down Expand Up @@ -127,11 +126,8 @@ func computeRequirements(info *ec2.InstanceTypeInfo, offerings cloudprovider.Off
requirements.Get(v1.LabelInstanceFamily).Insert(instanceTypeParts[0])
requirements.Get(v1.LabelInstanceSize).Insert(instanceTypeParts[1])
}
if info.InstanceStorageInfo != nil && info.InstanceStorageInfo.TotalSizeInGB != nil {
requirements[v1.LabelInstanceLocalStorage].Insert(fmt.Sprint(aws.Int64Value(info.InstanceStorageInfo.TotalSizeInGB)))
if aws.StringValue(info.InstanceStorageInfo.NvmeSupport) != ec2.EphemeralNvmeSupportUnsupported {
requirements[v1.LabelInstanceLocalNVME].Insert(fmt.Sprint(aws.Int64Value(info.InstanceStorageInfo.TotalSizeInGB)))
}
if info.InstanceStorageInfo != nil && aws.StringValue(info.InstanceStorageInfo.NvmeSupport) != ec2.EphemeralNvmeSupportUnsupported && info.InstanceStorageInfo.TotalSizeInGB != nil {
requirements[v1.LabelInstanceLocalNVME].Insert(fmt.Sprint(aws.Int64Value(info.InstanceStorageInfo.TotalSizeInGB)))
}
// Network bandwidth
if bandwidth, ok := InstanceTypeBandwidthMegabits[aws.StringValue(info.InstanceType)]; ok {
Expand Down
22 changes: 0 additions & 22 deletions test/suites/scheduling/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,28 +168,6 @@ var _ = Describe("Scheduling", Ordered, ContinueOnFailure, func() {
env.EventuallyExpectHealthyPodCount(labels.SelectorFromSet(deployment.Spec.Selector.MatchLabels), int(*deployment.Spec.Replicas))
env.ExpectCreatedNodeCount("==", 1)
})
It("should support well-known labels for local instance storage", func() {
selectors.Insert(v1.LabelInstanceLocalStorage) // Add node selector keys to selectors used in testing to ensure we test all labels
deployment := test.Deployment(test.DeploymentOptions{Replicas: 1, PodOptions: test.PodOptions{
NodePreferences: []corev1.NodeSelectorRequirement{
{
Key: v1.LabelInstanceLocalStorage,
Operator: corev1.NodeSelectorOpGt,
Values: []string{"0"},
},
},
NodeRequirements: []corev1.NodeSelectorRequirement{
{
Key: v1.LabelInstanceLocalStorage,
Operator: corev1.NodeSelectorOpGt,
Values: []string{"0"},
},
},
}})
env.ExpectCreated(nodeClass, nodePool, deployment)
env.EventuallyExpectHealthyPodCount(labels.SelectorFromSet(deployment.Spec.Selector.MatchLabels), int(*deployment.Spec.Replicas))
env.ExpectCreatedNodeCount("==", 1)
})
It("should support well-known labels for encryption in transit", func() {
selectors.Insert(v1.LabelInstanceEncryptionInTransitSupported) // Add node selector keys to selectors used in testing to ensure we test all labels
deployment := test.Deployment(test.DeploymentOptions{Replicas: 1, PodOptions: test.PodOptions{
Expand Down
4 changes: 4 additions & 0 deletions website/content/en/preview/upgrading/upgrade-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ If you get the error `invalid ownership metadata; label validation error:` while
WHEN CREATING A NEW SECTION OF THE UPGRADE GUIDANCE FOR NEWER VERSIONS, ENSURE THAT YOU COPY THE BETA API ALERT SECTION FROM THE LAST RELEASE TO PROPERLY WARN USERS OF THE RISK OF UPGRADING WITHOUT GOING TO 0.32.x FIRST
-->

### Upgrading to `1.1.0`+

* Bottlerocket AMIFamily now supports `instanceStorePolicy: RAID0`. This means that Karpenter will auto-generate userData to RAID0 your instance store volumes (similar to AL2 and AL2023) when specifying this value. __Note: This userData configuration is _only_ valid on Bottlerocket v1.22.0+. If you are using an earlier version of a Bottlerocket image (< v1.22.0) with `amiFamily: Bottlerocket` and `instanceStorePolicy: RAID0`, nodes will fail to join the cluster.

### Upgrading to `1.0.0`+

{{% alert title="Warning" color="warning" %}}
Expand Down

0 comments on commit ba34fdb

Please sign in to comment.