mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 13:29:41 +02:00
fix(kuberenetes/deploy): use default resource pool (#4674)
This commit is contained in:
parent
572b64b68e
commit
c542964073
1 changed files with 11 additions and 1 deletions
|
@ -66,7 +66,17 @@ class KubernetesDeployController {
|
||||||
async getNamespacesAsync() {
|
async getNamespacesAsync() {
|
||||||
try {
|
try {
|
||||||
const pools = await this.KubernetesResourcePoolService.get();
|
const pools = await this.KubernetesResourcePoolService.get();
|
||||||
this.namespaces = _.map(pools, 'Namespace');
|
const namespaces = _.map(pools, 'Namespace').sort((a, b) => {
|
||||||
|
if (a.Name === 'default') {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if (b.Name === 'default') {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
});
|
||||||
|
|
||||||
|
this.namespaces = namespaces;
|
||||||
this.formValues.Namespace = this.namespaces[0].Name;
|
this.formValues.Namespace = this.namespaces[0].Name;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.Notifications.error('Failure', err, 'Unable to load resource pools data');
|
this.Notifications.error('Failure', err, 'Unable to load resource pools data');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue