import { StringMap } from '@alauda/ui';
import { KubernetesResource } from './raw';
/**
 * 只保留common中需要用到的crd 扩展类型，其他的crd 扩展类型请添加到 app-shared/src/typings/k8s.ts
 */
export declare type LimitType = 'Container' | 'Pod' | 'PersistentVolumeClaim';
export interface LimitRangeSpec extends KubernetesResource {
    limits: LimitRangeItem[];
}
export interface LimitRange extends KubernetesResource {
    spec?: LimitRangeSpec;
}
export interface LimitRangeItem {
    type: LimitType;
    min?: StringMap;
    max?: StringMap;
    default?: StringMap;
    defaultRequest?: StringMap;
    maxLimitRequestRatio?: StringMap;
}
export interface ModuleInfoCondition {
    status?: 'Success' | 'Failed' | 'Processing' | 'Pending';
    reason?: string;
    message?: string;
    type?: string;
    lastTransitionTime?: string;
    lastHeartbeatTime?: string;
}
export interface ModuleInfoAvailableVersion {
    version?: string;
    description?: string;
    riskLevel?: 'Low' | 'Middle' | 'High';
    dependencies?: Array<{
        moduleName: string;
        versionsMatch: string[];
    }>;
    upgradeBefore?: Array<{
        moduleName: string;
    }>;
}
export interface ModuleInfo extends KubernetesResource {
    spec?: {
        version?: string;
        entrypoint?: string;
        selectedCluster?: Array<{
            [key: string]: string;
        }>;
        valuesOverride: StringMap;
        config?: any;
    };
    status?: {
        version: string;
        phase: 'Processing' | 'Running' | 'Failed' | 'Blocked';
        blockReasons?: string[];
        conditions?: ModuleInfoCondition[];
        availableVersions: ModuleInfoAvailableVersion[];
    };
}
