@@ -280,6 +280,9 @@ func resolveDockerfile(cmName string, devConfig *amdv1alpha1.DeviceConfig) (stri
280280 dockerfileTemplate = dockerfileTemplateCoreOSFromSrcImage
281281 }
282282 }
283+ case "almalinux" :
284+ // change when Alma would be fully supported
285+ dockerfileTemplate = dockerfileTemplateCoreOSFromSrcImage
283286 // FIX ME
284287 // add the RHEL back when it is fully supported
285288 /*case "rhel":
@@ -779,6 +782,7 @@ var cmNameMappers = map[string]func(fullImageStr string) string{
779782 "rhel" : rhelCMNameMapper ,
780783 "red hat" : rhelCMNameMapper ,
781784 "redhat" : rhelCMNameMapper ,
785+ "almalinux" : almaCMNameMapper ,
782786}
783787
784788func rhelCMNameMapper (osImageStr string ) string {
@@ -812,6 +816,14 @@ func ubuntuCMNameMapper(osImageStr string) string {
812816 return fmt .Sprintf ("%s-%s" , os , trimmedVersion )
813817}
814818
819+ func almaCMNameMapper (osImageStr string ) string {
820+ re := regexp .MustCompile (`(\d+\.\d+)` )
821+ matches := re .FindStringSubmatch (osImageStr )
822+ if len (matches ) > 1 {
823+ return fmt .Sprintf ("%s-%s" , "almalinux" , matches [1 ])
824+ }
825+ return "almalinux-" + osImageStr
826+ }
815827func GetK8SNodes (ctx context.Context , cli client.Client , labelSelector labels.Selector ) (* v1.NodeList , error ) {
816828 options := & client.ListOptions {
817829 LabelSelector : labelSelector ,
0 commit comments