public class ResourceUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static List<io.fabric8.kubernetes.api.model.HasMetadata> |
deserializeKubernetesListOrTemplate(File manifest) |
static File |
getFinalResourceDir(File resourceDir,
String environment) |
static boolean |
jsonEquals(com.google.gson.JsonObject first,
com.google.gson.JsonObject second) |
static <T extends io.fabric8.kubernetes.api.model.KubernetesResource> |
load(File file,
Class<T> clazz) |
static <T extends io.fabric8.kubernetes.api.model.KubernetesResource> |
load(File file,
Class<T> clazz,
ResourceFileType resourceFileType) |
static <T extends io.fabric8.kubernetes.api.model.KubernetesResource> |
load(InputStream in,
Class<T> clazz,
ResourceFileType resourceFileType) |
static File |
save(File file,
Object data) |
static File |
save(File file,
Object data,
ResourceFileType type) |
static String |
toJson(Object resource) |
static String |
toYaml(Object resource) |
public static boolean jsonEquals(com.google.gson.JsonObject first,
com.google.gson.JsonObject second)
public static List<io.fabric8.kubernetes.api.model.HasMetadata> deserializeKubernetesListOrTemplate(File manifest) throws IOException
IOExceptionpublic static <T extends io.fabric8.kubernetes.api.model.KubernetesResource> T load(File file, Class<T> clazz) throws IOException
IOExceptionpublic static <T extends io.fabric8.kubernetes.api.model.KubernetesResource> T load(File file, Class<T> clazz, ResourceFileType resourceFileType) throws IOException
IOExceptionpublic static <T extends io.fabric8.kubernetes.api.model.KubernetesResource> T load(InputStream in, Class<T> clazz, ResourceFileType resourceFileType) throws IOException
IOExceptionpublic static File save(File file, Object data) throws IOException
IOExceptionpublic static File save(File file, Object data, ResourceFileType type) throws IOException
IOExceptionpublic static String toYaml(Object resource) throws com.fasterxml.jackson.core.JsonProcessingException
com.fasterxml.jackson.core.JsonProcessingExceptionpublic static String toJson(Object resource) throws com.fasterxml.jackson.core.JsonProcessingException
com.fasterxml.jackson.core.JsonProcessingExceptionCopyright © 2021. All rights reserved.