use of org.apache.flink.kubernetes.kubeclient.FlinkPod in project flink by apache.
the class FlinkConfMountDecoratorTest method testWhetherPodOrContainerIsDecorated.
@Test
public void testWhetherPodOrContainerIsDecorated() {
final FlinkPod resultFlinkPod = flinkConfMountDecorator.decorateFlinkPod(baseFlinkPod);
assertNotEquals(baseFlinkPod.getPodWithoutMainContainer(), resultFlinkPod.getPodWithoutMainContainer());
assertNotEquals(baseFlinkPod.getMainContainer(), resultFlinkPod.getMainContainer());
}
use of org.apache.flink.kubernetes.kubeclient.FlinkPod in project flink by apache.
the class FlinkConfMountDecoratorTest method testDecoratedFlinkPodWithLogback.
@Test
public void testDecoratedFlinkPodWithLogback() throws IOException {
KubernetesTestUtils.createTemporyFile("some data", flinkConfDir, CONFIG_FILE_LOGBACK_NAME);
final FlinkPod resultFlinkPod = flinkConfMountDecorator.decorateFlinkPod(baseFlinkPod);
final List<KeyToPath> expectedKeyToPaths = Arrays.asList(new KeyToPathBuilder().withKey(CONFIG_FILE_LOGBACK_NAME).withPath(CONFIG_FILE_LOGBACK_NAME).build(), new KeyToPathBuilder().withKey(FLINK_CONF_FILENAME).withPath(FLINK_CONF_FILENAME).build());
final List<Volume> expectedVolumes = Collections.singletonList(new VolumeBuilder().withName(Constants.FLINK_CONF_VOLUME).withNewConfigMap().withName(getFlinkConfConfigMapName(CLUSTER_ID)).withItems(expectedKeyToPaths).endConfigMap().build());
assertEquals(expectedVolumes, resultFlinkPod.getPodWithoutMainContainer().getSpec().getVolumes());
}
use of org.apache.flink.kubernetes.kubeclient.FlinkPod in project flink by apache.
the class InitJobManagerDecoratorAccountTest method onSetup.
@Override
protected void onSetup() throws Exception {
super.onSetup();
final InitJobManagerDecorator initJobManagerDecorator = new InitJobManagerDecorator(this.kubernetesJobManagerParameters);
final FlinkPod resultFlinkPod = initJobManagerDecorator.decorateFlinkPod(this.baseFlinkPod);
this.resultPod = resultFlinkPod.getPodWithoutMainContainer();
}
use of org.apache.flink.kubernetes.kubeclient.FlinkPod in project flink by apache.
the class InitTaskManagerDecoratorTest method onSetup.
@Override
protected void onSetup() throws Exception {
super.onSetup();
final InitTaskManagerDecorator initTaskManagerDecorator = new InitTaskManagerDecorator(kubernetesTaskManagerParameters);
final FlinkPod resultFlinkPod = initTaskManagerDecorator.decorateFlinkPod(this.baseFlinkPod);
this.resultPod = resultFlinkPod.getPodWithoutMainContainer();
this.resultMainContainer = resultFlinkPod.getMainContainer();
}
use of org.apache.flink.kubernetes.kubeclient.FlinkPod in project flink by apache.
the class KubernetesFactoryWithPodTemplateTestBase method onSetup.
@Override
public final void onSetup() throws Exception {
final FlinkPod podTemplate = KubernetesUtils.loadPodFromTemplateFile(flinkKubeClient, KubernetesPodTemplateTestUtils.getPodTemplateFile(), KubernetesPodTemplateTestUtils.TESTING_MAIN_CONTAINER_NAME);
this.resultPod = getResultPod(podTemplate);
}
Aggregations