From d1ba8b584c88d75988c183025fe68bbed9ed6b21 Mon Sep 17 00:00:00 2001 From: Jason Deal Date: Fri, 12 Jul 2024 10:38:09 -0700 Subject: [PATCH] pr review --- pkg/providers/amifamily/resolver.go | 1 - pkg/providers/launchtemplate/suite_test.go | 3 --- pkg/utils/utils.go | 2 +- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/pkg/providers/amifamily/resolver.go b/pkg/providers/amifamily/resolver.go index 78bb5373f163..0c5838af5231 100644 --- a/pkg/providers/amifamily/resolver.go +++ b/pkg/providers/amifamily/resolver.go @@ -214,7 +214,6 @@ func (r Resolver) resolveLaunchTemplate(nodeClass *v1.EC2NodeClass, nodeClaim *k if kubeletConfig == nil { kubeletConfig = &v1.KubeletConfiguration{} } - fmt.Printf("resolved kubelet config with maxPods %d\n", lo.FromPtr(kubeletConfig.MaxPods)) if kubeletConfig.MaxPods == nil { kubeletConfig.MaxPods = lo.ToPtr(int32(maxPods)) } diff --git a/pkg/providers/launchtemplate/suite_test.go b/pkg/providers/launchtemplate/suite_test.go index a0f7b24dccfb..cf724f665b69 100644 --- a/pkg/providers/launchtemplate/suite_test.go +++ b/pkg/providers/launchtemplate/suite_test.go @@ -127,9 +127,6 @@ var _ = Describe("LaunchTemplate Provider", func() { BeforeEach(func() { nodeClass = test.EC2NodeClass( v1.EC2NodeClass{ - // Spec: v1.EC2NodeClassSpec{ - // Kubelet: &v1.KubeletConfiguration{}, - // }, Status: v1.EC2NodeClassStatus{ InstanceProfile: "test-profile", SecurityGroups: []v1.SecurityGroup{ diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index 4b15fc5615b6..8f062a433930 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -94,7 +94,7 @@ func parseKubeletConfiguration(annotation string) (*v1.KubeletConfiguration, err kubelet := &karpv1beta1.KubeletConfiguration{} err := json.Unmarshal([]byte(annotation), kubelet) if err != nil { - return nil, err + return nil, fmt.Errorf("parsing kubelet config from %s annotation, %w", karpv1.KubeletCompatabilityAnnotationKey, err) } return &v1.KubeletConfiguration{ ClusterDNS: kubelet.ClusterDNS,