public class RawCustomResourceOperationsImpl extends OperationSupport
apiGroupName, apiGroupVersion, context, JSON, JSON_MAPPER, JSON_PATCH, name, namespace, resourceT, YAML_MAPPER| Constructor and Description |
|---|
RawCustomResourceOperationsImpl(okhttp3.OkHttpClient client,
Config config,
CustomResourceDefinitionContext customResourceDefinition) |
| Modifier and Type | Method and Description |
|---|---|
Map<String,Object> |
create(InputStream objectAsStream)
Create a custom resource which is non-namespaced object.
|
Map<String,Object> |
create(Map<String,Object> object)
Create a custom resource which is non-namespaced.
|
Map<String,Object> |
create(String objectAsString)
Create a custom resource which is a non-namespaced object.
|
Map<String,Object> |
create(String namespace,
InputStream objectAsStream)
Create a custom resource which is a namespaced object.
|
Map<String,Object> |
create(String namespace,
Map<String,Object> object)
Create a custom resource which is a namespaced object.
|
Map<String,Object> |
create(String namespace,
String objectAsString)
Create a custom resource which is a namespaced object.
|
Map<String,Object> |
createOrReplace(InputStream inputStream)
Create or replace a custom resource which is non-namespaced object.
|
Map<String,Object> |
createOrReplace(Map<String,Object> customResourceObject)
Create or replace a custom resource which is a non-namespced object.
|
Map<String,Object> |
createOrReplace(String objectAsString)
Create or replace a custom resource which is a non-namespaced object.
|
Map<String,Object> |
createOrReplace(String namespace,
InputStream objectAsString)
Create or replace a custom resource which is namespaced object.
|
Map<String,Object> |
createOrReplace(String namespace,
Map<String,Object> customResourceObject)
Create or replace a custom resource which is namespaced object.
|
Map<String,Object> |
createOrReplace(String namespace,
String objectAsString)
Create or replace a custom resource which is namespaced object.
|
Map<String,Object> |
delete(String namespace)
Delete all custom resources in a specific namespace
|
Map<String,Object> |
delete(String namespace,
String name)
Delete a custom resource in a specific namespace
|
Map<String,Object> |
edit(String name,
InputStream objectAsStream)
Edit a custom resource object which is a non-namespaced object.
|
Map<String,Object> |
edit(String name,
Map<String,Object> object)
Edit a custom resource object which is a non-namespaced object.
|
Map<String,Object> |
edit(String name,
String objectAsString)
Edit a custom resource object which is a non-namespaced object.
|
Map<String,Object> |
edit(String namespace,
String name,
InputStream objectAsStream)
Edit a custom resource object which is a namespaced object.
|
Map<String,Object> |
edit(String namespace,
String name,
Map<String,Object> object)
Edit a custom resource object which is a namespaced object.
|
Map<String,Object> |
edit(String namespace,
String name,
String objectAsString)
Edit a custom resource object which is a namespaced object.
|
Map<String,Object> |
get(String name)
Get a custom resource from the cluster which is non-namespaced.
|
Map<String,Object> |
get(String namespace,
String name)
Get a custom resource from the cluster which is namespaced.
|
Map<String,Object> |
list()
List all custom resources in all namespaces
|
Map<String,Object> |
list(String namespace)
List all custom resources in a specific namespace
|
Map<String,Object> |
list(String namespace,
Map<String,String> labels)
List all custom resources in a specific namespace with some labels
|
Map<String,Object> |
load(InputStream fileInputStream)
Load a custom resource object from an inputstream into a HashMap
|
Map<String,Object> |
load(String objectAsJsonString)
Load a custom resource object from a JSON string into a HashMap
|
Watch |
watch(String namespace,
String name,
Map<String,String> labels,
String resourceVersion,
Watcher<String> watcher)
Watch custom resources in the parameters specified.
|
void |
watch(String namespace,
String resourceVersion,
Watcher<String> watcher)
Watch a custom resource in a specific namespace with some resourceVersion.
|
void |
watch(String namespace,
Watcher<String> watcher)
Watch custom resources in a specific namespace.
|
void |
watch(Watcher<String> watcher)
Watchers custom resources across all namespaces.
|
assertResponseCode, checkName, checkNamespace, createStatus, createStatus, getAPIGroup, getAPIVersion, getConfig, getName, getNamespace, getNamespacedUrl, getNamespacedUrl, getNamespacedUrl, getResourceT, getResourceUrl, getResourceUrl, getRootUrl, handleCreate, handleDelete, handleDelete, handleGet, handleGet, handlePatch, handleReplace, handleReplace, handleResponse, handleResponse, handleResponse, handleResponse, isResourceNamespaced, requestException, requestFailure, unmarshal, unmarshal, unmarshalpublic RawCustomResourceOperationsImpl(okhttp3.OkHttpClient client,
Config config,
CustomResourceDefinitionContext customResourceDefinition)
public Map<String,Object> load(InputStream fileInputStream) throws IOException
fileInputStream - file input streamIOException - exception in case any read operation fails.public Map<String,Object> load(String objectAsJsonString) throws IOException
objectAsJsonString - object as JSON stringIOException - exception in case any problem in reading json.public Map<String,Object> create(String objectAsString) throws IOException
objectAsString - object as JSON stringIOException - exception in case of any network/read problemspublic Map<String,Object> create(Map<String,Object> object) throws KubernetesClientException, IOException
object - object a HashMapKubernetesClientException - in case of error from Kubernetes APIIOException - in case of problems while reading HashMappublic Map<String,Object> create(String namespace, String objectAsString) throws KubernetesClientException, IOException
namespace - namespace in which we want object to be created.objectAsString - Object as JSON stringKubernetesClientException - in case of error from Kubernetes APIIOException - in case of problems while reading JSON objectpublic Map<String,Object> create(InputStream objectAsStream) throws KubernetesClientException, IOException
objectAsStream - object as a file input streamKubernetesClientException - in case of error from Kubernetes APIIOException - in case of problems while reading filepublic Map<String,Object> create(String namespace, InputStream objectAsStream) throws KubernetesClientException, IOException
namespace - namespace in which we want object to be createdobjectAsStream - object as file input streamKubernetesClientException - in case of error from Kubernetes APIIOException - in case of problems while reading filepublic Map<String,Object> create(String namespace, Map<String,Object> object) throws KubernetesClientException, IOException
namespace - namespace in which we want object to be created.object - object as a HashMapKubernetesClientException - in case of error from Kubernetes APIIOException - in case of problems faced while serializing HashMappublic Map<String,Object> createOrReplace(String objectAsString) throws IOException
objectAsString - object as JSON stringIOException - in case of network/serializiation failures or failures from Kuberntes APIpublic Map<String,Object> createOrReplace(Map<String,Object> customResourceObject) throws IOException
customResourceObject - object as HashMapIOException - in case of network/serialization failures or failures from Kubernetes APIpublic Map<String,Object> createOrReplace(InputStream inputStream) throws IOException
inputStream - object as file input streamIOException - in case of network/serialization failures or failures from Kubernetes APIpublic Map<String,Object> createOrReplace(String namespace, String objectAsString) throws IOException
namespace - desired namespaceobjectAsString - object as JSON StringIOException - in case of network/serialization failures or failures from Kubernetes APIpublic Map<String,Object> createOrReplace(String namespace, Map<String,Object> customResourceObject) throws IOException
namespace - desired namespacecustomResourceObject - object as HashMapIOException - in case of network/serialization failures or failures from Kubernetes APIpublic Map<String,Object> createOrReplace(String namespace, InputStream objectAsString) throws IOException
namespace - desired namespaceobjectAsString - object as file input streamIOException - in case of network/serialization failures or failures from Kubernetes APIpublic Map<String,Object> edit(String name, Map<String,Object> object) throws IOException
name - name of the custom resourceobject - new object as a HashMapIOException - in case of network/serialization failures or failures from Kubernetes APIpublic Map<String,Object> edit(String name, String objectAsString) throws IOException
name - name of the custom resourceobjectAsString - new object as a JSON StringIOException - in case of network/serialization failures or failures from Kubernetes APIpublic Map<String,Object> edit(String namespace, String name, Map<String,Object> object) throws IOException
namespace - desired namespacename - name of the custom resourceobject - new object as a HashMapIOException - in case of network/serialization failures or failures from Kubernetes APIpublic Map<String,Object> edit(String namespace, String name, String objectAsString) throws IOException
namespace - desired namespacename - name of the custom resourceobjectAsString - new object as a JSON stringIOException - in case of network/serialization failures or failures from Kubernetes APIpublic Map<String,Object> edit(String name, InputStream objectAsStream) throws IOException, KubernetesClientException
name - name of the custom resourceobjectAsStream - new object as a file input streamIOException - in case of network/serialization failures or failures from Kubernetes APIKubernetesClientExceptionpublic Map<String,Object> edit(String namespace, String name, InputStream objectAsStream) throws IOException, KubernetesClientException
namespace - desired namespacename - name of the custom resourceobjectAsStream - new object as a file input streamIOException - in case of network/serialization failures or failures from Kubernetes APIKubernetesClientExceptionpublic Map<String,Object> get(String name)
name - name of custom resourcepublic Map<String,Object> get(String namespace, String name)
namespace - desired namespacename - name of custom resourcepublic Map<String,Object> list()
public Map<String,Object> list(String namespace)
namespace - desired namespacepublic Map<String,Object> list(String namespace, Map<String,String> labels)
namespace - desired namespacelabels - labels as a HashMappublic Map<String,Object> delete(String namespace)
namespace - desired namespacepublic Map<String,Object> delete(String namespace, String name)
namespace - desired namespacename - custom resource's namepublic void watch(String namespace, Watcher<String> watcher) throws IOException
namespace - namespace to watchwatcher - watcher object which reports updates with objectIOException - in case of network errorpublic void watch(String namespace, String resourceVersion, Watcher<String> watcher) throws IOException
namespace - namespace to watchresourceVersion - resource version since when to watchwatcher - watcher object which reports updatesIOException - in case of network errorpublic void watch(Watcher<String> watcher) throws IOException
watcher - watcher object which reports eventsIOException - in case of network errorpublic Watch watch(String namespace, String name, Map<String,String> labels, String resourceVersion, Watcher<String> watcher) throws IOException
namespace - namespace to watch (optionalname - name of custom resource (optional)labels - HashMap containing labels (optional)resourceVersion - resource version since when to watch (optional)watcher - watcher object which reports eventsIOException - in case of network errorCopyright © 2015–2019 Red Hat. All rights reserved.