Skip to content

Commit

Permalink
pr feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
jmdeal committed Jul 25, 2024
1 parent b4ec59a commit 01df94d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 5 additions & 1 deletion pkg/apis/crds/karpenter.k8s.aws_ec2nodeclasses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ spec:
This will contain configuration necessary to launch instances in AWS.
properties:
amiFamily:
description: AMIFamily is the AMI family that instances use.
description: |-
AMIFamily dictates the UserData format and default BlockDeviceMappings used when generating launch templates.
This field is optional when using an alias amiSelectorTerm, and the value will be inferred from the alias'
family. When an alias is specified, this field may only be set to its corresponding family or 'Custom'. If no
alias is specified, this field is required.
enum:
- AL2
- AL2023
Expand Down
5 changes: 4 additions & 1 deletion pkg/apis/v1/ec2nodeclass.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ type EC2NodeClassSpec struct {
// +kubebuilder:validation:MaxItems:=30
// +required
AMISelectorTerms []AMISelectorTerm `json:"amiSelectorTerms" hash:"ignore"`
// AMIFamily is the AMI family that instances use.
// AMIFamily dictates the UserData format and default BlockDeviceMappings used when generating launch templates.
// This field is optional when using an alias amiSelectorTerm, and the value will be inferred from the alias'
// family. When an alias is specified, this field may only be set to its corresponding family or 'Custom'. If no
// alias is specified, this field is required.
// +kubebuilder:validation:Enum:={AL2,AL2023,Bottlerocket,Custom,Windows2019,Windows2022}
// +optional
AMIFamily *string `json:"amiFamily,omitempty" hash:"ignore"`
Expand Down
1 change: 0 additions & 1 deletion pkg/controllers/nodeclass/status/ami_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ var _ = Describe("NodeClass AMI Status Controller", func() {
},
},
})
fmt.Printf("nodeClass.Spec.AMIFamily: %v\n", lo.FromPtr(nodeClass.Spec.AMIFamily))
nodeClass.Spec.AMIFamily = lo.ToPtr(v1.AMIFamilyAL2)
nodeClass.Spec.AMISelectorTerms = []v1.AMISelectorTerm{{Alias: "al2@latest"}}
ExpectApplied(ctx, env.Client, nodeClass)
Expand Down

0 comments on commit 01df94d

Please sign in to comment.