Skip to content

Commit

Permalink
Add bootOptions to cp/md tinkerbellmachine template, fix unit-tests (#…
Browse files Browse the repository at this point in the history
…9094)

Signed-off-by: Rahul Ganesh <rahulgab@amazon.com>
Co-authored-by: EKS Distro PR Bot <aws-model-rocket-bots+eksdistroprbot@amazon.com>
  • Loading branch information
rahulbabu95 and eks-distro-pr-bot authored Dec 20, 2024
1 parent 586f904 commit b35ad75
Show file tree
Hide file tree
Showing 24 changed files with 49 additions and 3 deletions.
2 changes: 2 additions & 0 deletions pkg/providers/tinkerbell/config/template-cp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,8 @@ spec:
matchLabels: {{ range $key, $value := .etcdHardwareSelector}}
{{ $key }}: {{ $value}}
{{- end }}
bootOptions:
bootMode: netboot
templateOverride: |
{{.etcdTemplateOverride | indent 8}}
{{- end }}
Expand Down
2 changes: 2 additions & 0 deletions pkg/providers/tinkerbell/config/template-md.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ spec:
matchLabels: {{ range $key, $value := .hardwareSelector}}
{{ $key }}: {{ $value}}
{{- end }}
bootOptions:
bootMode: netboot
templateOverride: |
{{.workertemplateOverride | indent 8}}
{{- end}}
Expand Down
3 changes: 1 addition & 2 deletions pkg/providers/tinkerbell/stack/stack.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,7 @@ func (s *Installer) installBootsOnDocker(ctx context.Context, bundle releasev1al
"-e", fmt.Sprintf("SMEE_DHCP_TFTP_IP=%s", tinkServerIP),
"-e", fmt.Sprintf("SMEE_DHCP_HTTP_IPXE_BINARY_HOST=%s", tinkServerIP),
"-e", fmt.Sprintf("SMEE_DHCP_HTTP_IPXE_SCRIPT_HOST=%s", tinkServerIP),
"-e", fmt.Sprintf("PUBLIC_SYSLOG_IP=%s", tinkServerIP),
"-e", fmt.Sprintf("BOOTS_KUBE_NAMESPACE=%v", s.namespace),
"-e", fmt.Sprintf("SMEE_BACKEND_KUBE_NAMESPACE=%v", s.namespace),
}

extraKernelArgList := s.getSmeeKernelArgs(bundle)
Expand Down
1 change: 0 additions & 1 deletion pkg/providers/tinkerbell/stack/stack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ func TestTinkerbellStackInstallWithDifferentOptions(t *testing.T) {
"-e", gomock.Any(),
"-e", gomock.Any(),
"-e", gomock.Any(),
"-e", gomock.Any(),
)
}

Expand Down
2 changes: 2 additions & 0 deletions pkg/providers/tinkerbell/testdata/expected_kct.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ spec:
required:
- labelSelector:
matchLabels:
bootOptions:
bootMode: netboot
templateOverride: |
global_timeout: 6000
id: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ spec:
- labelSelector:
matchLabels:
type: worker
bootOptions:
bootMode: netboot
templateOverride: |
global_timeout: 6000
id: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ spec:
- labelSelector:
matchLabels:
type: worker
bootOptions:
bootMode: netboot
templateOverride: |
global_timeout: 6000
id: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ spec:
- labelSelector:
matchLabels:
type: worker
bootOptions:
bootMode: netboot
templateOverride: |
global_timeout: 6000
id: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ spec:
- labelSelector:
matchLabels:
type: worker
bootOptions:
bootMode: netboot
templateOverride: |
global_timeout: 6000
id: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ spec:
- labelSelector:
matchLabels:
type: worker
bootOptions:
bootMode: netboot
templateOverride: |
global_timeout: 6000
id: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ spec:
- labelSelector:
matchLabels:
type: worker
bootOptions:
bootMode: netboot
templateOverride: |
global_timeout: 6000
id: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ spec:
- labelSelector:
matchLabels:
type: worker
bootOptions:
bootMode: netboot
templateOverride: |
global_timeout: 6000
id: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ spec:
- labelSelector:
matchLabels:
type: worker
bootOptions:
bootMode: netboot
templateOverride: |
global_timeout: 6000
id: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ spec:
- labelSelector:
matchLabels:
type: worker
bootOptions:
bootMode: netboot
templateOverride: |
global_timeout: 6000
id: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ spec:
- labelSelector:
matchLabels:
type: worker
bootOptions:
bootMode: netboot
templateOverride: |
global_timeout: 6000
id: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ spec:
- labelSelector:
matchLabels:
type: worker
bootOptions:
bootMode: netboot
templateOverride: |
global_timeout: 6000
id: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ spec:
- labelSelector:
matchLabels:
type: worker
bootOptions:
bootMode: netboot
templateOverride: |
global_timeout: 6000
id: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ spec:
- labelSelector:
matchLabels:
type: worker
bootOptions:
bootMode: netboot
templateOverride: |
global_timeout: 6000
id: ""
Expand Down Expand Up @@ -217,6 +219,8 @@ spec:
- labelSelector:
matchLabels:
type: worker
bootOptions:
bootMode: netboot
templateOverride: |
global_timeout: 6000
id: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ spec:
- labelSelector:
matchLabels:
type: worker
bootOptions:
bootMode: netboot
templateOverride: |
global_timeout: 6000
id: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ spec:
- labelSelector:
matchLabels:
type: worker
bootOptions:
bootMode: netboot
templateOverride: |
global_timeout: 6000
id: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ spec:
- labelSelector:
matchLabels:
type: worker
bootOptions:
bootMode: netboot
templateOverride: |
global_timeout: 6000
id: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ spec:
- labelSelector:
matchLabels:
type: worker
bootOptions:
bootMode: netboot
templateOverride: |
global_timeout: 6000
id: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ spec:
- labelSelector:
matchLabels:
type: worker
bootOptions:
bootMode: netboot
templateOverride: |
global_timeout: 6000
id: ""
Expand Down Expand Up @@ -216,6 +218,8 @@ spec:
- labelSelector:
matchLabels:
type: worker
bootOptions:
bootMode: netboot
templateOverride: |
global_timeout: 6000
id: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ spec:
- labelSelector:
matchLabels:
type: worker
bootOptions:
bootMode: netboot
templateOverride: |
global_timeout: 6000
id: ""
Expand Down

0 comments on commit b35ad75

Please sign in to comment.