func (tc *testContext) createWindowsInstanceConfigMap(machines *mapi.MachineList) error {
	cm := &v1.ConfigMap{
		ObjectMeta: metav1.ObjectMeta{
			Name: controllers.InstanceConfigMap,
		},
		Data: make(map[string]string),
	}
	for _, machine := range machines.Items {
		addr, err := controllers.GetAddress(machine.Status.Addresses)
		if err != nil {
			return errors.Wrap(err, "unable to get usable address")
		}
		cm.Data[addr] = "username=" + tc.vmUsername()
	}
	_, err := tc.client.K8s.CoreV1().ConfigMaps(tc.namespace).Create(context.TODO(), cm, metav1.CreateOptions{})
	if err != nil {
		return errors.Wrap(err, "unable to create configmap")
	}
	return nil
}
// createWindowsInstanceConfigMap creates a ConfigMap for the ConfigMap controller to act on, comprised of the Machines
// in the given MachineList
createWindowsInstanceConfigMap creates a ConfigMap for the ConfigMap controller to act on, comprised of the Machines
in the given MachineList
// createWindowsInstanceConfigMap creates a ConfigMap for the ConfigMap controller to act on comprised of the Machines // in the given MachineList
func (tc *testContext) createWindowsInstanceConfigMap(machines *mapi.MachineList) error {
	cm := &v1.ConfigMap{
		ObjectMeta: metav1.ObjectMeta{
			Name: controllers.InstanceConfigMap,
		},
		Data: make(map[string]string),
	}
	for _, machine := range machines.Items {
		addr, err := controllers.GetAddress(machine.Status.Addresses)
		if err != nil {
			return errors.Wrap(err, "unable to get usable address")
		}
		cm.Data[addr] = "username=" + tc.vmUsername()
	}
	_, err := tc.client.K8s.CoreV1().ConfigMaps(tc.namespace).Create(context.TODO(), cm, metav1.CreateOptions{})
	if err != nil {
		return errors.Wrap(err, "unable to create configmap")
	}
	return nil
}
func ( tc * testContext ) createWindowsInstanceConfigMap ( machines * mapi . MachineList ) error { cm := & v1 . ConfigMap { ObjectMeta : metav1 . ObjectMeta { Name : controllers . InstanceConfigMap , } , Data : make ( map [ string ] string ) , } for _ , machine := range machines . Items { addr , err := controllers . GetAddress ( machine . Status . Addresses ) if err != nil { return errors . Wrap ( err , " " ) } cm . Data [ addr ] = " " + tc . vmUsername ( ) } _ , err := tc . client . K8s . CoreV1 ( ) . ConfigMaps ( tc . namespace ) . Create ( context . TODO ( ) , cm , metav1 . CreateOptions { } ) if err != nil { return errors . Wrap ( err , " " ) } return nil }
createWindowsInstanceConfigMap creates a ConfigMap for the ConfigMap controller to act on, comprised of the Machines
in the given MachineList
createWindowsInstanceConfigMap creates a ConfigMap for the ConfigMap controller to act on comprised of the Machines in the given MachineList