Skip to content

Conversation

faiq
Copy link
Collaborator

@faiq faiq commented Oct 2, 2025

What type of PR is this?
a fix

08:32 PM  fraza @ Linux-PC1RG42G  ~/go/src/github.com/kubernetes-sigs/cluster-api-provider-aws/bootstrap/eks/internal/userdata  release-2.10 
$ go test
--- FAIL: TestNodeadmUserdata (0.00s)
    nodeadm_test.go:374: 
        Unexpected error:
            <*errors.errorString | 0xc000151060>: 
            failed to execute node config template: template: node:42:9: executing "node" at <.Instance>: can't evaluate field Instance in type *userdata.NodeadmInput
            {
                s: "failed to execute node config template: template: node:42:9: executing \"node\" at <.Instance>: can't evaluate field Instance in type *userdata.NodeadmInput",
            }
        occurred
    --- FAIL: TestNodeadmUserdata/basic_nodeadm_userdata (0.00s)
        testing.go:1679: test executed panic(nil) or runtime.Goexit: subtest may have called FailNow on a parent test
FAIL
exit status 1
FAIL	sigs.k8s.io/cluster-api-provider-aws/v2/bootstrap/eks/internal/userdata	0.019s
diff --git a/bootstrap/eks/internal/userdata/nodeadm.go b/bootstrap/eks/internal/userdata/nodeadm.go
index 264469bb0..bc9ca4742 100644
--- a/bootstrap/eks/internal/userdata/nodeadm.go
+++ b/bootstrap/eks/internal/userdata/nodeadm.go
@@ -115,22 +115,6 @@ spec:
 {{ Indent 6 (toYaml .ContainerdBaseRuntimeSpec) }}
     {{- end }}
   {{- end }}
-  {{- if .Instance }}
-  instance:
-    {{- if .Instance.LocalStorage }}
-    localStorage:
-      strategy: {{ .Instance.LocalStorage.Strategy }}
-      {{- with .Instance.LocalStorage.MountPath }}
-      mountPath: {{ . }}
-      {{- end }}
-      {{- with .Instance.LocalStorage.DisabledMounts }}
-      disabledMounts:
-      {{- range . }}
-      - {{ . }}
-      {{- end }}
-      {{- end }}
-    {{- end }}
-  {{- end }}
 
 --{{.Boundary}}`
08:32 PM  fraza @ Linux-PC1RG42G  ~/go/src/github.com/kubernetes-sigs/cluster-api-provider-aws/bootstrap/eks/internal/userdata  release-2.10⚡ 
$ go test
PASS
ok  	sigs.k8s.io/cluster-api-provider-aws/v2/bootstrap/eks/internal/userdata	0.020s

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer:

Checklist:

  • squashed commits
  • includes documentation
  • includes emoji in title
  • adds unit tests
  • adds or updates e2e tests

Release note:


@faiq faiq changed the title fix: instance error 🐛 fix: instance error Oct 2, 2025
@faiq faiq force-pushed the faiq/fix-instance-error branch from 6812285 to ebb2f82 Compare October 2, 2025 04:12
@faiq faiq merged commit 62214f1 into main Oct 2, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants