@Override
    public List<HasMetadata> buildAccompanyingKubernetesResources() throws IOException {
        final Service service =
                kubernetesJobManagerParameters
                        .getRestServiceExposedType()
                        .serviceType()
                        .buildUpExternalRestService(kubernetesJobManagerParameters);

        return Collections.singletonList(service);
    }
@Test
    void testSetServiceExposedType() throws IOException {
        this.flinkConfig.set(
                KubernetesConfigOptions.REST_SERVICE_EXPOSED_TYPE,
                KubernetesConfigOptions.ServiceExposedType.NodePort);
        final List<HasMetadata> resources =
                this.externalServiceDecorator.buildAccompanyingKubernetesResources();
        assertThat(((Service) resources.get(0)).getSpec().getType())
                .isEqualTo(KubernetesConfigOptions.ServiceExposedType.NodePort.name());

        this.flinkConfig.set(
                KubernetesConfigOptions.REST_SERVICE_EXPOSED_TYPE,
                KubernetesConfigOptions.ServiceExposedType.ClusterIP);
        final List<HasMetadata> servicesWithClusterIP =
                this.externalServiceDecorator.buildAccompanyingKubernetesResources();
        assertThat(((Service) servicesWithClusterIP.get(0)).getSpec().getType())
                .isEqualTo(KubernetesConfigOptions.ServiceExposedType.ClusterIP.name());
    }