@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.
Files changed (52) hide show
  1. package/esm2022/index.mjs +1 -15
  2. package/esm2022/lib/types/k8s-exports.mjs +24 -2
  3. package/index.d.ts +0 -14
  4. package/lib/types/k8s-exports.d.ts +152 -1
  5. package/package.json +1 -1
  6. package/styles.css +1 -1
  7. package/esm2022/lib/components/loadbalancer-spec-form/component.mjs +0 -251
  8. package/esm2022/lib/components/service-annotations-form/annotations.component.mjs +0 -675
  9. package/esm2022/lib/components/service-annotations-form-item/annotations.component.mjs +0 -105
  10. package/esm2022/lib/features/network-policy/components/add-peer-rule-handler/component.mjs +0 -69
  11. package/esm2022/lib/features/network-policy/components/ip-block-display/component.mjs +0 -54
  12. package/esm2022/lib/features/network-policy/components/label-selector-display/component.mjs +0 -117
  13. package/esm2022/lib/features/network-policy/components/peer-container/component.mjs +0 -81
  14. package/esm2022/lib/features/network-policy/components/pod-review/component.mjs +0 -250
  15. package/esm2022/lib/features/network-policy/components/rule-table/component.mjs +0 -269
  16. package/esm2022/lib/features/network-policy/form/network-policy/component.mjs +0 -429
  17. package/esm2022/lib/features/network-policy/form/network-policy-ip-block/component.mjs +0 -102
  18. package/esm2022/lib/features/network-policy/form/network-policy-peer/component.mjs +0 -247
  19. package/esm2022/lib/features/network-policy/form/network-policy-ports/component.mjs +0 -161
  20. package/esm2022/lib/features/network-policy/form/network-policy-remote-except-input/component.mjs +0 -128
  21. package/esm2022/lib/features/network-policy/form/network-policy-rule/component.mjs +0 -142
  22. package/esm2022/lib/services/alb-api.service.mjs +0 -68
  23. package/esm2022/lib/services/subnet-util.service.mjs +0 -118
  24. package/esm2022/lib/types/alb-exports.mjs +0 -14
  25. package/esm2022/lib/types/metallb-exports.mjs +0 -2
  26. package/esm2022/lib/utils/alb-exports.mjs +0 -108
  27. package/esm2022/lib/utils/alb-internals.mjs +0 -2
  28. package/esm2022/lib/utils/common-exports.mjs +0 -22
  29. package/esm2022/lib/utils/validators-exports.mjs +0 -44
  30. package/lib/components/loadbalancer-spec-form/component.d.ts +0 -34
  31. package/lib/components/service-annotations-form/annotations.component.d.ts +0 -74
  32. package/lib/components/service-annotations-form-item/annotations.component.d.ts +0 -14
  33. package/lib/features/network-policy/components/add-peer-rule-handler/component.d.ts +0 -8
  34. package/lib/features/network-policy/components/ip-block-display/component.d.ts +0 -7
  35. package/lib/features/network-policy/components/label-selector-display/component.d.ts +0 -13
  36. package/lib/features/network-policy/components/peer-container/component.d.ts +0 -18
  37. package/lib/features/network-policy/components/pod-review/component.d.ts +0 -37
  38. package/lib/features/network-policy/components/rule-table/component.d.ts +0 -21
  39. package/lib/features/network-policy/form/network-policy/component.d.ts +0 -70
  40. package/lib/features/network-policy/form/network-policy-ip-block/component.d.ts +0 -23
  41. package/lib/features/network-policy/form/network-policy-peer/component.d.ts +0 -43
  42. package/lib/features/network-policy/form/network-policy-ports/component.d.ts +0 -17
  43. package/lib/features/network-policy/form/network-policy-remote-except-input/component.d.ts +0 -23
  44. package/lib/features/network-policy/form/network-policy-rule/component.d.ts +0 -28
  45. package/lib/services/alb-api.service.d.ts +0 -18
  46. package/lib/services/subnet-util.service.d.ts +0 -26
  47. package/lib/types/alb-exports.d.ts +0 -52
  48. package/lib/types/metallb-exports.d.ts +0 -65
  49. package/lib/utils/alb-exports.d.ts +0 -16
  50. package/lib/utils/alb-internals.d.ts +0 -10
  51. package/lib/utils/common-exports.d.ts +0 -5
  52. 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,10 +0,0 @@
1
- export interface ResourceLimit {
2
- cpu: {
3
- value: number;
4
- unit: 'core' | 'm';
5
- };
6
- memory: {
7
- value: number;
8
- unit: 'Gi' | 'Mi';
9
- };
10
- }
@@ -1,5 +0,0 @@
1
- import { Domain } from '../types/k8s-exports';
2
- export declare function getMatchedDomain(domains: Domain[], domain: string): {
3
- subDomain: string;
4
- domain: string;
5
- };
@@ -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[];