mirror of
https://github.com/pawelmalak/flame.git
synced 2025-07-29 15:49:37 +02:00
attempt to fix integrations
This commit is contained in:
parent
5474fe324f
commit
e5154576b4
5 changed files with 53 additions and 15 deletions
|
@ -3,6 +3,7 @@ const k8s = require('@kubernetes/client-node');
|
|||
const Logger = require('../../../utils/Logger');
|
||||
const logger = new Logger();
|
||||
const loadConfig = require('../../../utils/loadConfig');
|
||||
const Category = require('../../../models/Category');
|
||||
|
||||
const kubernetesDefaultCategory = {
|
||||
id: -3,
|
||||
|
@ -39,6 +40,17 @@ const useKubernetes = async (apps) => {
|
|||
|
||||
const kubernetesApps = [];
|
||||
|
||||
const categories = await Category.findAll({
|
||||
where: {
|
||||
type: 'apps'
|
||||
},
|
||||
order: [[orderType, 'ASC']]
|
||||
});
|
||||
|
||||
if (!categories.find(category => category.id === kubernetesDefaultCategory.id)) {
|
||||
categories.push(await Category.create(kubernetesDefaultCategory));
|
||||
}
|
||||
|
||||
for (const ingress of ingresses) {
|
||||
const annotations = ingress.metadata.annotations;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue