@Service public class KubernetesManager extends Object
| Constructor and Description |
|---|
KubernetesManager() |
KubernetesManager(io.kubernetes.client.openapi.apis.CoreV1Api coreV1Api,
String localPodName,
int propertyKubernetesMaxWritePods) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkConfigMapExist(String k8sNamespace,
String configMapName)
check config map exist
|
String |
createConfigMap(String k8sNamespace,
String name,
Map<String,String> data)
Creates a Kubernetes ConfigMap.
|
String |
getValueFromConfigMap(String k8sNamespace,
String name,
String key)
get value from config map
|
boolean |
updateConfigMap(String k8sNamespace,
String name,
Map<String,String> data)
update config map
|
public KubernetesManager()
public KubernetesManager(io.kubernetes.client.openapi.apis.CoreV1Api coreV1Api,
String localPodName,
int propertyKubernetesMaxWritePods)
public String createConfigMap(String k8sNamespace, String name, Map<String,String> data)
k8sNamespace - the namespace of the ConfigMapname - the name of the ConfigMapdata - the data to be stored in the ConfigMapRuntimeException - if an error occurs while creating the ConfigMappublic String getValueFromConfigMap(String k8sNamespace, String name, String key)
k8sNamespace - k8sNamespacename - config map namekey - config map key (cluster+namespace)public boolean updateConfigMap(String k8sNamespace, String name, Map<String,String> data) throws io.kubernetes.client.openapi.ApiException
k8sNamespace - configmap namespacename - config map namedata - new dataio.kubernetes.client.openapi.ApiExceptionCopyright © 2025. All rights reserved.