|
|
@ -24,8 +24,11 @@ class KubernetesConfigMapService {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
const params = new KubernetesCommonParams();
|
|
|
|
const params = new KubernetesCommonParams();
|
|
|
|
params.id = name;
|
|
|
|
params.id = name;
|
|
|
|
const [raw, yaml] = await Promise.all([this.KubernetesConfigMaps(namespace).get(params).$promise, this.KubernetesConfigMaps(namespace).getYaml(params).$promise]);
|
|
|
|
const [rawPromise, yamlPromise] = await Promise.allSettled([
|
|
|
|
const configMap = KubernetesConfigMapConverter.apiToConfigMap(raw, yaml);
|
|
|
|
this.KubernetesConfigMaps(namespace).get(params).$promise,
|
|
|
|
|
|
|
|
this.KubernetesConfigMaps(namespace).getYaml(params).$promise,
|
|
|
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
const configMap = KubernetesConfigMapConverter.apiToConfigMap(rawPromise.value, yamlPromise.value);
|
|
|
|
return configMap;
|
|
|
|
return configMap;
|
|
|
|
} catch (err) {
|
|
|
|
} catch (err) {
|
|
|
|
if (err.status === 404) {
|
|
|
|
if (err.status === 404) {
|
|
|
|