@Test @DisplayName("load, InputStream containing List with windows like line-ends (CRLF), all list items should be available") public void loadWithWindowsLineSeparatorsString() throws Exception { final List<String> fileLines = Files.readAllLines( new File(SerializationTest.class.getResource("/test-list.yml").getFile()).toPath(), StandardCharsets.UTF_8); final String crlfFile = String.join(" \r\n", fileLines); final List<HasMetadata> result = new DefaultKubernetesClient() .load(new ByteArrayInputStream(crlfFile.getBytes(StandardCharsets.UTF_8))).get(); assertEquals(2, result.size()); assertTrue(result.get(0) instanceof Service); assertTrue(result.get(1) instanceof Deployment); }
@Override public ParameterNamespaceListVisitFromServerGetDeleteRecreateWaitApplicable<HasMetadata, Boolean> load(InputStream is) { return new NamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicableListImpl(httpClient, getConfiguration(), getNamespace(), null, false, false, new ArrayList<>(), is, null, true, DeletionPropagation.BACKGROUND) { }; }
DefaultKubernetesClient extends BaseClient implements NamespacedKubernetesClient { @Override public ParameterNamespaceListVisitFromServerGetDeleteRecreateWaitApplicable<HasMetadata, Boolean> load(InputStream is) { return new NamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicableListImpl(httpClient, getConfiguration(), getNamespace(), null, false, false, new ArrayList<>(), is, null, true, DeletionPropagation.BACKGROUND) { }; } }
DefaultKubernetesClient extends BaseClient implements NamespacedKubernetesClient { @Override public ParameterNamespaceListVisitFromServerGetDeleteRecreateWaitApplicable<HasMetadata, Boolean> load(InputStream is) { return new NamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicableListImpl(httpClient, getConfiguration(), getNamespace(), null, false, false, new ArrayList<>(), is, null, true, DeletionPropagation.BACKGROUND) { }; } DefaultKubernetesClient();  DefaultKubernetesClient(String masterUrl);  DefaultKubernetesClient(Config config);  DefaultKubernetesClient(OkHttpClient httpClient, Config config); }
DefaultKubernetesClient extends BaseClient implements NamespacedKubernetesClient { @Override public ParameterNamespaceListVisitFromServerGetDeleteRecreateWaitApplicable<HasMetadata, Boolean> load(InputStream is) { return new NamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicableListImpl(httpClient, getConfiguration(), getNamespace(), null, false, false, new ArrayList<>(), is, null, true, DeletionPropagation.BACKGROUND) { }; } DefaultKubernetesClient();  DefaultKubernetesClient(String masterUrl);  DefaultKubernetesClient(Config config);  DefaultKubernetesClient(OkHttpClient httpClient, Config config); static DefaultKubernetesClient fromConfig(String config); static DefaultKubernetesClient fromConfig(InputStream is); @Override MixedOperation<ComponentStatus, ComponentStatusList, DoneableComponentStatus, Resource<ComponentStatus, DoneableComponentStatus>> componentstatuses(); @Override ParameterNamespaceListVisitFromServerGetDeleteRecreateWaitApplicable<HasMetadata, Boolean> load(InputStream is); @Override NamespaceListVisitFromServerGetDeleteRecreateWaitApplicable<HasMetadata, Boolean> resourceList(KubernetesResourceList item); @Override NamespaceListVisitFromServerGetDeleteRecreateWaitApplicable<HasMetadata, Boolean> resourceList(HasMetadata... items); @Override NamespaceListVisitFromServerGetDeleteRecreateWaitApplicable<HasMetadata, Boolean> resourceList(Collection<HasMetadata> items); @Override ParameterNamespaceListVisitFromServerGetDeleteRecreateWaitApplicable<HasMetadata, Boolean> resourceList(String s); @Override NamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicable<HasMetadata, Boolean> resource(HasMetadata item); @Override NamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicable<HasMetadata, Boolean> resource(String s); @Override MixedOperation<Binding, KubernetesResourceList<Binding>, DoneableBinding, Resource<Binding, DoneableBinding>> bindings(); @Override MixedOperation<Endpoints, EndpointsList, DoneableEndpoints, Resource<Endpoints, DoneableEndpoints>> endpoints(); @Override MixedOperation<Event, EventList, DoneableEvent, Resource<Event, DoneableEvent>> events(); @Override NonNamespaceOperation<Namespace, NamespaceList, DoneableNamespace, Resource<Namespace, DoneableNamespace>> namespaces(); @Override NonNamespaceOperation<Node, NodeList, DoneableNode, Resource<Node, DoneableNode>> nodes(); @Override NonNamespaceOperation<PersistentVolume, PersistentVolumeList, DoneablePersistentVolume, Resource<PersistentVolume, DoneablePersistentVolume>> persistentVolumes(); @Override MixedOperation<PersistentVolumeClaim, PersistentVolumeClaimList, DoneablePersistentVolumeClaim, Resource<PersistentVolumeClaim, DoneablePersistentVolumeClaim>> persistentVolumeClaims(); @Override MixedOperation<Pod, PodList, DoneablePod, PodResource<Pod, DoneablePod>> pods(); @Override MixedOperation<ReplicationController, ReplicationControllerList, DoneableReplicationController, RollableScalableResource<ReplicationController, DoneableReplicationController>> replicationControllers(); @Override MixedOperation<ResourceQuota, ResourceQuotaList, DoneableResourceQuota, Resource<ResourceQuota, DoneableResourceQuota>> resourceQuotas(); @Override SchedulingAPIGroupDSL scheduling(); @Override MixedOperation<Secret, SecretList, DoneableSecret, Resource<Secret, DoneableSecret>> secrets(); @Override MixedOperation<Service, ServiceList, DoneableService, ServiceResource<Service, DoneableService>> services(); @Override MixedOperation<ServiceAccount, ServiceAccountList, DoneableServiceAccount, Resource<ServiceAccount, DoneableServiceAccount>> serviceAccounts(); @Override MixedOperation<APIService, APIServiceList, DoneableAPIService, Resource<APIService, DoneableAPIService>> apiServices(); @Override KubernetesListMixedOperation lists(); @Override MixedOperation<ConfigMap, ConfigMapList, DoneableConfigMap, Resource<ConfigMap, DoneableConfigMap>> configMaps(); @Override MixedOperation<LimitRange, LimitRangeList, DoneableLimitRange, Resource<LimitRange, DoneableLimitRange>> limitRanges(); @Override NonNamespaceOperation<CustomResourceDefinition, CustomResourceDefinitionList, DoneableCustomResourceDefinition, Resource<CustomResourceDefinition, DoneableCustomResourceDefinition>> customResourceDefinitions(); @Override ApiextensionsAPIGroupDSL apiextensions(); @Override NonNamespaceOperation<CertificateSigningRequest, CertificateSigningRequestList, DoneableCertificateSigningRequest, Resource<CertificateSigningRequest, DoneableCertificateSigningRequest>> certificateSigningRequests(); @Override AuthorizationAPIGroupDSL authorization(); @Override Createable<TokenReview, TokenReview, DoneableTokenReview> tokenReviews(); @Override MixedOperation<T, L, D, Resource<T, D>> customResources(CustomResourceDefinitionContext crdContext, Class<T> resourceType, Class<L> listClass, Class<D> doneClass); @Override MixedOperation<T, L, D, Resource<T, D>> customResources(CustomResourceDefinition crd, Class<T> resourceType, Class<L> listClass, Class<D> doneClass); @Override RawCustomResourceOperationsImpl customResource(CustomResourceDefinitionContext customResourceDefinition); @Override MixedOperation<T, L, D, Resource<T, D>> customResource(CustomResourceDefinition crd, Class<T> resourceType, Class<L> listClass, Class<D> doneClass); @Override NamespacedKubernetesClient inNamespace(String namespace); @Override NamespacedKubernetesClient inAnyNamespace(); @Override FunctionCallable<NamespacedKubernetesClient> withRequestConfig(RequestConfig requestConfig); @Override ExtensionsAPIGroupDSL extensions(); @Override VersionInfo getVersion(); @Override V1APIGroupDSL v1(); @Override AdmissionRegistrationAPIGroupDSL admissionRegistration(); @Override AppsAPIGroupDSL apps(); @Override AutoscalingAPIGroupDSL autoscaling(); @Override NetworkAPIGroupDSL network(); @Override StorageAPIGroupDSL storage(); @Override BatchAPIGroupDSL batch(); @Override MetricAPIGroupDSL top(); @Override PolicyAPIGroupDSL policy(); @Override RbacAPIGroupDSL rbac(); @Override SettingsAPIGroupDSL settings(); @Override SharedInformerFactory informers(); @Override SharedInformerFactory informers(ExecutorService executorService); @Override LeaderElectorBuilder<NamespacedKubernetesClient> leaderElector(); @Override MixedOperation<Lease, LeaseList, DoneableLease, Resource<Lease, DoneableLease>> leases(); @Override RunOperations run(); }
DefaultKubernetesClient extends BaseClient implements NamespacedKubernetesClient { @Override public ParameterNamespaceListVisitFromServerGetDeleteRecreateWaitApplicable<HasMetadata, Boolean> load(InputStream is) { return new NamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicableListImpl(httpClient, getConfiguration(), getNamespace(), null, false, false, new ArrayList<>(), is, null, true, DeletionPropagation.BACKGROUND) { }; } DefaultKubernetesClient();  DefaultKubernetesClient(String masterUrl);  DefaultKubernetesClient(Config config);  DefaultKubernetesClient(OkHttpClient httpClient, Config config); static DefaultKubernetesClient fromConfig(String config); static DefaultKubernetesClient fromConfig(InputStream is); @Override MixedOperation<ComponentStatus, ComponentStatusList, DoneableComponentStatus, Resource<ComponentStatus, DoneableComponentStatus>> componentstatuses(); @Override ParameterNamespaceListVisitFromServerGetDeleteRecreateWaitApplicable<HasMetadata, Boolean> load(InputStream is); @Override NamespaceListVisitFromServerGetDeleteRecreateWaitApplicable<HasMetadata, Boolean> resourceList(KubernetesResourceList item); @Override NamespaceListVisitFromServerGetDeleteRecreateWaitApplicable<HasMetadata, Boolean> resourceList(HasMetadata... items); @Override NamespaceListVisitFromServerGetDeleteRecreateWaitApplicable<HasMetadata, Boolean> resourceList(Collection<HasMetadata> items); @Override ParameterNamespaceListVisitFromServerGetDeleteRecreateWaitApplicable<HasMetadata, Boolean> resourceList(String s); @Override NamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicable<HasMetadata, Boolean> resource(HasMetadata item); @Override NamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicable<HasMetadata, Boolean> resource(String s); @Override MixedOperation<Binding, KubernetesResourceList<Binding>, DoneableBinding, Resource<Binding, DoneableBinding>> bindings(); @Override MixedOperation<Endpoints, EndpointsList, DoneableEndpoints, Resource<Endpoints, DoneableEndpoints>> endpoints(); @Override MixedOperation<Event, EventList, DoneableEvent, Resource<Event, DoneableEvent>> events(); @Override NonNamespaceOperation<Namespace, NamespaceList, DoneableNamespace, Resource<Namespace, DoneableNamespace>> namespaces(); @Override NonNamespaceOperation<Node, NodeList, DoneableNode, Resource<Node, DoneableNode>> nodes(); @Override NonNamespaceOperation<PersistentVolume, PersistentVolumeList, DoneablePersistentVolume, Resource<PersistentVolume, DoneablePersistentVolume>> persistentVolumes(); @Override MixedOperation<PersistentVolumeClaim, PersistentVolumeClaimList, DoneablePersistentVolumeClaim, Resource<PersistentVolumeClaim, DoneablePersistentVolumeClaim>> persistentVolumeClaims(); @Override MixedOperation<Pod, PodList, DoneablePod, PodResource<Pod, DoneablePod>> pods(); @Override MixedOperation<ReplicationController, ReplicationControllerList, DoneableReplicationController, RollableScalableResource<ReplicationController, DoneableReplicationController>> replicationControllers(); @Override MixedOperation<ResourceQuota, ResourceQuotaList, DoneableResourceQuota, Resource<ResourceQuota, DoneableResourceQuota>> resourceQuotas(); @Override SchedulingAPIGroupDSL scheduling(); @Override MixedOperation<Secret, SecretList, DoneableSecret, Resource<Secret, DoneableSecret>> secrets(); @Override MixedOperation<Service, ServiceList, DoneableService, ServiceResource<Service, DoneableService>> services(); @Override MixedOperation<ServiceAccount, ServiceAccountList, DoneableServiceAccount, Resource<ServiceAccount, DoneableServiceAccount>> serviceAccounts(); @Override MixedOperation<APIService, APIServiceList, DoneableAPIService, Resource<APIService, DoneableAPIService>> apiServices(); @Override KubernetesListMixedOperation lists(); @Override MixedOperation<ConfigMap, ConfigMapList, DoneableConfigMap, Resource<ConfigMap, DoneableConfigMap>> configMaps(); @Override MixedOperation<LimitRange, LimitRangeList, DoneableLimitRange, Resource<LimitRange, DoneableLimitRange>> limitRanges(); @Override NonNamespaceOperation<CustomResourceDefinition, CustomResourceDefinitionList, DoneableCustomResourceDefinition, Resource<CustomResourceDefinition, DoneableCustomResourceDefinition>> customResourceDefinitions(); @Override ApiextensionsAPIGroupDSL apiextensions(); @Override NonNamespaceOperation<CertificateSigningRequest, CertificateSigningRequestList, DoneableCertificateSigningRequest, Resource<CertificateSigningRequest, DoneableCertificateSigningRequest>> certificateSigningRequests(); @Override AuthorizationAPIGroupDSL authorization(); @Override Createable<TokenReview, TokenReview, DoneableTokenReview> tokenReviews(); @Override MixedOperation<T, L, D, Resource<T, D>> customResources(CustomResourceDefinitionContext crdContext, Class<T> resourceType, Class<L> listClass, Class<D> doneClass); @Override MixedOperation<T, L, D, Resource<T, D>> customResources(CustomResourceDefinition crd, Class<T> resourceType, Class<L> listClass, Class<D> doneClass); @Override RawCustomResourceOperationsImpl customResource(CustomResourceDefinitionContext customResourceDefinition); @Override MixedOperation<T, L, D, Resource<T, D>> customResource(CustomResourceDefinition crd, Class<T> resourceType, Class<L> listClass, Class<D> doneClass); @Override NamespacedKubernetesClient inNamespace(String namespace); @Override NamespacedKubernetesClient inAnyNamespace(); @Override FunctionCallable<NamespacedKubernetesClient> withRequestConfig(RequestConfig requestConfig); @Override ExtensionsAPIGroupDSL extensions(); @Override VersionInfo getVersion(); @Override V1APIGroupDSL v1(); @Override AdmissionRegistrationAPIGroupDSL admissionRegistration(); @Override AppsAPIGroupDSL apps(); @Override AutoscalingAPIGroupDSL autoscaling(); @Override NetworkAPIGroupDSL network(); @Override StorageAPIGroupDSL storage(); @Override BatchAPIGroupDSL batch(); @Override MetricAPIGroupDSL top(); @Override PolicyAPIGroupDSL policy(); @Override RbacAPIGroupDSL rbac(); @Override SettingsAPIGroupDSL settings(); @Override SharedInformerFactory informers(); @Override SharedInformerFactory informers(ExecutorService executorService); @Override LeaderElectorBuilder<NamespacedKubernetesClient> leaderElector(); @Override MixedOperation<Lease, LeaseList, DoneableLease, Resource<Lease, DoneableLease>> leases(); @Override RunOperations run();  }