use of io.fabric8.kubernetes.client.DefaultKubernetesClient in project jointware by isdream.
the class NamespaceTest method testCreateNamespace.
public void testCreateNamespace() throws Exception {
DefaultKubernetesClient client = new DefaultKubernetesClient("http://118.190.46.58:9888");
KubernetesModelGenerator generator = new KubernetesModelGenerator();
generator.create(client, "Namespace", params);
}
use of io.fabric8.kubernetes.client.DefaultKubernetesClient in project jointware by isdream.
the class NamespaceTest method testDeleteNamespace.
public void testDeleteNamespace() throws Exception {
DefaultKubernetesClient client = new DefaultKubernetesClient("http://118.190.46.58:9888");
KubernetesModelGenerator generator = new KubernetesModelGenerator();
generator.delete(client, "Namespace", "test431");
}
use of io.fabric8.kubernetes.client.DefaultKubernetesClient in project jointware by isdream.
the class DeploymentTest method testUpdateDeployment.
// public void testCreateDeployment() throws Exception {
// DefaultKubernetesClient client = new DefaultKubernetesClient("http://118.190.46.58:9888");
// KubernetesModelParametersGenerator generator = new KubernetesModelParametersGenerator();
// generator.create(client, KubernetesConstants.KIND_DEPLOYMENT, params);
//
// }
public void testUpdateDeployment() throws Exception {
DefaultKubernetesClient client = new DefaultKubernetesClient("http://118.190.46.58:9888");
KubernetesModelGenerator generator = new KubernetesModelGenerator();
generator.scaleTo(client, "Deployment", "default", "busybox-dm", 4);
}
use of io.fabric8.kubernetes.client.DefaultKubernetesClient in project jointware by isdream.
the class DeploymentTest method testDeleteDeployment.
public void testDeleteDeployment() throws Exception {
DefaultKubernetesClient client = new DefaultKubernetesClient("http://118.190.46.58:9888");
KubernetesModelGenerator generator = new KubernetesModelGenerator();
generator.delete(client, "Deployment", "default", "busybox-dm");
}
use of io.fabric8.kubernetes.client.DefaultKubernetesClient in project jointware by isdream.
the class JSONToExecutorSampleTest method main.
/**
********************************************
*
* Main
*
*********************************************
*/
public static void main(String[] args) throws Exception {
// JsonToMap
Map<String, Map<String, Object>> originRequest = getClientRequest();
// getClient
DefaultKubernetesClient client = (DefaultKubernetesClient) createClient(originRequest.get("target"));
// toTartgetMap
Map<String, Map<String, Object>> targetRequest = toTargetMap(originRequest, "jointwareRef");
// option : test
ModelGenerator mg = new KubernetesModelGenerator();
System.out.println(mg.toObject(targetRequest, Deployment.class.getSimpleName()));
// getExcutor
ConatinerExecutor executor = (ConatinerExecutor) createExecutor(originRequest.get("target"));
// impl
// executor.create(client, getKind(originRequest.remove("target")), targetRequest);
}
Aggregations