Skip to content

Commit

Permalink
fix(nodegroup) check nodegroup version is nil
Browse files Browse the repository at this point in the history
Signed-off-by: nueavv <nuguni@kakao.com>
  • Loading branch information
nueavv committed Oct 1, 2024
1 parent 2fe1c84 commit 50c23fb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/cloud/services/eks/nodegroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,11 @@ func (s *NodegroupService) reconcileNodegroupVersion(ng *eks.Nodegroup) error {
return fmt.Errorf("parsing EKS version from spec: %w", err)
}
}

// Check for nil pointers before dereferencing
if ng.Version == nil {
return fmt.Errorf("nodegroup version is nil")
}
ngVersion := version.MustParseGeneric(*ng.Version)
specAMI := s.scope.ManagedMachinePool.Spec.AMIVersion
ngAMI := *ng.ReleaseVersion
Expand Down

0 comments on commit 50c23fb

Please sign in to comment.