Move LABELS_TO_IGNORE_REGEX to harvester pkg and update imports

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
This commit is contained in:
Francesco Torchia 2024-10-24 11:34:52 +02:00
parent 94a08a7e38
commit d15adeb8cf
No known key found for this signature in database
GPG Key ID: E6D011B7415D4393
3 changed files with 10 additions and 4 deletions

View File

@ -1,3 +1,11 @@
const CATTLE_REGEX = /cattle\.io\//;
const VM_MAINTENANCE_MODE_STRATEGY = /harvesterhci\.io\/maintain-mode-strategy/;
export const LABELS_TO_IGNORE_REGEX = [
CATTLE_REGEX,
VM_MAINTENANCE_MODE_STRATEGY
];
export const HCI = {
CLOUD_INIT: 'harvesterhci.io/cloud-init-template',
CURRENT_IP: 'rke2.io/internal-ip',

View File

@ -2,11 +2,10 @@ import { find, pickBy, omitBy } from 'lodash';
import {
AS, MODE, _VIEW, _CONFIG, _UNFLAG, _EDIT
} from '@shell/config/query-params';
import { HCI as HCI_ANNOTATIONS } from '@pkg/harvester/config/labels-annotations';
import { LABELS_TO_IGNORE_REGEX, HCI as HCI_ANNOTATIONS } from '@pkg/harvester/config/labels-annotations';
import { findBy } from '@shell/utils/array';
import { get, set } from '@shell/utils/object';
import { colorForState } from '@shell/plugins/dashboard-store/resource-class';
import { LABELS_TO_IGNORE_REGEX } from '@shell/config/labels-annotations';
import { matchesSomeRegex } from '@shell/utils/string';
import { PRODUCT_NAME as HARVESTER_PRODUCT } from '../config/harvester';
import { HCI } from '../types';

View File

@ -6,10 +6,9 @@ import { POD, NODE, PVC } from '@shell/config/types';
import { findBy } from '@shell/utils/array';
import { parseSi } from '@shell/utils/units';
import { get, set } from '@shell/utils/object';
import { HCI as HCI_ANNOTATIONS } from '@pkg/harvester/config/labels-annotations';
import { LABELS_TO_IGNORE_REGEX, HCI as HCI_ANNOTATIONS } from '@pkg/harvester/config/labels-annotations';
import { _CLONE } from '@shell/config/query-params';
import { matchesSomeRegex } from '@shell/utils/string';
import { LABELS_TO_IGNORE_REGEX } from '@shell/config/labels-annotations';
import { parseVolumeClaimTemplates } from '@pkg/utils/vm';
import { BACKUP_TYPE } from '../config/types';
import { HCI } from '../types';