Package io.quarkus.test.bootstrap.inject
Class KubectlClient
java.lang.Object
io.quarkus.test.bootstrap.inject.KubectlClient
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PropertyLookupstatic final Stringstatic final String -
Method Summary
Modifier and TypeMethodDescriptionvoidApply the file into Kubernetes.voidapplyServiceProperties(Service service, String file, UnaryOperator<String> update, Path target) Update the file and then apply the file into Kubernetes.voidapplyServiceProperties(Service service, String file, UnaryOperator<String> update, Map<String, String> extraTemplateProperties, Path target) Update the file with extra template properties and then apply the file into Kubernetes.voidUpdate the deployment config using the service properties.static KubectlClientvoidDelete the namespace and all the resources.voidExpose the service and port defined.host()Get node host IP.logs()Get all the logs for all the pods within the current namespace.Get all the logs for all the pods within one service.List<io.fabric8.kubernetes.api.model.Pod>podsInService(Service service) Get the running pods in the current service.intResolve the port by the service.voidScale the service to the replicas.
-
Field Details
-
LABEL_TO_WATCH_FOR_LOGS
- See Also:
-
LABEL_SCENARIO_ID
- See Also:
-
ENABLED_EPHEMERAL_NAMESPACES
-
-
Method Details
-
create
-
namespace
- Returns:
- the current namespace
-
apply
Apply the file into Kubernetes.- Parameters:
file-
-
applyServicePropertiesUsingDeploymentConfig
Update the deployment config using the service properties.- Parameters:
service-
-
applyServiceProperties
public void applyServiceProperties(Service service, String file, UnaryOperator<String> update, Path target) Update the file and then apply the file into Kubernetes. A copy of the end template will be placed in the target location. -
applyServiceProperties
public void applyServiceProperties(Service service, String file, UnaryOperator<String> update, Map<String, String> extraTemplateProperties, Path target) Update the file with extra template properties and then apply the file into Kubernetes. A copy of the end template will be placed in the target location. -
expose
Expose the service and port defined.- Parameters:
service-port-
-
scaleTo
Scale the service to the replicas.- Parameters:
service-replicas-
-
podsInService
Get the running pods in the current service. -
logs
Get all the logs for all the pods within the current namespace.- Returns:
-
logs
Get all the logs for all the pods within one service.- Parameters:
service-- Returns:
-
host
Get node host IP. -
port
Resolve the port by the service.- Parameters:
service-- Returns:
-
deleteNamespace
public void deleteNamespace()Delete the namespace and all the resources. -
getScenarioId
-