Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Nick Tran <10810510+njtran@users.noreply.github.com>
  • Loading branch information
jmdeal and njtran committed May 2, 2024
1 parent 9946b02 commit 9bf7327
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/controller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func validateEC2NodeClasses(ctx context.Context, reader client.Reader) error {
if invalidNodeClasses := lo.FilterMap(nodeClassList.Items, func(nc v1beta1.EC2NodeClass, _ int) (string, bool) {
return nc.Name, len(nc.Spec.AMISelectorTerms) == 0
}); len(invalidNodeClasses) != 0 {
return fmt.Errorf("detected EC2NodeClasses with un-set AMISelectorTerms (%s), refer to the 0.37.0+ upgrade guide: https://karpenter.sh/upgrading/upgrade-guide/#upgrading-to-0370", strings.Join(invalidNodeClasses, ","))
return fmt.Errorf("detected EC2NodeClasses with un-set AMISelectorTerms (%s), refer to the 0.37.0+ upgrade guide: https://karpenter.sh/docs/upgrading/upgrade-guide/#upgrading-to-0370", strings.Join(invalidNodeClasses, ","))
}
return nil
}
2 changes: 1 addition & 1 deletion website/content/en/preview/concepts/nodeclasses.md
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ spec:

## spec.amiSelectorTerms

AMI Selector Terms are used to select which AMIs Karpenter will use when launching nodes with this `EC2NodeClass`. You can opt-in to the latest EKS optimized AMIs through an `eksOptimzed` term or AMIs can be discovered through ids, ownders, name, and [tags](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html).
AMI Selector Terms are used to select which AMIs Karpenter will use when launching nodes with this `EC2NodeClass`. You can opt-in to the latest EKS optimized AMIs by using the `eksOptimized` term or AMIs can be discovered through ids, owners, name, and [tags](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html).

{{% alert title="Note" color="primary" %}}
[`amiFamily`]({{< ref "#specamifamily" >}}) determines the bootstrapping mode, while `amiSelectorTerms` specifies specific AMIs to be used. Therefore, you need to ensure consistency between [`amiFamily`]({{< ref "#specamifamily" >}}) and `amiSelectorTerms` to avoid conflicts during bootstrapping.
Expand Down
2 changes: 1 addition & 1 deletion website/content/en/preview/upgrading/upgrade-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ WHEN CREATING A NEW SECTION OF THE UPGRADE GUIDANCE FOR NEWER VERSIONS, ENSURE T
{{% /alert %}}

{{% alert title="Warning" color="warning" %}}
Starting at `v0.37.0`, the `ec2nodeclass.spec.amiSelectorTerms` field is required. When upgrading from previous Karpetner versions, the controller will continue to panic until `amiSelectorTerms` have been specified for all `EC2NodeClasses` applied to the cluster. Please refer to the [`AMISelectorTerms` documentation]({{<ref "../concepts/nodeclasses#spec-amiFamily" >}}) for more details.
Starting at `v0.37.0`, the `ec2nodeclass.spec.amiSelectorTerms` field is required. When upgrading from previous Karpenter versions, the controller will continue to panic until `amiSelectorTerms` have been specified for all `EC2NodeClasses` applied to the cluster. Please refer to the [`AMISelectorTerms` documentation]({{<ref "../concepts/nodeclasses#spec-amiFamily" >}}) for more details.
{{% /alert %}}

* Karpenter updated the NodeClass controller naming in the following way: `nodeclass` -> `nodeclass.status`, `nodeclass.hash`, `nodeclass.termination`
Expand Down

0 comments on commit 9bf7327

Please sign in to comment.