public static EnvVar createEnvVarFromFieldRef(String name, String field) {
        return new EnvVarBuilder()
                .withName(name)
                .withValueFrom(new EnvVarSourceBuilder()
                        .withNewFieldRef()
                            .withFieldPath(field)
                        .endFieldRef()
                        .build())
                .build();
    }
@Test
    public void testCreateEnvVarFromFieldRef()   {
        EnvVar var = ContainerUtils.createEnvVarFromFieldRef("VAR_1", "spec.nodeName");

        assertThat(var.getName(), is("VAR_1"));
        assertThat(var.getValueFrom().getFieldRef().getFieldPath(), is("spec.nodeName"));
    }