Class K8sV1DeploymentStub

java.lang.Object
org.jdrupes.vmoperator.common.K8sGenericStub<io.kubernetes.client.openapi.models.V1Deployment,io.kubernetes.client.openapi.models.V1DeploymentList>
org.jdrupes.vmoperator.common.K8sV1DeploymentStub

public class K8sV1DeploymentStub extends K8sGenericStub<io.kubernetes.client.openapi.models.V1Deployment,io.kubernetes.client.openapi.models.V1DeploymentList>
A stub for pods (v1).
  • Field Details

    • CONTEXT

      public static final io.kubernetes.client.Discovery.APIResource CONTEXT
      The deployment’s context.
  • Constructor Details

    • K8sV1DeploymentStub

      protected K8sV1DeploymentStub(K8sClient client, String namespace, String name)
      Instantiates a new stub.
      Parameters:
      client - the client
      namespace - the namespace
      name - the name
  • Method Details

    • scale

      public Optional<io.kubernetes.client.openapi.models.V1Deployment> scale(int replicas) throws io.kubernetes.client.openapi.ApiException
      Scales the deployment.
      Parameters:
      replicas - the replicas
      Returns:
      the new model or empty if not successful
      Throws:
      io.kubernetes.client.openapi.ApiException - the API exception
    • get

      public static K8sV1DeploymentStub get(K8sClient client, String namespace, String name)
      Gets the stub for the given namespace and name.
      Parameters:
      client - the client
      namespace - the namespace
      name - the name
      Returns:
      the deployment stub