@@ -1070,6 +1070,46 @@ var _ = ginkgo.Context("[unmanaged] [functional]", func() {
10701070 awsCluster , err := GetAWSClusterByName (ctx , namespace .Name , clusterName )
10711071 Expect (err ).To (BeNil ())
10721072
1073+ ginkgo .By ("Creating a MachineDeployment bootstrapped via Ignition with StorageType UnencryptedUserData" )
1074+ unencryptedMDName := clusterName + "-md-unencrypted-userdata"
1075+ unencryptedUDMachineTemplate := makeAWSMachineTemplate (namespace .Name , unencryptedMDName , e2eCtx .E2EConfig .GetVariable (shared .AwsNodeMachineType ), nil )
1076+ unencryptedUDMachineTemplate .Spec .Template .Spec .ImageLookupBaseOS = "flatcar-stable"
1077+ unencryptedUDMachineTemplate .Spec .Template .Spec .Ignition = & infrav1.Ignition {
1078+ StorageType : infrav1 .IgnitionStorageTypeOptionUnencryptedUserData ,
1079+ }
1080+
1081+ unencryptedUDMachineDeployment := makeMachineDeployment (namespace .Name , unencryptedMDName , clusterName , nil , int32 (1 ))
1082+ // Use the same bootstrap configuration from one of the existing worker machines,
1083+ // as that already contains an ignition bootstrap configuration.
1084+ unencryptedUDMachineDeployment .Spec .Template .Spec .Bootstrap .ConfigRef = md [0 ].Spec .Template .Spec .Bootstrap .ConfigRef
1085+
1086+ framework .CreateMachineDeployment (ctx , framework.CreateMachineDeploymentInput {
1087+ Creator : e2eCtx .Environment .BootstrapClusterProxy .GetClient (),
1088+ MachineDeployment : unencryptedUDMachineDeployment ,
1089+ BootstrapConfigTemplate : makeJoinBootstrapConfigTemplate (namespace .Name , unencryptedMDName ),
1090+ InfraMachineTemplate : unencryptedUDMachineTemplate ,
1091+ })
1092+
1093+ framework .WaitForMachineDeploymentNodesToExist (ctx , framework.WaitForMachineDeploymentNodesToExistInput {
1094+ Lister : e2eCtx .Environment .BootstrapClusterProxy .GetClient (),
1095+ Cluster : result .Cluster ,
1096+ MachineDeployment : unencryptedUDMachineDeployment ,
1097+ }, e2eCtx .E2EConfig .GetIntervals ("" , "wait-worker-nodes" )... )
1098+
1099+ unencryptedUDWorkerMachines := framework .GetMachinesByMachineDeployments (ctx , framework.GetMachinesByMachineDeploymentsInput {
1100+ Lister : e2eCtx .Environment .BootstrapClusterProxy .GetClient (),
1101+ ClusterName : clusterName ,
1102+ Namespace : namespace .Name ,
1103+ MachineDeployment : * unencryptedUDMachineDeployment ,
1104+ })
1105+ Expect (len (unencryptedUDWorkerMachines )).To (Equal (1 ))
1106+ // There is only one machine.
1107+ m := unencryptedUDWorkerMachines [0 ]
1108+ machineUserData , userDataFormat , err := getRawBootstrapDataWithFormat (e2eCtx .Environment .BootstrapClusterProxy .GetClient (), m )
1109+ Expect (err ).NotTo (HaveOccurred ())
1110+ Expect (userDataFormat ).To (Equal ("ignition" ))
1111+ assertUnencryptedUserDataIgnition (* m .Spec .ProviderID , string (machineUserData ))
1112+
10731113 ginkgo .By ("Validating the s3 endpoint was created" )
10741114 vpc , err := shared .GetVPCByName (e2eCtx , clusterName + "-vpc" )
10751115 Expect (err ).NotTo (HaveOccurred ())
0 commit comments