@alauda-fe/network 1.0.1 → 1.0.3
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 +10 -2
- package/esm2022/lib/components/certificate-status/component.mjs +7 -6
- package/esm2022/lib/components/fixed-ip/component.mjs +135 -91
- package/esm2022/lib/components/loadbalancer-spec-form/component.mjs +57 -57
- package/esm2022/lib/components/service-annotations-form/annotations.component.mjs +136 -142
- package/esm2022/lib/components/service-annotations-form-item/annotations.component.mjs +24 -25
- package/esm2022/lib/components/service-form/component.mjs +34 -33
- package/esm2022/lib/components/service-form/fieldset/component.mjs +92 -95
- package/esm2022/lib/directives/subnet-validator.directive.mjs +5 -5
- package/esm2022/lib/features/network-policy/components/add-peer-rule-handler/component.mjs +69 -0
- package/esm2022/lib/features/network-policy/components/ip-block-display/component.mjs +54 -0
- package/esm2022/lib/features/network-policy/components/label-selector-display/component.mjs +117 -0
- package/esm2022/lib/features/network-policy/components/peer-container/component.mjs +81 -0
- package/esm2022/lib/features/network-policy/components/pod-review/component.mjs +250 -0
- package/esm2022/lib/features/network-policy/components/rule-table/component.mjs +269 -0
- package/esm2022/lib/features/network-policy/form/network-policy/component.mjs +429 -0
- package/esm2022/lib/features/network-policy/form/network-policy-ip-block/component.mjs +102 -0
- package/esm2022/lib/features/network-policy/form/network-policy-peer/component.mjs +247 -0
- package/esm2022/lib/features/network-policy/form/network-policy-ports/component.mjs +161 -0
- package/esm2022/lib/features/network-policy/form/network-policy-remote-except-input/component.mjs +128 -0
- package/esm2022/lib/features/network-policy/form/network-policy-rule/component.mjs +142 -0
- package/esm2022/lib/services/alb-api.service.mjs +26 -6
- package/esm2022/lib/services/certificate-api.service.mjs +4 -4
- package/esm2022/lib/services/network-util.service.mjs +22 -13
- package/esm2022/lib/services/subnet-util.service.mjs +118 -0
- package/esm2022/lib/types/alb-exports.mjs +1 -1
- package/esm2022/lib/types/k8s-exports.mjs +2 -1
- package/esm2022/lib/types/metallb-exports.mjs +2 -0
- package/esm2022/lib/types/resource-definition.mjs +28 -2
- package/esm2022/lib/utils/alb-exports.mjs +1 -1
- package/esm2022/lib/utils/cidr-exports.mjs +3 -3
- package/esm2022/lib/utils/common-exports.mjs +22 -0
- package/esm2022/lib/utils/service-exports.mjs +1 -1
- package/esm2022/lib/utils/validators-exports.mjs +44 -0
- package/index.d.ts +9 -1
- package/lib/components/fixed-ip/component.d.ts +10 -3
- package/lib/components/service-annotations-form/annotations.component.d.ts +6 -6
- package/lib/components/service-annotations-form-item/annotations.component.d.ts +1 -1
- package/lib/components/service-form/component.d.ts +1 -1
- package/lib/features/network-policy/components/add-peer-rule-handler/component.d.ts +8 -0
- package/lib/features/network-policy/components/ip-block-display/component.d.ts +7 -0
- package/lib/features/network-policy/components/label-selector-display/component.d.ts +13 -0
- package/lib/features/network-policy/components/peer-container/component.d.ts +18 -0
- package/lib/features/network-policy/components/pod-review/component.d.ts +37 -0
- package/lib/features/network-policy/components/rule-table/component.d.ts +21 -0
- package/lib/features/network-policy/form/network-policy/component.d.ts +70 -0
- package/lib/features/network-policy/form/network-policy-ip-block/component.d.ts +23 -0
- package/lib/features/network-policy/form/network-policy-peer/component.d.ts +43 -0
- package/lib/features/network-policy/form/network-policy-ports/component.d.ts +17 -0
- package/lib/features/network-policy/form/network-policy-remote-except-input/component.d.ts +23 -0
- package/lib/features/network-policy/form/network-policy-rule/component.d.ts +28 -0
- package/lib/services/alb-api.service.d.ts +4 -2
- package/lib/services/network-util.service.d.ts +4 -2
- package/lib/services/subnet-util.service.d.ts +26 -0
- package/lib/types/alb-exports.d.ts +23 -0
- package/lib/types/k8s-exports.d.ts +51 -1
- package/lib/types/metallb-exports.d.ts +65 -0
- package/lib/types/resource-definition.d.ts +154 -0
- package/lib/utils/common-exports.d.ts +5 -0
- package/lib/utils/validators-exports.d.ts +16 -0
- package/package.json +9 -4
- package/styles.css +1 -0
package/index.d.ts
CHANGED
|
@@ -5,14 +5,22 @@ export { ServiceAnnotationsFormComponent } from './lib/components/service-annota
|
|
|
5
5
|
export { ServiceAnnotationsFormItemComponent } from './lib/components/service-annotations-form-item/annotations.component';
|
|
6
6
|
export { K8sServiceFormComponent } from './lib/components/service-form/component';
|
|
7
7
|
export * from './lib/directives/subnet-validator.directive';
|
|
8
|
+
export { LabelSelectorDisplayComponent } from './lib/features/network-policy/components/label-selector-display/component';
|
|
9
|
+
export { NetworkPolicyRuleTableComponent } from './lib/features/network-policy/components/rule-table/component';
|
|
10
|
+
export { NetworkPolicyFormComponent } from './lib/features/network-policy/form/network-policy/component';
|
|
11
|
+
export { NetworkPolicyExceptRemoteInputFormComponent } from './lib/features/network-policy/form/network-policy-remote-except-input/component';
|
|
8
12
|
export * from './lib/services/alb-api.service';
|
|
9
13
|
export * from './lib/services/certificate-api.service';
|
|
10
14
|
export * from './lib/services/network-util.service';
|
|
15
|
+
export * from './lib/services/subnet-util.service';
|
|
11
16
|
export * from './lib/types/alb-exports';
|
|
12
17
|
export * from './lib/types/k8s-exports';
|
|
13
|
-
export * from './lib/types/
|
|
18
|
+
export * from './lib/types/metallb-exports';
|
|
19
|
+
export { KUBE_OVN_GROUP, NETWORK_RESOURCE_DEFINITIONS, NETWORK_RESOURCE_TYPES, NetworkResourceDefinitions, } from './lib/types/resource-definition';
|
|
14
20
|
export * from './lib/utils/alb-exports';
|
|
15
21
|
export * from './lib/utils/cidr-exports';
|
|
16
22
|
export * from './lib/utils/cluster-exports';
|
|
23
|
+
export * from './lib/utils/common-exports';
|
|
17
24
|
export * from './lib/utils/service-exports';
|
|
18
25
|
export * from './lib/utils/subnet-exports';
|
|
26
|
+
export * from './lib/utils/validators-exports';
|
|
@@ -36,15 +36,21 @@ export declare class FixedIpInputComponent extends CommonFormControl<string | st
|
|
|
36
36
|
errors$: Observable<ValidationErrors>;
|
|
37
37
|
errorsMapper: StringMap;
|
|
38
38
|
errorsMapper$: Observable<StringMap>;
|
|
39
|
-
uniq: <T>(array: import("lodash").List<T>) => T[];
|
|
39
|
+
uniq: <T>(array: import("lodash").List<T> | null | undefined) => T[];
|
|
40
40
|
onValidatorChange: () => void;
|
|
41
41
|
get isCalico(): boolean;
|
|
42
42
|
private readonly namespaceResource$;
|
|
43
43
|
private readonly networkMode$;
|
|
44
|
-
|
|
44
|
+
readonly $networkMode: import("@angular/core").Signal<"v4" | "v6" | "dual">;
|
|
45
45
|
private readonly subnetDetails$;
|
|
46
46
|
private readonly subnetInfo$;
|
|
47
|
-
|
|
47
|
+
readonly $subnetInfo: import("@angular/core").Signal<{
|
|
48
|
+
cluster: string;
|
|
49
|
+
subnetCidrs: string[];
|
|
50
|
+
subnetName: string;
|
|
51
|
+
gateway: string;
|
|
52
|
+
excludeIps: string[];
|
|
53
|
+
}>;
|
|
48
54
|
cidr$: Observable<string>;
|
|
49
55
|
private readonly innerErrorsMapper$;
|
|
50
56
|
combinedErrorsMapper$: Observable<{
|
|
@@ -57,6 +63,7 @@ export declare class FixedIpInputComponent extends CommonFormControl<string | st
|
|
|
57
63
|
private readonly $usedIps;
|
|
58
64
|
ipAddressSuggestions$: Observable<string[]>;
|
|
59
65
|
constructor(cdr: ChangeDetectorRef, k8sUtil: K8sUtilService, k8sApi: K8sApiService, networkUtilService: NetworkUtilService, translate: TranslateService);
|
|
66
|
+
isReservedIp(ip: string, excludeIps: string[]): boolean;
|
|
60
67
|
registerOnValidatorChange(fn: () => void): void;
|
|
61
68
|
validate(ctrl: AbstractControl): Observable<ValidationErrors>;
|
|
62
69
|
private setErrors;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseStringMapFormComponent, KeyValueTuple,
|
|
1
|
+
import { BaseStringMapFormComponent, KeyValueTuple, StringMap, TranslateKey } from '@alauda-fe/common';
|
|
2
2
|
import { Injector } from '@angular/core';
|
|
3
3
|
import { FormArray, FormControl } from '@angular/forms';
|
|
4
4
|
import { ClusterType } from '../../utils/cluster-exports';
|
|
@@ -13,22 +13,22 @@ declare enum PRODUCT_BASE_HREF_MAP {
|
|
|
13
13
|
}
|
|
14
14
|
export interface AnnotationConfigOption {
|
|
15
15
|
key: string;
|
|
16
|
-
tip: TranslateKey
|
|
16
|
+
tip: TranslateKey;
|
|
17
17
|
doc?: {
|
|
18
|
-
tip: TranslateKey
|
|
19
|
-
tipPrefix?: TranslateKey
|
|
18
|
+
tip: TranslateKey;
|
|
19
|
+
tipPrefix?: TranslateKey;
|
|
20
20
|
path?: string;
|
|
21
21
|
rawUrl?: string;
|
|
22
22
|
product?: keyof typeof PRODUCT_BASE_HREF_MAP;
|
|
23
23
|
};
|
|
24
24
|
value?: {
|
|
25
25
|
example: string;
|
|
26
|
-
tip: TranslateKey
|
|
26
|
+
tip: TranslateKey;
|
|
27
27
|
docLink: string;
|
|
28
28
|
};
|
|
29
29
|
values?: Array<{
|
|
30
30
|
value: string;
|
|
31
|
-
tip?: TranslateKey
|
|
31
|
+
tip?: TranslateKey;
|
|
32
32
|
}>;
|
|
33
33
|
}
|
|
34
34
|
export declare const KNOWN_ANNOTATIONS: Partial<Record<ClusterType, {
|
|
@@ -6,7 +6,7 @@ export declare class ServiceAnnotationsFormItemComponent extends BaseResourceFor
|
|
|
6
6
|
isUpdate: boolean;
|
|
7
7
|
clusterType: ClusterType;
|
|
8
8
|
inService: boolean;
|
|
9
|
-
get resourceName(): "annotation" | "service_annotations";
|
|
9
|
+
get resourceName(): "annotation" | "network.service_annotations";
|
|
10
10
|
isPublicCloud: (clusterType?: string) => boolean;
|
|
11
11
|
createForm(): import("@angular/forms").FormControl<{}>;
|
|
12
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<ServiceAnnotationsFormItemComponent, never>;
|
|
@@ -27,7 +27,7 @@ export declare class K8sServiceFormComponent extends BaseResourceFormGroupCompon
|
|
|
27
27
|
};
|
|
28
28
|
displayNameKey: string;
|
|
29
29
|
isLbEnabled$: Observable<boolean>;
|
|
30
|
-
types$: Observable<readonly ["ClusterIP", "NodePort", "LoadBalancer", "ExternalName"] | ("ClusterIP" | "NodePort" | "
|
|
30
|
+
types$: Observable<readonly ["ClusterIP", "NodePort", "LoadBalancer", "ExternalName"] | ("ClusterIP" | "NodePort" | "ExternalName")[]>;
|
|
31
31
|
constructor(injector: Injector, k8sUtil: K8sUtilService, featureGate: FeatureGateService);
|
|
32
32
|
ngAfterViewInit(): void;
|
|
33
33
|
getDefaultFormModel(): ServiceFormModel;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export type NetworkPolicyPeerType = 'ipBlock' | 'namespaceLevel' | 'clusterLevel';
|
|
4
|
+
export declare class PeerRuleHandlerComponent {
|
|
5
|
+
peerTypeChange: EventEmitter<NetworkPolicyPeerType>;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PeerRuleHandlerComponent, never>;
|
|
7
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PeerRuleHandlerComponent, "acl-peer-rule-handler", never, {}, { "peerTypeChange": "peerTypeChange"; }, never, never, true, never>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IPBlock } from '../../../../types/k8s-exports';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class IPBlockDisplayComponent {
|
|
4
|
+
ipBlock: IPBlock;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IPBlockDisplayComponent, never>;
|
|
6
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<IPBlockDisplayComponent, "acl-ip-block-display", never, { "ipBlock": { "alias": "ipBlock"; "required": true; }; }, {}, never, never, true, never>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { LabelSelector, matchExpressionsToString, StringMap } from '@alauda-fe/common';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare const matchLabelsToString: (params?: StringMap) => string;
|
|
4
|
+
export declare class LabelSelectorDisplayComponent {
|
|
5
|
+
type: 'podSelector' | 'namespaceSelector';
|
|
6
|
+
selector: LabelSelector;
|
|
7
|
+
showTitle: boolean;
|
|
8
|
+
emptyPlaceholder: string;
|
|
9
|
+
matchExpressionsToString: typeof matchExpressionsToString;
|
|
10
|
+
matchLabelsToString: (params?: StringMap) => string;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LabelSelectorDisplayComponent, never>;
|
|
12
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LabelSelectorDisplayComponent, "acl-label-selector-display", never, { "type": { "alias": "type"; "required": true; }; "selector": { "alias": "selector"; "required": true; }; "showTitle": { "alias": "showTitle"; "required": false; }; "emptyPlaceholder": { "alias": "emptyPlaceholder"; "required": false; }; }, {}, never, never, true, never>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { EventEmitter, TemplateRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class PeerTitleDirective {
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PeerTitleDirective, never>;
|
|
5
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<PeerTitleDirective, "[alkPeerTitle]", never, {}, {}, never, never, true, never>;
|
|
6
|
+
}
|
|
7
|
+
export declare class PeerFooterDirective {
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PeerFooterDirective, never>;
|
|
9
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<PeerFooterDirective, "[alkPeerFooter]", never, {}, {}, never, never, true, never>;
|
|
10
|
+
}
|
|
11
|
+
export declare class NetworkPolicyPeerContainerComponent {
|
|
12
|
+
peerTitleTemplate: TemplateRef<any>;
|
|
13
|
+
peerFooterTemplate: TemplateRef<any>;
|
|
14
|
+
deleteRule: EventEmitter<void>;
|
|
15
|
+
get hasPeerFooter(): boolean;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NetworkPolicyPeerContainerComponent, never>;
|
|
17
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NetworkPolicyPeerContainerComponent, "acl-network-policy-peer-container", never, {}, { "deleteRule": "deleteRule"; }, ["peerTitleTemplate", "peerFooterTemplate"], ["[alkPeerTitle]", "*", "[alkPeerFooter]"], true, never>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { K8sApiService, K8sUtilService, Pod, StringMap, WorkspaceParams } from '@alauda-fe/common';
|
|
2
|
+
import { HttpClient } from '@angular/common/http';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
type PodMap = Record<string, Pod[]>;
|
|
6
|
+
export declare class PodPreviewComponent {
|
|
7
|
+
private readonly k8sApi;
|
|
8
|
+
private readonly k8sUtil;
|
|
9
|
+
private readonly http;
|
|
10
|
+
hint: string;
|
|
11
|
+
podLabelSelector: StringMap;
|
|
12
|
+
namespaceLabelSelector: StringMap;
|
|
13
|
+
baseParams: WorkspaceParams;
|
|
14
|
+
baseParams$: Observable<WorkspaceParams>;
|
|
15
|
+
podMapExpandState: Record<string, boolean>;
|
|
16
|
+
isEmpty: {
|
|
17
|
+
<T extends {
|
|
18
|
+
__trapAny: any;
|
|
19
|
+
}>(value?: T): boolean;
|
|
20
|
+
(value: string): value is "";
|
|
21
|
+
(value: Map<any, any> | Set<any> | import("lodash").List<any> | null | undefined): boolean;
|
|
22
|
+
(value: object): boolean;
|
|
23
|
+
<T extends object>(value: T | null | undefined): value is import("lodash").EmptyObjectOf<T> | null | undefined;
|
|
24
|
+
(value?: any): boolean;
|
|
25
|
+
};
|
|
26
|
+
private readonly projects$;
|
|
27
|
+
private readonly namespaces$;
|
|
28
|
+
private readonly pods$;
|
|
29
|
+
podMap$: Observable<PodMap>;
|
|
30
|
+
constructor(k8sApi: K8sApiService, k8sUtil: K8sUtilService, http: HttpClient);
|
|
31
|
+
private getPods;
|
|
32
|
+
private getClusterNamespaces;
|
|
33
|
+
private getClusterProjects;
|
|
34
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PodPreviewComponent, never>;
|
|
35
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PodPreviewComponent, "acl-pod-preview", never, { "hint": { "alias": "hint"; "required": true; }; "podLabelSelector": { "alias": "podLabelSelector"; "required": false; }; "namespaceLabelSelector": { "alias": "namespaceLabelSelector"; "required": false; }; "baseParams": { "alias": "baseParams"; "required": true; }; }, {}, never, never, true, never>;
|
|
36
|
+
}
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { LabelSelector } from '@alauda-fe/common';
|
|
2
|
+
import { IPBlock, NetworkPolicyPort, PolicyType } from '../../../../types/k8s-exports';
|
|
3
|
+
import { NetworkPolicyPeerType } from '../add-peer-rule-handler/component';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "../../../../types/k8s-exports";
|
|
6
|
+
interface RuleListModel {
|
|
7
|
+
peerType?: NetworkPolicyPeerType;
|
|
8
|
+
namespaceSelector?: LabelSelector;
|
|
9
|
+
podSelector?: LabelSelector;
|
|
10
|
+
ipBlock?: IPBlock;
|
|
11
|
+
ports?: NetworkPolicyPort[];
|
|
12
|
+
}
|
|
13
|
+
export declare class NetworkPolicyRuleTableComponent {
|
|
14
|
+
rules: RuleListModel[];
|
|
15
|
+
policyType: Lowercase<PolicyType>;
|
|
16
|
+
COLUMNS: string[];
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NetworkPolicyRuleTableComponent, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NetworkPolicyRuleTableComponent, "acl-network-policy-rule-table", never, { "rules": { "alias": "rules"; "required": true; }; "policyType": { "alias": "policyType"; "required": true; }; }, {}, never, never, true, never>;
|
|
19
|
+
static ngAcceptInputType_rules: i1.NetworkPolicyIngressRule[] | i1.NetworkPolicyEgressRule[];
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { DialogService } from '@alauda/ui';
|
|
2
|
+
import { K8sUtilService, TranslateService, Workspace } from '@alauda-fe/common';
|
|
3
|
+
import { Injector } from '@angular/core';
|
|
4
|
+
import { FormArray } from '@angular/forms';
|
|
5
|
+
import { BaseResourceFormGroupComponent } from 'ng-resource-form-util';
|
|
6
|
+
import { NetworkPolicy, PolicyType } from '../../../../types/k8s-exports';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class NetworkPolicyFormComponent extends BaseResourceFormGroupComponent<NetworkPolicy> {
|
|
9
|
+
private readonly k8sUtil;
|
|
10
|
+
private readonly translate;
|
|
11
|
+
private readonly dialog;
|
|
12
|
+
baseParams: Workspace;
|
|
13
|
+
isUpdate: boolean;
|
|
14
|
+
get ingressRuleFormArray(): FormArray;
|
|
15
|
+
get ingressRuleControls(): import("@angular/forms").AbstractControl<any, any>[];
|
|
16
|
+
get egressRuleFormArray(): FormArray;
|
|
17
|
+
get egressRuleControls(): import("@angular/forms").AbstractControl<any, any>[];
|
|
18
|
+
K8S_RESOURCE_NAME_START_WITH_CHARS_ONLY: {
|
|
19
|
+
pattern: RegExp;
|
|
20
|
+
tip: string;
|
|
21
|
+
};
|
|
22
|
+
labelValidator: {
|
|
23
|
+
key: typeof import("@alauda-fe/common").k8sResourceLabelKeyValidator;
|
|
24
|
+
value: import("@angular/forms").ValidatorFn;
|
|
25
|
+
};
|
|
26
|
+
labelErrorMapper$: import("rxjs").Observable<{
|
|
27
|
+
key: {
|
|
28
|
+
namePattern: string;
|
|
29
|
+
prefixPattern: string;
|
|
30
|
+
nameTooLong: string;
|
|
31
|
+
prefixTooLong: string;
|
|
32
|
+
};
|
|
33
|
+
value: {
|
|
34
|
+
pattern: string;
|
|
35
|
+
maxlength: string;
|
|
36
|
+
};
|
|
37
|
+
}>;
|
|
38
|
+
PolicyTypes: readonly ["ingress", "egress"];
|
|
39
|
+
displayNameKey: string;
|
|
40
|
+
ruleDisabledStateMap: Record<'ingress' | 'egress', boolean>;
|
|
41
|
+
constructor(injector: Injector, k8sUtil: K8sUtilService, translate: TranslateService, dialog: DialogService);
|
|
42
|
+
createForm(): import("@angular/forms").FormGroup<{
|
|
43
|
+
metadata: import("@angular/forms").FormGroup<{
|
|
44
|
+
name: import("@angular/forms").FormControl<string>;
|
|
45
|
+
namespace: import("@angular/forms").FormControl<string>;
|
|
46
|
+
annotations: import("@angular/forms").FormGroup<{
|
|
47
|
+
[x: string]: import("@angular/forms").FormControl<string>;
|
|
48
|
+
}>;
|
|
49
|
+
}>;
|
|
50
|
+
spec: import("@angular/forms").FormGroup<{
|
|
51
|
+
podSelector: import("@angular/forms").FormGroup<{
|
|
52
|
+
matchLabels: import("@angular/forms").FormControl<any>;
|
|
53
|
+
}>;
|
|
54
|
+
ingress: FormArray<import("@angular/forms").FormControl<unknown>>;
|
|
55
|
+
egress: FormArray<import("@angular/forms").FormControl<unknown>>;
|
|
56
|
+
policyTypes: import("@angular/forms").FormControl<any[]>;
|
|
57
|
+
}>;
|
|
58
|
+
}>;
|
|
59
|
+
getOnFormArrayResizeFn(): () => import("@angular/forms").FormControl<{}>;
|
|
60
|
+
adaptResourceModel(resource: NetworkPolicy): NetworkPolicy;
|
|
61
|
+
ruleDisabledChanged(disabled: boolean, policyType: Lowercase<PolicyType>): Promise<void>;
|
|
62
|
+
addRule(policyType: Lowercase<PolicyType>): void;
|
|
63
|
+
removeRule(index: number, policyType: Lowercase<PolicyType>): void;
|
|
64
|
+
private ruleDisabledConfirm;
|
|
65
|
+
private addPolicyType;
|
|
66
|
+
private removePolicyType;
|
|
67
|
+
private updateRuleDisabledStateMap;
|
|
68
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NetworkPolicyFormComponent, never>;
|
|
69
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NetworkPolicyFormComponent, "acl-network-policy-form", never, { "baseParams": { "alias": "baseParams"; "required": true; }; "isUpdate": { "alias": "isUpdate"; "required": false; }; }, {}, never, never, true, never>;
|
|
70
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Injector } from '@angular/core';
|
|
2
|
+
import { AbstractControl } from '@angular/forms';
|
|
3
|
+
import { BaseResourceFormGroupComponent } from 'ng-resource-form-util';
|
|
4
|
+
import { Observable } from 'rxjs';
|
|
5
|
+
import { NetworkUtilService } from '../../../../services/network-util.service';
|
|
6
|
+
import { IPBlock } from '../../../../types/k8s-exports';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class NetworkPolicyIpBlockFormComponent extends BaseResourceFormGroupComponent<IPBlock> {
|
|
9
|
+
private readonly networkUtil;
|
|
10
|
+
cluster: string;
|
|
11
|
+
cluster$: Observable<string>;
|
|
12
|
+
networkMode$: Observable<"v4" | "v6" | "dual">;
|
|
13
|
+
constructor(injector: Injector, networkUtil: NetworkUtilService);
|
|
14
|
+
createForm(): import("@angular/forms").FormGroup<{
|
|
15
|
+
cidr: import("@angular/forms").FormControl<string>;
|
|
16
|
+
except: import("@angular/forms").FormControl<any[]>;
|
|
17
|
+
}>;
|
|
18
|
+
asyncValidateCidr(ctrl: AbstractControl): Observable<{
|
|
19
|
+
cidrPattern: boolean;
|
|
20
|
+
}>;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NetworkPolicyIpBlockFormComponent, never>;
|
|
22
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NetworkPolicyIpBlockFormComponent, "acl-network-policy-ip-block-form", never, { "cluster": { "alias": "cluster"; "required": true; }; }, {}, never, never, true, never>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { TranslateService, Workspace } from '@alauda-fe/common';
|
|
2
|
+
import { EventEmitter, Injector } from '@angular/core';
|
|
3
|
+
import { BaseResourceFormGroupComponent } from 'ng-resource-form-util';
|
|
4
|
+
import { NetworkPolicyPeer, PolicyType } from '../../../../types/k8s-exports';
|
|
5
|
+
import { NetworkPolicyPeerType } from '../../components/add-peer-rule-handler/component';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare const getPeerType: (peer: NetworkPolicyPeer) => NetworkPolicyPeerType;
|
|
8
|
+
export declare class NetworkPolicyPeerFormComponent extends BaseResourceFormGroupComponent<NetworkPolicyPeer> {
|
|
9
|
+
private readonly translate;
|
|
10
|
+
baseParams: Workspace;
|
|
11
|
+
policyType: Lowercase<PolicyType>;
|
|
12
|
+
peer: NetworkPolicyPeer;
|
|
13
|
+
deletePeer: EventEmitter<void>;
|
|
14
|
+
labelValidator: {
|
|
15
|
+
key: typeof import("@alauda-fe/common").k8sResourceLabelKeyValidator;
|
|
16
|
+
value: import("@angular/forms").ValidatorFn;
|
|
17
|
+
};
|
|
18
|
+
labelErrorMapper$: import("rxjs").Observable<{
|
|
19
|
+
key: {
|
|
20
|
+
namePattern: string;
|
|
21
|
+
prefixPattern: string;
|
|
22
|
+
nameTooLong: string;
|
|
23
|
+
prefixTooLong: string;
|
|
24
|
+
};
|
|
25
|
+
value: {
|
|
26
|
+
pattern: string;
|
|
27
|
+
maxlength: string;
|
|
28
|
+
};
|
|
29
|
+
}>;
|
|
30
|
+
getPeerType: (peer: NetworkPolicyPeer) => NetworkPolicyPeerType;
|
|
31
|
+
constructor(injector: Injector, translate: TranslateService);
|
|
32
|
+
createForm(): import("@angular/forms").FormGroup<{
|
|
33
|
+
ipBlock: import("@angular/forms").FormControl<import("../../../../types/k8s-exports").IPBlock>;
|
|
34
|
+
podSelector: import("@angular/forms").FormGroup<{
|
|
35
|
+
matchLabels: import("@angular/forms").FormControl<import("@alauda-fe/common").LabelSelector>;
|
|
36
|
+
}>;
|
|
37
|
+
namespaceSelector: import("@angular/forms").FormGroup<{
|
|
38
|
+
matchLabels: import("@angular/forms").FormControl<import("@alauda-fe/common").LabelSelector>;
|
|
39
|
+
}>;
|
|
40
|
+
}>;
|
|
41
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NetworkPolicyPeerFormComponent, never>;
|
|
42
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NetworkPolicyPeerFormComponent, "acl-network-policy-peer-form", never, { "baseParams": { "alias": "baseParams"; "required": true; }; "policyType": { "alias": "policyType"; "required": true; }; "peer": { "alias": "peer"; "required": true; }; }, { "deletePeer": "deletePeer"; }, never, never, true, never>;
|
|
43
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Injector } from '@angular/core';
|
|
2
|
+
import { ControlContainer, FormGroup } from '@angular/forms';
|
|
3
|
+
import { BaseResourceFormArrayComponent, OnFormArrayResizeFn } from 'ng-resource-form-util';
|
|
4
|
+
import { NetworkPolicyPort, PolicyType } from '../../../../types/k8s-exports';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class NetworkPolicyPortsFormComponent extends BaseResourceFormArrayComponent<NetworkPolicyPort, NetworkPolicyPort, FormGroup> {
|
|
7
|
+
readonly controlContainer: ControlContainer;
|
|
8
|
+
policyType: Lowercase<PolicyType>;
|
|
9
|
+
PROTOCOLS: readonly ["TCP", "UDP"];
|
|
10
|
+
constructor(injector: Injector, controlContainer: ControlContainer);
|
|
11
|
+
getOnFormArrayResizeFn(): OnFormArrayResizeFn;
|
|
12
|
+
adaptFormModel(formModel: NetworkPolicyPort[]): NetworkPolicyPort[];
|
|
13
|
+
private createNewPortControl;
|
|
14
|
+
private portValidator;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NetworkPolicyPortsFormComponent, never>;
|
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NetworkPolicyPortsFormComponent, "acl-network-policy-ports-form", never, { "policyType": { "alias": "policyType"; "required": true; }; }, {}, never, never, true, never>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { AbstractControl, FormControl } from '@angular/forms';
|
|
3
|
+
import { BaseResourceFormArrayComponent } from 'ng-resource-form-util';
|
|
4
|
+
import { Observable } from 'rxjs';
|
|
5
|
+
import { NetworkMode } from '../../../../utils/cidr-exports';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class NetworkPolicyExceptRemoteInputFormComponent extends BaseResourceFormArrayComponent implements OnInit {
|
|
8
|
+
remoteIpBlock: string;
|
|
9
|
+
remoteIpBlock$: Observable<string>;
|
|
10
|
+
networkMode: NetworkMode;
|
|
11
|
+
networkMode$: Observable<NetworkMode>;
|
|
12
|
+
ngOnInit(): void;
|
|
13
|
+
getOnFormArrayResizeFn(): () => FormControl<string>;
|
|
14
|
+
ipValidator: (ctrl: AbstractControl) => {
|
|
15
|
+
cidrPattern: boolean;
|
|
16
|
+
};
|
|
17
|
+
cidrValidator: (exceptRemoteIp: FormControl) => Observable<{
|
|
18
|
+
includes: boolean;
|
|
19
|
+
}>;
|
|
20
|
+
showRowError(): boolean;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NetworkPolicyExceptRemoteInputFormComponent, never>;
|
|
22
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NetworkPolicyExceptRemoteInputFormComponent, "acl-network-policy-remote-ip-except-input", never, { "remoteIpBlock": { "alias": "remoteIpBlock"; "required": false; }; "networkMode": { "alias": "networkMode"; "required": false; }; }, {}, never, never, true, never>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
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,16 +1,18 @@
|
|
|
1
|
-
import { HelmRequest, K8sSharedUtilService, KubernetesResourceList } from '@alauda-fe/common';
|
|
1
|
+
import { HelmRequest, K8sApiService, K8sSharedUtilService, KubernetesResourceList } from '@alauda-fe/common';
|
|
2
2
|
import { HttpClient } from '@angular/common/http';
|
|
3
3
|
import { ALB2, LoadBalancer } from '../types/k8s-exports';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class AlbApiService {
|
|
6
6
|
private readonly http;
|
|
7
7
|
private readonly k8sUtil;
|
|
8
|
-
|
|
8
|
+
private readonly k8sApi;
|
|
9
|
+
constructor(http: HttpClient, k8sUtil: K8sSharedUtilService, k8sApi: K8sApiService);
|
|
9
10
|
getAlbListByProject({ project, cluster }: {
|
|
10
11
|
project: string;
|
|
11
12
|
cluster: string;
|
|
12
13
|
}, queryParams?: Record<string, string>): import("rxjs").Observable<KubernetesResourceList<LoadBalancer>>;
|
|
13
14
|
v1ToV2Beta1(alb: LoadBalancer, hr?: HelmRequest): ALB2;
|
|
15
|
+
getExceptPortRange(cluster: string): import("rxjs").Observable<string>;
|
|
14
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<AlbApiService, never>;
|
|
15
17
|
static ɵprov: i0.ɵɵInjectableDeclaration<AlbApiService>;
|
|
16
18
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { K8sApiService, K8sUtilService, Namespace } from '@alauda-fe/common';
|
|
1
|
+
import { K8sApiService, K8sUtilService, Namespace, AuthApiService } from '@alauda-fe/common';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { Subnet } from '../types/k8s-exports';
|
|
4
4
|
import { IPMode, NetworkMode } from '../utils/cidr-exports';
|
|
@@ -7,7 +7,8 @@ import * as i0 from "@angular/core";
|
|
|
7
7
|
export declare class NetworkUtilService {
|
|
8
8
|
private readonly k8sApi;
|
|
9
9
|
private readonly k8sUtil;
|
|
10
|
-
|
|
10
|
+
private readonly authApi;
|
|
11
|
+
constructor(k8sApi: K8sApiService, k8sUtil: K8sUtilService, authApi: AuthApiService);
|
|
11
12
|
/**
|
|
12
13
|
* 集群网络类型,支持 kube-ovn,calico
|
|
13
14
|
* 若 kube-ovn,calico 同时存在,优先判定为 ovn
|
|
@@ -15,6 +16,7 @@ export declare class NetworkUtilService {
|
|
|
15
16
|
getNetworkTypeByCluster$(cluster: string): Observable<ClusterNetworkType>;
|
|
16
17
|
getNetworkMode$(cluster: string): Observable<"v4" | "v6" | "dual">;
|
|
17
18
|
getCalicoCidrs(namespace: Namespace, subnets: Subnet[], networkMode: NetworkMode, enableFixIpV6ForDual?: boolean): string[];
|
|
19
|
+
getCalicoSubnetNames(namespace: Namespace, networkMode: NetworkMode): string[];
|
|
18
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<NetworkUtilService, never>;
|
|
19
21
|
static ɵprov: i0.ɵɵInjectableDeclaration<NetworkUtilService>;
|
|
20
22
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
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,3 +1,4 @@
|
|
|
1
|
+
import { AlbProtocol, KubernetesResource, ServiceGroup } from '@alauda-fe/common';
|
|
1
2
|
import { ResourceLimit } from '../utils/alb-internals';
|
|
2
3
|
export declare enum AlbResourceType {
|
|
3
4
|
ALB = "ALB2",
|
|
@@ -27,3 +28,25 @@ export interface AlbResourceLimitModel {
|
|
|
27
28
|
specModel: SpecModel;
|
|
28
29
|
resourceLimit: ResourceLimit;
|
|
29
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,4 +1,4 @@
|
|
|
1
|
-
import { Condition, KubernetesResource, StringMap } from '@alauda-fe/common';
|
|
1
|
+
import { Certificate, Condition, KubernetesResource, LabelSelector, StringMap } from '@alauda-fe/common';
|
|
2
2
|
export declare enum EncapsulateProtocol {
|
|
3
3
|
IPIP = "IPIP",
|
|
4
4
|
VXLAN = "VXLAN",
|
|
@@ -35,6 +35,7 @@ export interface SubnetSpec {
|
|
|
35
35
|
private?: boolean;
|
|
36
36
|
allowSubnets?: string[];
|
|
37
37
|
enableEcmp?: boolean;
|
|
38
|
+
namespaceSelectors?: LabelSelector[];
|
|
38
39
|
vlan?: string;
|
|
39
40
|
}
|
|
40
41
|
export interface Subnet extends KubernetesResource {
|
|
@@ -52,6 +53,15 @@ export interface SubnetIpSpec {
|
|
|
52
53
|
export interface SubnetIp extends KubernetesResource {
|
|
53
54
|
spec?: SubnetIpSpec;
|
|
54
55
|
}
|
|
56
|
+
export interface InterConnectionSubnet extends KubernetesResource {
|
|
57
|
+
spec: InterConnectionSubnetSpec;
|
|
58
|
+
}
|
|
59
|
+
export interface InterConnectionSubnetSpec {
|
|
60
|
+
subnets: Array<{
|
|
61
|
+
name: string;
|
|
62
|
+
cidr: string;
|
|
63
|
+
}>;
|
|
64
|
+
}
|
|
55
65
|
export interface LoadBalancer extends KubernetesResource {
|
|
56
66
|
kind: 'ALB2';
|
|
57
67
|
spec?: LoadBalancerSpec;
|
|
@@ -128,3 +138,43 @@ export interface ALB2 extends KubernetesResource {
|
|
|
128
138
|
spec: ALB2Spec;
|
|
129
139
|
status?: ALB2Status;
|
|
130
140
|
}
|
|
141
|
+
export interface IPBlock {
|
|
142
|
+
cidr: string;
|
|
143
|
+
except: string[];
|
|
144
|
+
}
|
|
145
|
+
export interface NetworkPolicyPort {
|
|
146
|
+
port: number | string;
|
|
147
|
+
protocol: string;
|
|
148
|
+
endPort?: number;
|
|
149
|
+
}
|
|
150
|
+
export interface NetworkPolicyPeer {
|
|
151
|
+
ipBlock?: IPBlock;
|
|
152
|
+
namespaceSelector?: LabelSelector;
|
|
153
|
+
podSelector?: LabelSelector;
|
|
154
|
+
}
|
|
155
|
+
export interface NetworkPolicyEgressRule {
|
|
156
|
+
ports?: NetworkPolicyPort[];
|
|
157
|
+
to?: NetworkPolicyPeer[];
|
|
158
|
+
}
|
|
159
|
+
export interface NetworkPolicyIngressRule {
|
|
160
|
+
from?: NetworkPolicyPeer[];
|
|
161
|
+
ports?: NetworkPolicyPort[];
|
|
162
|
+
}
|
|
163
|
+
export type PolicyType = 'Ingress' | 'Egress';
|
|
164
|
+
export interface NetworkPolicySpec {
|
|
165
|
+
egress?: NetworkPolicyEgressRule[];
|
|
166
|
+
ingress?: NetworkPolicyIngressRule[];
|
|
167
|
+
podSelector?: LabelSelector;
|
|
168
|
+
policyTypes?: PolicyType[];
|
|
169
|
+
}
|
|
170
|
+
export interface NetworkPolicy extends KubernetesResource {
|
|
171
|
+
spec?: NetworkPolicySpec;
|
|
172
|
+
}
|
|
173
|
+
export interface DomainSpec {
|
|
174
|
+
name: string;
|
|
175
|
+
kind: 'full' | 'extensive';
|
|
176
|
+
}
|
|
177
|
+
export interface Domain extends KubernetesResource {
|
|
178
|
+
spec?: DomainSpec;
|
|
179
|
+
_certificate?: Certificate;
|
|
180
|
+
}
|