io.fabric8.kubernetes.api.model.apps.StatefulSetList Java Examples
The following examples show how to use
io.fabric8.kubernetes.api.model.apps.StatefulSetList.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: StatefulSetTest.java From kubernetes-client with Apache License 2.0 | 6 votes |
@Test public void testList() { server.expect().withPath("/apis/apps/v1/namespaces/test/statefulsets").andReturn(200, new StatefulSetListBuilder().build()).once(); server.expect().withPath("/apis/apps/v1/namespaces/ns1/statefulsets").andReturn(200, new StatefulSetListBuilder() .addNewItem().and() .addNewItem().and().build()) .once(); KubernetesClient client = server.getClient(); StatefulSetList statefulSetList = client.apps().statefulSets().list(); assertNotNull(statefulSetList); assertEquals(0, statefulSetList.getItems().size()); statefulSetList = client.apps().statefulSets().inNamespace("ns1").list(); assertNotNull(statefulSetList); assertEquals(2, statefulSetList.getItems().size()); }
Example #2
Source File: KubernetesAppDeployer.java From spring-cloud-deployer-kubernetes with Apache License 2.0 | 5 votes |
private void deleteStatefulSet(Map<String, String> labels) { FilterWatchListDeletable<StatefulSet, StatefulSetList, Boolean, Watch, Watcher<StatefulSet>> ssToDelete = client.apps().statefulSets().withLabels(labels); if (ssToDelete != null && ssToDelete.list().getItems() != null) { boolean ssDeleted = ssToDelete.delete(); logger.debug(String.format("StatefulSet deleted for: %s - %b", labels, ssDeleted)); } }
Example #3
Source File: MockKube.java From strimzi-kafka-operator with Apache License 2.0 | 5 votes |
private MixedOperation<StatefulSet, StatefulSetList, DoneableStatefulSet, RollableScalableResource<StatefulSet, DoneableStatefulSet>> buildStatefulSets(MockBuilder<Pod, PodList, DoneablePod, PodResource<Pod, DoneablePod>> podMockBuilder, MixedOperation<Pod, PodList, DoneablePod, PodResource<Pod, DoneablePod>> mockPods, MixedOperation<PersistentVolumeClaim, PersistentVolumeClaimList, DoneablePersistentVolumeClaim, Resource<PersistentVolumeClaim, DoneablePersistentVolumeClaim>> mockPvcs) { MixedOperation<StatefulSet, StatefulSetList, DoneableStatefulSet, RollableScalableResource<StatefulSet, DoneableStatefulSet>> result = new StatefulSetMockBuilder(podMockBuilder, ssDb, podDb, mockPods, mockPvcs).build(); return result; }
Example #4
Source File: StatefulSetOperationsImpl.java From kubernetes-client with Apache License 2.0 | 5 votes |
public StatefulSetOperationsImpl(RollingOperationContext context) { super(context.withApiGroupName("apps") .withApiGroupVersion("v1") .withPlural("statefulsets")); this.type = StatefulSet.class; this.listType = StatefulSetList.class; this.doneableType = DoneableStatefulSet.class; }
Example #5
Source File: StatefulSetController.java From rabbitmq-operator with Apache License 2.0 | 4 votes |
@Override protected MixedOperation<StatefulSet, StatefulSetList, DoneableStatefulSet, RollableScalableResource<StatefulSet, DoneableStatefulSet>> operation() { return getClient().apps().statefulSets(); }
Example #6
Source File: StatefulSetOperator.java From strimzi-kafka-operator with Apache License 2.0 | 4 votes |
@Override protected MixedOperation<StatefulSet, StatefulSetList, DoneableStatefulSet, RollableScalableResource<StatefulSet, DoneableStatefulSet>> operation() { return client.apps().statefulSets(); }
Example #7
Source File: StatefulSetOperationsImpl.java From kubernetes-client with Apache License 2.0 | 4 votes |
@Override public RollingUpdater<StatefulSet, StatefulSetList, DoneableStatefulSet> getRollingUpdater(long rollingTimeout, TimeUnit rollingTimeUnit) { return new StatefulSetRollingUpdater(client, config, getNamespace(), rollingTimeUnit.toMillis(rollingTimeout), config.getLoggingInterval()); }
Example #8
Source File: StatefulSetRollingUpdater.java From kubernetes-client with Apache License 2.0 | 4 votes |
@Override protected Operation<StatefulSet, StatefulSetList, DoneableStatefulSet, RollableScalableResource<StatefulSet, DoneableStatefulSet>> resources() { return new StatefulSetOperationsImpl(client, config); }
Example #9
Source File: AppsAPIGroupClient.java From kubernetes-client with Apache License 2.0 | 4 votes |
@Override public MixedOperation<StatefulSet, StatefulSetList, DoneableStatefulSet, RollableScalableResource<StatefulSet, DoneableStatefulSet>> statefulSets() { return new StatefulSetOperationsImpl(httpClient, getConfiguration()); }
Example #10
Source File: StatefulSetIT.java From kubernetes-client with Apache License 2.0 | 4 votes |
@Test public void list() { StatefulSetList statefulSetList = client.apps().statefulSets().inNamespace(currentNamespace).list(); assertThat(statefulSetList).isNotNull(); assertEquals(1, statefulSetList.getItems().size()); }
Example #11
Source File: AppsAPIGroupDSL.java From kubernetes-client with Apache License 2.0 | votes |
MixedOperation<StatefulSet, StatefulSetList, DoneableStatefulSet, RollableScalableResource<StatefulSet, DoneableStatefulSet>> statefulSets();