use of com.marcnuri.yakc.model.io.k8s.api.apps.v1.Deployment in project yakc by manusa.
the class DeploymentService method updateReplicas.
public Deployment updateReplicas(String name, String namespace, Integer replicas) throws IOException {
final Deployment toPatch = emptyDeployment();
toPatch.getSpec().setReplicas(replicas);
return kubernetesClient.create(AppsV1Api.class).patchNamespacedDeployment(name, namespace, toPatch).get();
}
use of com.marcnuri.yakc.model.io.k8s.api.apps.v1.Deployment in project yakc by manusa.
the class DeploymentIT method readNamespacedDeployment.
@Test
@DisplayName("readNamespacedDeployment.stream, should read newly created Deployment")
void readNamespacedDeployment() throws IOException {
// When
final Deployment result = KC.create(AppsV1Api.class).readNamespacedDeployment(deploymentName, NAMESPACE).get();
// Then
assertThat(result).as("Created Deployment was not found").isNotNull();
}
Aggregations