@alauda-fe/network 1.0.5 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/index.mjs +1 -15
- package/esm2022/lib/types/k8s-exports.mjs +24 -2
- package/index.d.ts +0 -14
- package/lib/types/k8s-exports.d.ts +152 -1
- package/package.json +1 -1
- package/styles.css +1 -1
- package/esm2022/lib/components/loadbalancer-spec-form/component.mjs +0 -251
- package/esm2022/lib/components/service-annotations-form/annotations.component.mjs +0 -675
- package/esm2022/lib/components/service-annotations-form-item/annotations.component.mjs +0 -105
- package/esm2022/lib/features/network-policy/components/add-peer-rule-handler/component.mjs +0 -69
- package/esm2022/lib/features/network-policy/components/ip-block-display/component.mjs +0 -54
- package/esm2022/lib/features/network-policy/components/label-selector-display/component.mjs +0 -117
- package/esm2022/lib/features/network-policy/components/peer-container/component.mjs +0 -81
- package/esm2022/lib/features/network-policy/components/pod-review/component.mjs +0 -250
- package/esm2022/lib/features/network-policy/components/rule-table/component.mjs +0 -269
- package/esm2022/lib/features/network-policy/form/network-policy/component.mjs +0 -429
- package/esm2022/lib/features/network-policy/form/network-policy-ip-block/component.mjs +0 -102
- package/esm2022/lib/features/network-policy/form/network-policy-peer/component.mjs +0 -247
- package/esm2022/lib/features/network-policy/form/network-policy-ports/component.mjs +0 -161
- package/esm2022/lib/features/network-policy/form/network-policy-remote-except-input/component.mjs +0 -128
- package/esm2022/lib/features/network-policy/form/network-policy-rule/component.mjs +0 -142
- package/esm2022/lib/services/alb-api.service.mjs +0 -68
- package/esm2022/lib/services/subnet-util.service.mjs +0 -118
- package/esm2022/lib/types/alb-exports.mjs +0 -14
- package/esm2022/lib/types/metallb-exports.mjs +0 -2
- package/esm2022/lib/utils/alb-exports.mjs +0 -108
- package/esm2022/lib/utils/alb-internals.mjs +0 -2
- package/esm2022/lib/utils/common-exports.mjs +0 -22
- package/esm2022/lib/utils/validators-exports.mjs +0 -44
- package/lib/components/loadbalancer-spec-form/component.d.ts +0 -34
- package/lib/components/service-annotations-form/annotations.component.d.ts +0 -74
- package/lib/components/service-annotations-form-item/annotations.component.d.ts +0 -14
- package/lib/features/network-policy/components/add-peer-rule-handler/component.d.ts +0 -8
- package/lib/features/network-policy/components/ip-block-display/component.d.ts +0 -7
- package/lib/features/network-policy/components/label-selector-display/component.d.ts +0 -13
- package/lib/features/network-policy/components/peer-container/component.d.ts +0 -18
- package/lib/features/network-policy/components/pod-review/component.d.ts +0 -37
- package/lib/features/network-policy/components/rule-table/component.d.ts +0 -21
- package/lib/features/network-policy/form/network-policy/component.d.ts +0 -70
- package/lib/features/network-policy/form/network-policy-ip-block/component.d.ts +0 -23
- package/lib/features/network-policy/form/network-policy-peer/component.d.ts +0 -43
- package/lib/features/network-policy/form/network-policy-ports/component.d.ts +0 -17
- package/lib/features/network-policy/form/network-policy-remote-except-input/component.d.ts +0 -23
- package/lib/features/network-policy/form/network-policy-rule/component.d.ts +0 -28
- package/lib/services/alb-api.service.d.ts +0 -18
- package/lib/services/subnet-util.service.d.ts +0 -26
- package/lib/types/alb-exports.d.ts +0 -52
- package/lib/types/metallb-exports.d.ts +0 -65
- package/lib/utils/alb-exports.d.ts +0 -16
- package/lib/utils/alb-internals.d.ts +0 -10
- package/lib/utils/common-exports.d.ts +0 -5
- package/lib/utils/validators-exports.d.ts +0 -16
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Workspace } from '@alauda-fe/common';
|
|
2
|
-
import { BaseResourceFormGroupComponent } from 'ng-resource-form-util';
|
|
3
|
-
import { NetworkPolicyEgressRule, NetworkPolicyIngressRule, NetworkPolicyPort, PolicyType } from '../../../../types/k8s-exports';
|
|
4
|
-
import { NetworkPolicyPeerType } from '../../components/add-peer-rule-handler/component';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
interface NetworkPolicyRuleModel {
|
|
7
|
-
ports: NetworkPolicyPort[];
|
|
8
|
-
to?: NetworkPolicyEgressRule[];
|
|
9
|
-
from?: NetworkPolicyIngressRule[];
|
|
10
|
-
}
|
|
11
|
-
export declare class NetworkPolicyRuleFormComponent extends BaseResourceFormGroupComponent<NetworkPolicyRuleModel> {
|
|
12
|
-
baseParams: Workspace;
|
|
13
|
-
policyType: Lowercase<PolicyType>;
|
|
14
|
-
get direction(): "from" | "to";
|
|
15
|
-
get peerControls(): import("@angular/forms").AbstractControl<any, any>[];
|
|
16
|
-
getDefaultFormModel(): NetworkPolicyRuleModel;
|
|
17
|
-
getOnFormArrayResizeFn(): () => import("@angular/forms").FormControl<{}>;
|
|
18
|
-
createForm(): import("@angular/forms").FormGroup<{
|
|
19
|
-
[x: string]: import("@angular/forms").AbstractControl<any[] | import("@angular/forms").FormControlState<any[]>, any[] | import("@angular/forms").FormControlState<any[]>>;
|
|
20
|
-
ports: import("@angular/forms").FormControl<any[]>;
|
|
21
|
-
}>;
|
|
22
|
-
addPeer(type: NetworkPolicyPeerType): void;
|
|
23
|
-
private getPeerControl;
|
|
24
|
-
deletePeer(index: number): void;
|
|
25
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NetworkPolicyRuleFormComponent, never>;
|
|
26
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NetworkPolicyRuleFormComponent, "acl-network-policy-rule-form", never, { "baseParams": { "alias": "baseParams"; "required": true; }; "policyType": { "alias": "policyType"; "required": true; }; }, {}, never, never, true, never>;
|
|
27
|
-
}
|
|
28
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { HelmRequest, K8sApiService, K8sSharedUtilService, KubernetesResourceList } from '@alauda-fe/common';
|
|
2
|
-
import { HttpClient } from '@angular/common/http';
|
|
3
|
-
import { ALB2, LoadBalancer } from '../types/k8s-exports';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class AlbApiService {
|
|
6
|
-
private readonly http;
|
|
7
|
-
private readonly k8sUtil;
|
|
8
|
-
private readonly k8sApi;
|
|
9
|
-
constructor(http: HttpClient, k8sUtil: K8sSharedUtilService, k8sApi: K8sApiService);
|
|
10
|
-
getAlbListByProject({ project, cluster }: {
|
|
11
|
-
project: string;
|
|
12
|
-
cluster: string;
|
|
13
|
-
}, queryParams?: Record<string, string>): import("rxjs").Observable<KubernetesResourceList<LoadBalancer>>;
|
|
14
|
-
v1ToV2Beta1(alb: LoadBalancer, hr?: HelmRequest): ALB2;
|
|
15
|
-
getExceptPortRange(cluster: string): import("rxjs").Observable<string>;
|
|
16
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AlbApiService, never>;
|
|
17
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AlbApiService>;
|
|
18
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { DialogService } from '@alauda/ui';
|
|
2
|
-
import { K8sApiService, K8sUtilService, TranslateService, AuthApiService } from '@alauda-fe/common';
|
|
3
|
-
import { HttpClient } from '@angular/common/http';
|
|
4
|
-
import { InterConnectionSubnet, Subnet } from '../types/k8s-exports';
|
|
5
|
-
import { NetworkMode } from '../utils/cidr-exports';
|
|
6
|
-
import { ConflictCidrType } from '../utils/subnet-exports';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
export declare class SubnetUtilService {
|
|
9
|
-
private readonly httpClient;
|
|
10
|
-
private readonly dialog;
|
|
11
|
-
private readonly translate;
|
|
12
|
-
private readonly k8sUtil;
|
|
13
|
-
private readonly k8sApi;
|
|
14
|
-
private readonly authApi;
|
|
15
|
-
constructor(httpClient: HttpClient, dialog: DialogService, translate: TranslateService, k8sUtil: K8sUtilService, k8sApi: K8sApiService, authApi: AuthApiService);
|
|
16
|
-
getClusterNodeIp$(cluster: string): import("rxjs").Observable<string[]>;
|
|
17
|
-
getTkeClusterCidr$(cluster: string): import("rxjs").Observable<string>;
|
|
18
|
-
getInterSubnets$(cluster: string): import("rxjs").Observable<InterConnectionSubnet[]>;
|
|
19
|
-
delete(subnet: Subnet, cluster: string): import("rxjs").Observable<import("@alauda-fe/common").Status>;
|
|
20
|
-
getUsedCidrBlock(subnets: Subnet[], nodeIps: string[], clusterCidr: string, networkMode: NetworkMode, interSubnets: InterConnectionSubnet[]): {
|
|
21
|
-
cidr: string;
|
|
22
|
-
type: ConflictCidrType;
|
|
23
|
-
}[];
|
|
24
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SubnetUtilService, never>;
|
|
25
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<SubnetUtilService>;
|
|
26
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { AlbProtocol, KubernetesResource, ServiceGroup } from '@alauda-fe/common';
|
|
2
|
-
import { ResourceLimit } from '../utils/alb-internals';
|
|
3
|
-
export declare enum AlbResourceType {
|
|
4
|
-
ALB = "ALB2",
|
|
5
|
-
FRONTEND = "Frontend",
|
|
6
|
-
RULE = "Rule"
|
|
7
|
-
}
|
|
8
|
-
export interface PortRangeItem {
|
|
9
|
-
port: string;
|
|
10
|
-
projects: string[];
|
|
11
|
-
usedPorts?: number[];
|
|
12
|
-
}
|
|
13
|
-
export interface PlainResourceLimit {
|
|
14
|
-
cpu?: string;
|
|
15
|
-
memory?: string;
|
|
16
|
-
}
|
|
17
|
-
export interface AlbResources {
|
|
18
|
-
limits?: PlainResourceLimit;
|
|
19
|
-
requests?: PlainResourceLimit;
|
|
20
|
-
}
|
|
21
|
-
export declare enum SpecModel {
|
|
22
|
-
SMALL = "small",
|
|
23
|
-
MEDIUM = "medium",
|
|
24
|
-
LARGE = "large",
|
|
25
|
-
CUSTOMIZE = "customize"
|
|
26
|
-
}
|
|
27
|
-
export interface AlbResourceLimitModel {
|
|
28
|
-
specModel: SpecModel;
|
|
29
|
-
resourceLimit: ResourceLimit;
|
|
30
|
-
}
|
|
31
|
-
export interface FrontendSpec {
|
|
32
|
-
port?: number | '';
|
|
33
|
-
protocol?: AlbProtocol;
|
|
34
|
-
source?: {
|
|
35
|
-
name: string;
|
|
36
|
-
namespace: string;
|
|
37
|
-
type: string;
|
|
38
|
-
};
|
|
39
|
-
backendProtocol?: 'HTTP' | 'HTTPS' | 'gRPC';
|
|
40
|
-
serviceGroup?: ServiceGroup;
|
|
41
|
-
certificate_name?: string;
|
|
42
|
-
}
|
|
43
|
-
export interface FrontendStatus {
|
|
44
|
-
instances: Record<string, {
|
|
45
|
-
conflict: boolean;
|
|
46
|
-
probe_time: string;
|
|
47
|
-
}>;
|
|
48
|
-
}
|
|
49
|
-
export interface Frontend extends KubernetesResource {
|
|
50
|
-
spec?: FrontendSpec;
|
|
51
|
-
status?: FrontendStatus;
|
|
52
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { KubernetesResource, LabelSelector } from '@alauda-fe/common';
|
|
2
|
-
export interface BGPPeerSpec {
|
|
3
|
-
myASN: number;
|
|
4
|
-
peerASN: number;
|
|
5
|
-
peerAddress: string;
|
|
6
|
-
bfdProfile?: string;
|
|
7
|
-
ebgpMultiHop?: boolean;
|
|
8
|
-
holdTime?: string;
|
|
9
|
-
keepaliveTime?: string;
|
|
10
|
-
nodeSelectors?: LabelSelector[];
|
|
11
|
-
password?: string;
|
|
12
|
-
peerPort?: number;
|
|
13
|
-
routerID?: string;
|
|
14
|
-
sourceAddress?: string;
|
|
15
|
-
}
|
|
16
|
-
export interface BGPPeer extends KubernetesResource {
|
|
17
|
-
kind: 'BGPPeer';
|
|
18
|
-
spec: BGPPeerSpec;
|
|
19
|
-
}
|
|
20
|
-
export interface BGPAdvertisement extends KubernetesResource {
|
|
21
|
-
kind: 'BGPAdvertisement';
|
|
22
|
-
spec: {
|
|
23
|
-
aggregationLength?: number;
|
|
24
|
-
aggregationLengthV6?: number;
|
|
25
|
-
communities?: string[];
|
|
26
|
-
ipAddressPoolSelectors?: LabelSelector;
|
|
27
|
-
ipAddressPools?: string[];
|
|
28
|
-
localPref?: number;
|
|
29
|
-
nodeSelectors?: LabelSelector[];
|
|
30
|
-
peers: string[];
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
export interface IPAddressPool extends KubernetesResource {
|
|
34
|
-
kind: 'IPAddressPool';
|
|
35
|
-
spec: {
|
|
36
|
-
addresses: string[];
|
|
37
|
-
autoAssign?: boolean;
|
|
38
|
-
avoidBuggyIPs?: boolean;
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
export interface L2Advertisement extends KubernetesResource {
|
|
42
|
-
kind: 'L2Advertisement';
|
|
43
|
-
spec: {
|
|
44
|
-
ipAddressPools: [string];
|
|
45
|
-
nodeSelectors: LabelSelector[];
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
export interface IpPoolUsedIp {
|
|
49
|
-
ip: string;
|
|
50
|
-
nodeIp: string;
|
|
51
|
-
services: string[];
|
|
52
|
-
}
|
|
53
|
-
export interface IpPoolUsage extends KubernetesResource {
|
|
54
|
-
apiVersion: 'metallb.io/v1beta1';
|
|
55
|
-
kind: 'IPAddressPoolUsage';
|
|
56
|
-
status: {
|
|
57
|
-
used: number;
|
|
58
|
-
available: number;
|
|
59
|
-
usedIps: IpPoolUsedIp[];
|
|
60
|
-
ipv4available: number;
|
|
61
|
-
ipv4used: number;
|
|
62
|
-
ipv6used: number;
|
|
63
|
-
ipv6available: number;
|
|
64
|
-
};
|
|
65
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { LooseValueOf } from '@alauda-fe/common';
|
|
2
|
-
import { PlainResourceLimit, SpecModel, AlbResourceLimitModel } from '../types/alb-exports';
|
|
3
|
-
import { ALB2 } from '../types/k8s-exports';
|
|
4
|
-
import { ResourceLimit } from './alb-internals';
|
|
5
|
-
export declare const formatResourceLimit: ({ value, unit, }: LooseValueOf<ResourceLimit>) => string;
|
|
6
|
-
export declare const parseResourceLimit: (plainResourceLimit?: PlainResourceLimit) => {
|
|
7
|
-
specModel: SpecModel;
|
|
8
|
-
resourceLimit: PlainResourceLimit;
|
|
9
|
-
};
|
|
10
|
-
export declare const RESOURCE_LIMIT_MAPPER: Partial<Record<SpecModel, ResourceLimit>>;
|
|
11
|
-
export declare function getResourceLimit(resource: ALB2): AlbResourceLimitModel;
|
|
12
|
-
export declare const METALLB = "metallb";
|
|
13
|
-
export declare const METALLB_NS: "metallb-system";
|
|
14
|
-
export declare function parseAddresses(alb2: ALB2): string[];
|
|
15
|
-
export declare function getAddressPriority(address: string): 0 | 1 | 2;
|
|
16
|
-
export declare function sortAddressesByPriority(addresses: string[]): string[];
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { TranslateService } from '@alauda-fe/common';
|
|
2
|
-
import { AbstractControl, ValidationErrors } from '@angular/forms';
|
|
3
|
-
export declare const getHostPrefixErrorMapper: (translate: TranslateService) => {
|
|
4
|
-
hostPrefixExtensivePosition: string;
|
|
5
|
-
hostPrefixPattern: string;
|
|
6
|
-
maxlength: string;
|
|
7
|
-
hostPrefixIncludeDotError: string;
|
|
8
|
-
};
|
|
9
|
-
export declare const getHostPrefixErrorMapper$: (translate: TranslateService) => import("rxjs").Observable<{
|
|
10
|
-
hostPrefixExtensivePosition: string;
|
|
11
|
-
hostPrefixPattern: string;
|
|
12
|
-
maxlength: string;
|
|
13
|
-
hostPrefixIncludeDotError: string;
|
|
14
|
-
}>;
|
|
15
|
-
export declare const hostPrefixValidator: (hostPrefixCtrl: AbstractControl) => ValidationErrors;
|
|
16
|
-
export declare const getHostPrefixCompleteValidators: (domainLength: number) => import("@angular/forms").ValidatorFn[];
|