public class Controller extends Object
Constructor and Description |
---|
Controller() |
Controller(KubernetesClient kubernetes) |
Modifier and Type | Method and Description |
---|---|
String |
apply(File file) |
void |
apply(Object dto,
String sourceName)
Applies the given DTOs onto the Kubernetes master
|
void |
applyConfig(Config config,
String sourceName) |
void |
applyConfig(com.fasterxml.jackson.databind.JsonNode entity,
String sourceName) |
void |
applyEntity(Object dto,
String sourceName)
Applies the given DTOs onto the Kubernetes master
|
String |
applyJson(byte[] json)
Applies the given JSON to the underlying REST APIs in a single operation without needing to explicitly parse first.
|
String |
applyJson(File json)
Applies the given JSON to the underlying REST APIs in a single operation without needing to explicitly parse first.
|
String |
applyJson(InputStream json)
Applies the given JSON to the underlying REST APIs in a single operation without needing to explicitly parse first.
|
String |
applyJson(String json)
Applies the given JSON to the underlying REST APIs in a single operation without needing to explicitly parse first.
|
void |
applyPod(Pod podSchema,
String sourceName) |
void |
applyReplicationController(ReplicationController replicationControllerSchema,
String sourceName) |
void |
applyService(Service serviceSchema,
String sourceName) |
void |
applyTemplateConfig(com.fasterxml.jackson.databind.JsonNode entity,
String sourceName) |
String |
applyYaml(File yaml)
Applies the given YAML to the underlying REST APIs in a single operation without needing to explicitly parse first.
|
String |
applyYaml(String yaml)
Applies the given YAML to the underlying REST APIs in a single operation without needing to explicitly parse first.
|
protected boolean |
isRunning(Pod entity) |
protected boolean |
isRunning(ReplicationController entity) |
protected boolean |
isRunning(Service entity) |
public Controller()
public Controller(KubernetesClient kubernetes)
public String apply(File file) throws IOException
IOException
public String applyJson(byte[] json) throws IOException
IOException
public String applyJson(String json) throws IOException
IOException
public String applyJson(File json) throws IOException
IOException
public String applyYaml(String yaml) throws IOException
IOException
public String applyYaml(File yaml) throws IOException
IOException
public String applyJson(InputStream json) throws IOException
IOException
public void apply(Object dto, String sourceName) throws IOException
IOException
public void applyEntity(Object dto, String sourceName)
public void applyTemplateConfig(com.fasterxml.jackson.databind.JsonNode entity, String sourceName)
public void applyConfig(Config config, String sourceName) throws IOException
IOException
public void applyConfig(com.fasterxml.jackson.databind.JsonNode entity, String sourceName) throws IOException
IOException
public void applyReplicationController(ReplicationController replicationControllerSchema, String sourceName)
protected boolean isRunning(Pod entity)
protected boolean isRunning(ReplicationController entity)
protected boolean isRunning(Service entity)
Copyright © 2011–2015 Red Hat. All rights reserved.