@daocloud-proto/kairship 0.2.2-2 → 0.2.2-20

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.
@@ -92,6 +92,13 @@ export type RestartDeploymentResponse = {
92
92
  deployment?: Deployment
93
93
  }
94
94
 
95
+ export type PromoteMemberClusterDeploymentRequest = {
96
+ instance?: string
97
+ cluster?: string
98
+ namespace?: string
99
+ name?: string
100
+ }
101
+
95
102
  export type ListDeploymentsRequest = {
96
103
  instance?: string
97
104
  namespace?: string
@@ -103,6 +110,22 @@ export type ListDeploymentsRequest = {
103
110
  sortDir?: KairshipIoApiTypesPage.SortDir
104
111
  }
105
112
 
113
+ export type ListMemberClusterDeploymentsRequest = {
114
+ instance?: string
115
+ cluster?: string
116
+ namespace?: string
117
+ page?: number
118
+ pageSize?: number
119
+ name?: string[]
120
+ sortBy?: KairshipIoApiTypesPage.SortBy
121
+ sortDir?: KairshipIoApiTypesPage.SortDir
122
+ }
123
+
124
+ export type ListMemberClusterDeploymentsResponse = {
125
+ items?: Deployment[]
126
+ pagination?: KairshipIoApiTypesPage.Pagination
127
+ }
128
+
106
129
  export type ListDeploymentsResponse = {
107
130
  items?: Deployment[]
108
131
  pagination?: KairshipIoApiTypesPage.Pagination
@@ -107,4 +107,17 @@ export type ClusterRequest = {
107
107
 
108
108
  export type ClusterResponse = {
109
109
  cluster?: Cluster
110
+ }
111
+
112
+ export type ListClustersLabelsRequest = {
113
+ instance?: string
114
+ }
115
+
116
+ export type ListClustersLabelsResponse = {
117
+ clusterLabels?: ClusterLabels[]
118
+ }
119
+
120
+ export type ClusterLabels = {
121
+ cluster?: string
122
+ labels?: {[key: string]: string}
110
123
  }
@@ -10,22 +10,22 @@ import * as KairshipIoApiPolicyV1alpha1Types from "./types.pb"
10
10
 
11
11
  export enum SpreadFieldValue {
12
12
  SPREAD_FIELD_VALUE_UNSPECIFIED = "SPREAD_FIELD_VALUE_UNSPECIFIED",
13
- SpreadByFieldCluster = "SpreadByFieldCluster",
14
- SpreadByFieldRegion = "SpreadByFieldRegion",
15
- SpreadByFieldZone = "SpreadByFieldZone",
16
- SpreadByFieldProvider = "SpreadByFieldProvider",
13
+ cluster = "cluster",
14
+ region = "region",
15
+ zone = "zone",
16
+ provider = "provider",
17
17
  }
18
18
 
19
19
  export enum ReplicaSchedulingType {
20
20
  REPLICA_SCHEDULING_TYPE_UNSPECIFIED = "REPLICA_SCHEDULING_TYPE_UNSPECIFIED",
21
- ReplicaSchedulingTypeDuplicated = "ReplicaSchedulingTypeDuplicated",
22
- ReplicaSchedulingTypeDivided = "ReplicaSchedulingTypeDivided",
21
+ Duplicated = "Duplicated",
22
+ Divided = "Divided",
23
23
  }
24
24
 
25
25
  export enum ReplicaDivisionPreference {
26
26
  REPLICA_DIVISION_PREFERENCE_UNSPECIFIED = "REPLICA_DIVISION_PREFERENCE_UNSPECIFIED",
27
- ReplicaDivisionPreferenceAggregated = "ReplicaDivisionPreferenceAggregated",
28
- ReplicaDivisionPreferenceWeighted = "ReplicaDivisionPreferenceWeighted",
27
+ Aggregated = "Aggregated",
28
+ Weighted = "Weighted",
29
29
  }
30
30
 
31
31
  export enum DynamicWeightFactor {
@@ -16,4 +16,5 @@ export type ResourceSelector = {
16
16
  export type ClusterAffinity = {
17
17
  labelSelector?: KairshipIoApiTypesObjectmeta.LabelSelector
18
18
  clusterNames?: string[]
19
+ exclude?: string[]
19
20
  }
@@ -81,6 +81,9 @@ export class Cluster {
81
81
  static UpdateJoinedCluster(req: KairshipIoApiClusterV1alpha1Cluster.ClusterRequest, initReq?: fm.InitReq): Promise<KairshipIoApiClusterV1alpha1Cluster.ClusterResponse> {
82
82
  return fm.fetchReq<KairshipIoApiClusterV1alpha1Cluster.ClusterRequest, KairshipIoApiClusterV1alpha1Cluster.ClusterResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/clusters/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
83
83
  }
84
+ static ListClustersLabels(req: KairshipIoApiClusterV1alpha1Cluster.ListClustersLabelsRequest, initReq?: fm.InitReq): Promise<KairshipIoApiClusterV1alpha1Cluster.ListClustersLabelsResponse> {
85
+ return fm.fetchReq<KairshipIoApiClusterV1alpha1Cluster.ListClustersLabelsRequest, KairshipIoApiClusterV1alpha1Cluster.ListClustersLabelsResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/clusters-labels?${fm.renderURLSearchParams(req, ["instance"])}`, {...initReq, method: "GET"})
86
+ }
84
87
  }
85
88
  export class Core {
86
89
  static ListNamespaces(req: KairshipIoApiCoreV1alpha1Namespace.ListNamespacesRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Namespace.ListNamespacesResponse> {
@@ -229,6 +232,12 @@ export class Apps {
229
232
  static RestartDeployment(req: KairshipIoApiAppsV1alpha1Deployment.RestartDeploymentRequest, initReq?: fm.InitReq): Promise<KairshipIoApiAppsV1alpha1Deployment.RestartDeploymentResponse> {
230
233
  return fm.fetchReq<KairshipIoApiAppsV1alpha1Deployment.RestartDeploymentRequest, KairshipIoApiAppsV1alpha1Deployment.RestartDeploymentResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/namespaces/${req["namespace"]}/deployments/${req["name"]}:restart`, {...initReq, method: "POST"})
231
234
  }
235
+ static ListMemberClusterDeployments(req: KairshipIoApiAppsV1alpha1Deployment.ListMemberClusterDeploymentsRequest, initReq?: fm.InitReq): Promise<KairshipIoApiAppsV1alpha1Deployment.ListMemberClusterDeploymentsResponse> {
236
+ return fm.fetchReq<KairshipIoApiAppsV1alpha1Deployment.ListMemberClusterDeploymentsRequest, KairshipIoApiAppsV1alpha1Deployment.ListMemberClusterDeploymentsResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/member-clusters/${req["cluster"]}/namespaces/${req["namespace"]}/deployments?${fm.renderURLSearchParams(req, ["instance", "cluster", "namespace"])}`, {...initReq, method: "GET"})
237
+ }
238
+ static PromoteMemberClusterDeployment(req: KairshipIoApiAppsV1alpha1Deployment.PromoteMemberClusterDeploymentRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
239
+ return fm.fetchReq<KairshipIoApiAppsV1alpha1Deployment.PromoteMemberClusterDeploymentRequest, GoogleProtobufEmpty.Empty>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/member-clusters/${req["cluster"]}/namespaces/${req["namespace"]}/deployments/${req["name"]}:promote`, {...initReq, method: "POST"})
240
+ }
232
241
  }
233
242
  export class Instance {
234
243
  static CreateInstance(req: KairshipIoApiInstanceV1alpha1Instance.CreateInstanceRequest, initReq?: fm.InitReq): Promise<KairshipIoApiInstanceV1alpha1Instance.Instance> {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"@daocloud-proto/kairship",
3
- "version":"0.2.2-2",
3
+ "version":"0.2.2-20",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {