@@ -20,8 +20,9 @@ import (
2020)
2121
2222const (
23- agentISOFilename = "agent.%s.iso"
24- iso9660Level1ExtLen = 3
23+ agentISOFilename = "agent.%s.iso"
24+ agentAddNodesISOFilename = "agent-addnodes.%s.iso"
25+ iso9660Level1ExtLen = 3
2526)
2627
2728// AgentImage is an asset that generates the bootable image used to install clusters.
@@ -34,6 +35,7 @@ type AgentImage struct {
3435 rootFSURL string
3536 bootArtifactsBaseURL string
3637 platform hiveext.PlatformType
38+ isoFilename string
3739}
3840
3941var _ asset.WritableAsset = (* AgentImage )(nil )
@@ -61,9 +63,11 @@ func (a *AgentImage) Generate(dependencies asset.Parents) error {
6163 switch agentWorkflow .Workflow {
6264 case workflow .AgentWorkflowTypeInstall :
6365 a .platform = agentManifests .AgentClusterInstall .Spec .PlatformType
66+ a .isoFilename = agentISOFilename
6467
6568 case workflow .AgentWorkflowTypeAddNodes :
6669 a .platform = clusterInfo .PlatformType
70+ a .isoFilename = agentAddNodesISOFilename
6771
6872 default :
6973 return fmt .Errorf ("AgentWorkflowType value not supported: %s" , agentWorkflow .Workflow )
@@ -239,7 +243,7 @@ func (a *AgentImage) PersistToFile(directory string) error {
239243 return errors .New ("cannot generate ISO image due to configuration errors" )
240244 }
241245
242- agentIsoFile := filepath .Join (directory , fmt .Sprintf (agentISOFilename , a .cpuArch ))
246+ agentIsoFile := filepath .Join (directory , fmt .Sprintf (a . isoFilename , a .cpuArch ))
243247
244248 // Remove symlink if it exists
245249 os .Remove (agentIsoFile )
0 commit comments