@daocloud-proto/kpanda 0.9.8-4 → 0.9.8-8

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.
@@ -7,7 +7,7 @@
7
7
  import * as KpandaIoApiTypesObjectmeta from "../../types/objectmeta.pb"
8
8
  import * as KpandaIoApiTypesPage from "../../types/page.pb"
9
9
 
10
- export enum PortStatusProtocol {
10
+ export enum Protocol {
11
11
  PROTOCOL_UNSPECIFIED = "PROTOCOL_UNSPECIFIED",
12
12
  TCP = "TCP",
13
13
  UDP = "UDP",
@@ -43,7 +43,7 @@ export type LoadBalancerIngress = {
43
43
  export type PortStatus = {
44
44
  port?: number
45
45
  error?: string
46
- protocol?: PortStatusProtocol
46
+ protocol?: Protocol
47
47
  }
48
48
 
49
49
  export type IngressBackend = {
@@ -169,7 +169,7 @@ export type PatchIngressResponse = {
169
169
  data?: string
170
170
  }
171
171
 
172
- export type DeleteIngressResponse = {
172
+ export type DeleteIngressRequest = {
173
173
  cluster?: string
174
174
  namespace?: string
175
175
  name?: string
@@ -0,0 +1,131 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ /*
4
+ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
+ */
6
+
7
+ import * as KpandaIoApiTypesObjectmeta from "../../types/objectmeta.pb"
8
+ import * as KpandaIoApiTypesPage from "../../types/page.pb"
9
+ import * as KpandaIoApiNetworkingV1alpha1Ingress from "./ingress.pb"
10
+
11
+ export enum NetworkPolicySpecPolicyType {
12
+ POLICY_TYPE_UNSPECIFIED = "POLICY_TYPE_UNSPECIFIED",
13
+ Ingress = "Ingress",
14
+ Egress = "Egress",
15
+ }
16
+
17
+ export type NetworkPolicy = {
18
+ metadata?: KpandaIoApiTypesObjectmeta.ObjectMeta
19
+ spec?: NetworkPolicySpec
20
+ }
21
+
22
+ export type NetworkPolicySpec = {
23
+ podSelector?: KpandaIoApiTypesObjectmeta.LabelSelector
24
+ ingress?: NetworkPolicyIngressRule[]
25
+ egress?: NetworkPolicyEgressRule[]
26
+ policyTypes?: NetworkPolicySpecPolicyType[]
27
+ }
28
+
29
+ export type NetworkPolicyIngressRule = {
30
+ ports?: NetworkPolicyPort[]
31
+ from?: NetworkPolicyPeer[]
32
+ }
33
+
34
+ export type NetworkPolicyEgressRule = {
35
+ ports?: NetworkPolicyPort[]
36
+ to?: NetworkPolicyPeer[]
37
+ }
38
+
39
+ export type NetworkPolicyPort = {
40
+ protocol?: KpandaIoApiNetworkingV1alpha1Ingress.Protocol
41
+ port?: string
42
+ endPort?: number
43
+ }
44
+
45
+ export type NetworkPolicyPeer = {
46
+ podSelector?: KpandaIoApiTypesObjectmeta.LabelSelector
47
+ namespaceSelector?: KpandaIoApiTypesObjectmeta.LabelSelector
48
+ iPBlock?: IPBlock
49
+ }
50
+
51
+ export type IPBlock = {
52
+ cIDR?: string
53
+ except?: string[]
54
+ }
55
+
56
+ export type ListClusterNetworkPoliciesRequest = {
57
+ cluster?: string
58
+ page?: number
59
+ pageSize?: number
60
+ sortBy?: KpandaIoApiTypesPage.SortBy
61
+ sortDir?: KpandaIoApiTypesPage.SortDir
62
+ name?: string
63
+ labelSelector?: string
64
+ fieldSelector?: string
65
+ }
66
+
67
+ export type ListClusterNetworkPoliciesResponse = {
68
+ items?: NetworkPolicy[]
69
+ pagination?: KpandaIoApiTypesPage.Pagination
70
+ }
71
+
72
+ export type ListNetworkPoliciesRequest = {
73
+ cluster?: string
74
+ namespace?: string
75
+ page?: number
76
+ pageSize?: number
77
+ sortBy?: KpandaIoApiTypesPage.SortBy
78
+ sortDir?: KpandaIoApiTypesPage.SortDir
79
+ name?: string
80
+ labelSelector?: string
81
+ fieldSelector?: string
82
+ }
83
+
84
+ export type ListNetworkPoliciesResponse = {
85
+ items?: NetworkPolicy[]
86
+ pagination?: KpandaIoApiTypesPage.Pagination
87
+ }
88
+
89
+ export type GetNetworkPolicyRequest = {
90
+ cluster?: string
91
+ namespace?: string
92
+ name?: string
93
+ }
94
+
95
+ export type GetNetworkPolicyJSONRequest = {
96
+ cluster?: string
97
+ namespace?: string
98
+ name?: string
99
+ stable?: boolean
100
+ }
101
+
102
+ export type GetNetworkPolicyJSONResponse = {
103
+ data?: string
104
+ }
105
+
106
+ export type CreateNetworkPolicyRequest = {
107
+ cluster?: string
108
+ namespace?: string
109
+ data?: string
110
+ }
111
+
112
+ export type CreateNetworkPolicyResponse = {
113
+ data?: string
114
+ }
115
+
116
+ export type UpdateNetworkPolicyRequest = {
117
+ cluster?: string
118
+ namespace?: string
119
+ name?: string
120
+ data?: string
121
+ }
122
+
123
+ export type UpdateNetworkPolicyResponse = {
124
+ data?: string
125
+ }
126
+
127
+ export type DeleteNetworkPolicyRequest = {
128
+ cluster?: string
129
+ namespace?: string
130
+ name?: string
131
+ }
@@ -37,6 +37,7 @@ import * as KpandaIoApiCoreV1alpha1Service from "../core/v1alpha1/service.pb"
37
37
  import * as KpandaIoApiGhippoV1alpha1Workspace from "../ghippo/v1alpha1/workspace.pb"
38
38
  import * as KpandaIoApiInsightV1alpha1Insight from "../insight/v1alpha1/insight.pb"
39
39
  import * as KpandaIoApiNetworkingV1alpha1Ingress from "../networking/v1alpha1/ingress.pb"
40
+ import * as KpandaIoApiNetworkingV1alpha1Networkpolicy from "../networking/v1alpha1/networkpolicy.pb"
40
41
  import * as KpandaIoApiRbacV1alpha1Clusterrolebinding from "../rbac/v1alpha1/clusterrolebinding.pb"
41
42
  import * as KpandaIoApiRbacV1alpha1Common from "../rbac/v1alpha1/common.pb"
42
43
  import * as KpandaIoApiRbacV1alpha1Rolebinding from "../rbac/v1alpha1/rolebinding.pb"
@@ -522,8 +523,29 @@ export class Networking {
522
523
  static PatchIngress(req: KpandaIoApiNetworkingV1alpha1Ingress.PatchIngressRequest, initReq?: fm.InitReq): Promise<KpandaIoApiNetworkingV1alpha1Ingress.PatchIngressResponse> {
523
524
  return fm.fetchReq<KpandaIoApiNetworkingV1alpha1Ingress.PatchIngressRequest, KpandaIoApiNetworkingV1alpha1Ingress.PatchIngressResponse>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/ingresses/${req["name"]}`, {...initReq, method: "PATCH", body: JSON.stringify(req)})
524
525
  }
525
- static DeleteIngress(req: KpandaIoApiNetworkingV1alpha1Ingress.DeleteIngressResponse, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
526
- return fm.fetchReq<KpandaIoApiNetworkingV1alpha1Ingress.DeleteIngressResponse, GoogleProtobufEmpty.Empty>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/ingresses/${req["name"]}`, {...initReq, method: "DELETE"})
526
+ static DeleteIngress(req: KpandaIoApiNetworkingV1alpha1Ingress.DeleteIngressRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
527
+ return fm.fetchReq<KpandaIoApiNetworkingV1alpha1Ingress.DeleteIngressRequest, GoogleProtobufEmpty.Empty>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/ingresses/${req["name"]}`, {...initReq, method: "DELETE"})
528
+ }
529
+ static ListClusterNetworkPolicies(req: KpandaIoApiNetworkingV1alpha1Networkpolicy.ListClusterNetworkPoliciesRequest, initReq?: fm.InitReq): Promise<KpandaIoApiNetworkingV1alpha1Networkpolicy.ListClusterNetworkPoliciesResponse> {
530
+ return fm.fetchReq<KpandaIoApiNetworkingV1alpha1Networkpolicy.ListClusterNetworkPoliciesRequest, KpandaIoApiNetworkingV1alpha1Networkpolicy.ListClusterNetworkPoliciesResponse>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/networkpolicies?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
531
+ }
532
+ static ListNetworkPolicies(req: KpandaIoApiNetworkingV1alpha1Networkpolicy.ListNetworkPoliciesRequest, initReq?: fm.InitReq): Promise<KpandaIoApiNetworkingV1alpha1Networkpolicy.ListNetworkPoliciesResponse> {
533
+ return fm.fetchReq<KpandaIoApiNetworkingV1alpha1Networkpolicy.ListNetworkPoliciesRequest, KpandaIoApiNetworkingV1alpha1Networkpolicy.ListNetworkPoliciesResponse>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/networkpolicies?${fm.renderURLSearchParams(req, ["cluster", "namespace"])}`, {...initReq, method: "GET"})
534
+ }
535
+ static GetNetworkPolicy(req: KpandaIoApiNetworkingV1alpha1Networkpolicy.GetNetworkPolicyRequest, initReq?: fm.InitReq): Promise<KpandaIoApiNetworkingV1alpha1Networkpolicy.NetworkPolicy> {
536
+ return fm.fetchReq<KpandaIoApiNetworkingV1alpha1Networkpolicy.GetNetworkPolicyRequest, KpandaIoApiNetworkingV1alpha1Networkpolicy.NetworkPolicy>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/networkpolicies/${req["name"]}?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
537
+ }
538
+ static GetNetworkPolicyJSON(req: KpandaIoApiNetworkingV1alpha1Networkpolicy.GetNetworkPolicyJSONRequest, initReq?: fm.InitReq): Promise<KpandaIoApiNetworkingV1alpha1Networkpolicy.GetNetworkPolicyJSONResponse> {
539
+ return fm.fetchReq<KpandaIoApiNetworkingV1alpha1Networkpolicy.GetNetworkPolicyJSONRequest, KpandaIoApiNetworkingV1alpha1Networkpolicy.GetNetworkPolicyJSONResponse>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/networkpolicies/${req["name"]}/json?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
540
+ }
541
+ static CreateNetworkPolicy(req: KpandaIoApiNetworkingV1alpha1Networkpolicy.CreateNetworkPolicyRequest, initReq?: fm.InitReq): Promise<KpandaIoApiNetworkingV1alpha1Networkpolicy.CreateNetworkPolicyResponse> {
542
+ return fm.fetchReq<KpandaIoApiNetworkingV1alpha1Networkpolicy.CreateNetworkPolicyRequest, KpandaIoApiNetworkingV1alpha1Networkpolicy.CreateNetworkPolicyResponse>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/networkpolicies`, {...initReq, method: "POST", body: JSON.stringify(req)})
543
+ }
544
+ static UpdateNetworkPolicy(req: KpandaIoApiNetworkingV1alpha1Networkpolicy.UpdateNetworkPolicyRequest, initReq?: fm.InitReq): Promise<KpandaIoApiNetworkingV1alpha1Networkpolicy.UpdateNetworkPolicyResponse> {
545
+ return fm.fetchReq<KpandaIoApiNetworkingV1alpha1Networkpolicy.UpdateNetworkPolicyRequest, KpandaIoApiNetworkingV1alpha1Networkpolicy.UpdateNetworkPolicyResponse>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/networkpolicies/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
546
+ }
547
+ static DeleteNetworkPolicy(req: KpandaIoApiNetworkingV1alpha1Networkpolicy.DeleteNetworkPolicyRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
548
+ return fm.fetchReq<KpandaIoApiNetworkingV1alpha1Networkpolicy.DeleteNetworkPolicyRequest, GoogleProtobufEmpty.Empty>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/networkpolicies/${req["name"]}`, {...initReq, method: "DELETE"})
527
549
  }
528
550
  }
529
551
  export class RBAC {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"@daocloud-proto/kpanda",
3
- "version":"0.9.8-4",
3
+ "version":"0.9.8-8",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {