mirror of
https://github.com/portainer/portainer.git
synced 2025-07-20 22:09:41 +02:00
Merge in release fixes to develop (#4687)
* fix(frontend) unable to retrieve config map error when trying to manage newly created resource pool (ce#180) (#4618)
* fix(frontend) unable to retrieve config map error when trying to manage newly created resource pool (ce#180)
* fix(frontend) rephrase comments (#4629)
Co-authored-by: Stéphane Busso <sbusso@users.noreply.github.com>
Co-authored-by: Simon Meng <simon.meng@portainer.io>
Co-authored-by: Stéphane Busso <sbusso@users.noreply.github.com>
* + silently continue when downloading artifacts in windows (#4637)
* fix(docker/stack-details): do not display editor tab for external stack (#4650)
* Revert "chore(build): bump Kompose version (#4475)" (#4676)
This reverts commit 380f106571
.
Co-authored-by: Stéphane Busso <sbusso@users.noreply.github.com>
Co-authored-by: cong meng <mcpacino@gmail.com>
Co-authored-by: Simon Meng <simon.meng@portainer.io>
Co-authored-by: Stéphane Busso <sbusso@users.noreply.github.com>
Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io>
This commit is contained in:
parent
82f8062784
commit
9fbda9fb99
5 changed files with 17 additions and 3 deletions
|
@ -28,8 +28,19 @@ class KubernetesConfigMapService {
|
|||
this.KubernetesConfigMaps(namespace).get(params).$promise,
|
||||
this.KubernetesConfigMaps(namespace).getYaml(params).$promise,
|
||||
]);
|
||||
const configMap = KubernetesConfigMapConverter.apiToConfigMap(rawPromise.value, yamlPromise.value);
|
||||
return configMap;
|
||||
|
||||
if (_.get(rawPromise, 'reason.status') == 404 && _.get(yamlPromise, 'reason.status') == 404) {
|
||||
return KubernetesConfigMapConverter.defaultConfigMap(namespace, name);
|
||||
}
|
||||
|
||||
// Saving binary data to 'data' field in configMap Object is not allowed by kubernetes and getYaml() may get
|
||||
// an error. We should keep binary data to 'binaryData' field instead of 'data'. Before that, we
|
||||
// use response from get() and ignore 500 error as a workaround.
|
||||
if (rawPromise.value) {
|
||||
return KubernetesConfigMapConverter.apiToConfigMap(rawPromise.value, yamlPromise.value);
|
||||
}
|
||||
|
||||
throw new PortainerError('Unable to retrieve config map ', name);
|
||||
} catch (err) {
|
||||
if (err.status === 404) {
|
||||
return KubernetesConfigMapConverter.defaultConfigMap(namespace, name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue