@daocloud-proto/kpanda 0.22.0-dev-8395a5e3 → 0.22.0-dev-ea375919
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.
|
@@ -0,0 +1,57 @@
|
|
|
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 KpandaIoApiRbacV1alpha1Common from "./common.pb"
|
|
10
|
+
export type ClusterRole = {
|
|
11
|
+
metadata?: KpandaIoApiTypesObjectmeta.ObjectMeta
|
|
12
|
+
rules?: KpandaIoApiRbacV1alpha1Common.PolicyRule[]
|
|
13
|
+
aggregationRule?: KpandaIoApiRbacV1alpha1Common.AggregationRule
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type ListClusterRolesRequest = {
|
|
17
|
+
cluster?: string
|
|
18
|
+
page?: number
|
|
19
|
+
pageSize?: number
|
|
20
|
+
name?: string
|
|
21
|
+
sortBy?: KpandaIoApiTypesPage.SortBy
|
|
22
|
+
sortDir?: KpandaIoApiTypesPage.SortDir
|
|
23
|
+
labelSelector?: string
|
|
24
|
+
fieldSelector?: string
|
|
25
|
+
fuzzyName?: string
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type ListClusterRolesResponse = {
|
|
29
|
+
items?: ClusterRole[]
|
|
30
|
+
pagination?: KpandaIoApiTypesPage.Pagination
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export type DeleteClusterRoleRequest = {
|
|
34
|
+
cluster?: string
|
|
35
|
+
name?: string
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export type CreateClusterRoleRequest = {
|
|
39
|
+
cluster?: string
|
|
40
|
+
data?: string
|
|
41
|
+
name?: string
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export type GetClusterRoleRequest = {
|
|
45
|
+
cluster?: string
|
|
46
|
+
name?: string
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export type UpdateClusterRoleRequest = {
|
|
50
|
+
cluster?: string
|
|
51
|
+
name?: string
|
|
52
|
+
data?: string
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export type UpdateClusterRoleResponse = {
|
|
56
|
+
data?: string
|
|
57
|
+
}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import * as KpandaIoApiTypesObjectmeta from "../../types/objectmeta.pb"
|
|
7
8
|
import * as KpandaIoApiTypesPage from "../../types/page.pb"
|
|
8
9
|
export type RoleRef = {
|
|
9
10
|
aPIGroup?: string
|
|
@@ -75,4 +76,16 @@ export type ListAdminClusterSummaryRequest = {
|
|
|
75
76
|
|
|
76
77
|
export type ListAdminClusterSummaryResponse = {
|
|
77
78
|
clusters?: string[]
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export type PolicyRule = {
|
|
82
|
+
verbs?: string[]
|
|
83
|
+
apiGroups?: string[]
|
|
84
|
+
resources?: string[]
|
|
85
|
+
resourceNames?: string[]
|
|
86
|
+
nonResourceUrls?: string[]
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export type AggregationRule = {
|
|
90
|
+
clusterRoleSelectors?: KpandaIoApiTypesObjectmeta.LabelSelector[]
|
|
78
91
|
}
|
|
@@ -0,0 +1,61 @@
|
|
|
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 KpandaIoApiRbacV1alpha1Common from "./common.pb"
|
|
10
|
+
export type Role = {
|
|
11
|
+
metadata?: KpandaIoApiTypesObjectmeta.ObjectMeta
|
|
12
|
+
rules?: KpandaIoApiRbacV1alpha1Common.PolicyRule[]
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type ListRolesRequest = {
|
|
16
|
+
cluster?: string
|
|
17
|
+
namespace?: string
|
|
18
|
+
page?: number
|
|
19
|
+
pageSize?: number
|
|
20
|
+
name?: string
|
|
21
|
+
sortBy?: KpandaIoApiTypesPage.SortBy
|
|
22
|
+
sortDir?: KpandaIoApiTypesPage.SortDir
|
|
23
|
+
labelSelector?: string
|
|
24
|
+
fieldSelector?: string
|
|
25
|
+
fuzzyName?: string
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type ListRolesResponse = {
|
|
29
|
+
items?: Role[]
|
|
30
|
+
pagination?: KpandaIoApiTypesPage.Pagination
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export type DeleteRoleRequest = {
|
|
34
|
+
cluster?: string
|
|
35
|
+
namespace?: string
|
|
36
|
+
name?: string
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export type CreateRoleRequest = {
|
|
40
|
+
cluster?: string
|
|
41
|
+
namespace?: string
|
|
42
|
+
data?: string
|
|
43
|
+
name?: string
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export type GetRoleRequest = {
|
|
47
|
+
cluster?: string
|
|
48
|
+
namespace?: string
|
|
49
|
+
name?: string
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export type UpdateRoleRequest = {
|
|
53
|
+
cluster?: string
|
|
54
|
+
namespace?: string
|
|
55
|
+
name?: string
|
|
56
|
+
data?: string
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export type UpdateRoleResponse = {
|
|
60
|
+
data?: string
|
|
61
|
+
}
|
|
@@ -48,8 +48,10 @@ import * as KpandaIoApiKangarooV1alpha1Image from "../kangaroo/v1alpha1/image.pb
|
|
|
48
48
|
import * as KpandaIoApiNetworkingV1alpha1Ingress from "../networking/v1alpha1/ingress.pb"
|
|
49
49
|
import * as KpandaIoApiNetworkingV1alpha1Metallb from "../networking/v1alpha1/metallb.pb"
|
|
50
50
|
import * as KpandaIoApiNetworkingV1alpha1Networkpolicy from "../networking/v1alpha1/networkpolicy.pb"
|
|
51
|
+
import * as KpandaIoApiRbacV1alpha1Clusterrole from "../rbac/v1alpha1/clusterrole.pb"
|
|
51
52
|
import * as KpandaIoApiRbacV1alpha1Clusterrolebinding from "../rbac/v1alpha1/clusterrolebinding.pb"
|
|
52
53
|
import * as KpandaIoApiRbacV1alpha1Common from "../rbac/v1alpha1/common.pb"
|
|
54
|
+
import * as KpandaIoApiRbacV1alpha1Role from "../rbac/v1alpha1/role.pb"
|
|
53
55
|
import * as KpandaIoApiRbacV1alpha1Rolebinding from "../rbac/v1alpha1/rolebinding.pb"
|
|
54
56
|
import * as KpandaIoApiRegistryV1alpha1Registry from "../registry/v1alpha1/registry.pb"
|
|
55
57
|
import * as KpandaIoApiSettingV1alpha1Setting from "../setting/v1alpha1/setting.pb"
|
|
@@ -704,6 +706,36 @@ export class RBAC {
|
|
|
704
706
|
static CreateRoleBinding(req: KpandaIoApiRbacV1alpha1Rolebinding.CreateRoleBindingRequest, initReq?: fm.InitReq): Promise<KpandaIoApiRbacV1alpha1Rolebinding.RoleBinding> {
|
|
705
707
|
return fm.fetchReq<KpandaIoApiRbacV1alpha1Rolebinding.CreateRoleBindingRequest, KpandaIoApiRbacV1alpha1Rolebinding.RoleBinding>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/rolebindings`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
706
708
|
}
|
|
709
|
+
static ListRoles(req: KpandaIoApiRbacV1alpha1Role.ListRolesRequest, initReq?: fm.InitReq): Promise<KpandaIoApiRbacV1alpha1Role.ListRolesResponse> {
|
|
710
|
+
return fm.fetchReq<KpandaIoApiRbacV1alpha1Role.ListRolesRequest, KpandaIoApiRbacV1alpha1Role.ListRolesResponse>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/roles?${fm.renderURLSearchParams(req, ["cluster", "namespace"])}`, {...initReq, method: "GET"})
|
|
711
|
+
}
|
|
712
|
+
static DeleteRole(req: KpandaIoApiRbacV1alpha1Role.DeleteRoleRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
713
|
+
return fm.fetchReq<KpandaIoApiRbacV1alpha1Role.DeleteRoleRequest, GoogleProtobufEmpty.Empty>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/roles/${req["name"]}`, {...initReq, method: "DELETE"})
|
|
714
|
+
}
|
|
715
|
+
static CreateRole(req: KpandaIoApiRbacV1alpha1Role.CreateRoleRequest, initReq?: fm.InitReq): Promise<KpandaIoApiRbacV1alpha1Role.Role> {
|
|
716
|
+
return fm.fetchReq<KpandaIoApiRbacV1alpha1Role.CreateRoleRequest, KpandaIoApiRbacV1alpha1Role.Role>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/roles`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
717
|
+
}
|
|
718
|
+
static GetRole(req: KpandaIoApiRbacV1alpha1Role.GetRoleRequest, initReq?: fm.InitReq): Promise<KpandaIoApiRbacV1alpha1Role.Role> {
|
|
719
|
+
return fm.fetchReq<KpandaIoApiRbacV1alpha1Role.GetRoleRequest, KpandaIoApiRbacV1alpha1Role.Role>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/roles/${req["name"]}?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
720
|
+
}
|
|
721
|
+
static UpdateRole(req: KpandaIoApiRbacV1alpha1Role.UpdateRoleRequest, initReq?: fm.InitReq): Promise<KpandaIoApiRbacV1alpha1Role.UpdateRoleResponse> {
|
|
722
|
+
return fm.fetchReq<KpandaIoApiRbacV1alpha1Role.UpdateRoleRequest, KpandaIoApiRbacV1alpha1Role.UpdateRoleResponse>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/roles/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
723
|
+
}
|
|
724
|
+
static ListClusterRoles(req: KpandaIoApiRbacV1alpha1Clusterrole.ListClusterRolesRequest, initReq?: fm.InitReq): Promise<KpandaIoApiRbacV1alpha1Clusterrole.ListClusterRolesResponse> {
|
|
725
|
+
return fm.fetchReq<KpandaIoApiRbacV1alpha1Clusterrole.ListClusterRolesRequest, KpandaIoApiRbacV1alpha1Clusterrole.ListClusterRolesResponse>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/clusterroles?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
726
|
+
}
|
|
727
|
+
static DeleteClusterRole(req: KpandaIoApiRbacV1alpha1Clusterrole.DeleteClusterRoleRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
728
|
+
return fm.fetchReq<KpandaIoApiRbacV1alpha1Clusterrole.DeleteClusterRoleRequest, GoogleProtobufEmpty.Empty>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/clusterroles/${req["name"]}`, {...initReq, method: "DELETE"})
|
|
729
|
+
}
|
|
730
|
+
static CreateClusterRole(req: KpandaIoApiRbacV1alpha1Clusterrole.CreateClusterRoleRequest, initReq?: fm.InitReq): Promise<KpandaIoApiRbacV1alpha1Clusterrole.ClusterRole> {
|
|
731
|
+
return fm.fetchReq<KpandaIoApiRbacV1alpha1Clusterrole.CreateClusterRoleRequest, KpandaIoApiRbacV1alpha1Clusterrole.ClusterRole>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/clusterroles/${req["name"]}`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
732
|
+
}
|
|
733
|
+
static GetClusterRole(req: KpandaIoApiRbacV1alpha1Clusterrole.GetClusterRoleRequest, initReq?: fm.InitReq): Promise<KpandaIoApiRbacV1alpha1Clusterrole.ClusterRole> {
|
|
734
|
+
return fm.fetchReq<KpandaIoApiRbacV1alpha1Clusterrole.GetClusterRoleRequest, KpandaIoApiRbacV1alpha1Clusterrole.ClusterRole>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/clusterroles/${req["name"]}?${fm.renderURLSearchParams(req, ["cluster", "name"])}`, {...initReq, method: "GET"})
|
|
735
|
+
}
|
|
736
|
+
static UpdateClusterRole(req: KpandaIoApiRbacV1alpha1Clusterrole.UpdateClusterRoleRequest, initReq?: fm.InitReq): Promise<KpandaIoApiRbacV1alpha1Clusterrole.UpdateClusterRoleResponse> {
|
|
737
|
+
return fm.fetchReq<KpandaIoApiRbacV1alpha1Clusterrole.UpdateClusterRoleRequest, KpandaIoApiRbacV1alpha1Clusterrole.UpdateClusterRoleResponse>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/clusterroles/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
738
|
+
}
|
|
707
739
|
static ListClusterRoleBindings(req: KpandaIoApiRbacV1alpha1Clusterrolebinding.ListClusterRoleBindingsRequest, initReq?: fm.InitReq): Promise<KpandaIoApiRbacV1alpha1Clusterrolebinding.ListClusterRoleBindingsResponse> {
|
|
708
740
|
return fm.fetchReq<KpandaIoApiRbacV1alpha1Clusterrolebinding.ListClusterRoleBindingsRequest, KpandaIoApiRbacV1alpha1Clusterrolebinding.ListClusterRoleBindingsResponse>(`/apis/kpanda.io/v1alpha1/asl/clusterrolebindings?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
709
741
|
}
|