@daocloud-proto/kpanda 0.19.0-dev-78cbf9de → 0.19.0-dev-d29bfbf6
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.
|
@@ -84,7 +84,19 @@ export type ValidateKubeConfigResponse = {
|
|
|
84
84
|
errMsg?: string
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
export type
|
|
87
|
+
export type IntegrateClusterRequest = {
|
|
88
|
+
name?: string
|
|
89
|
+
aliasName?: string
|
|
90
|
+
provider?: ClusterProvider
|
|
91
|
+
labels?: {[key: string]: string}
|
|
92
|
+
annotations?: {[key: string]: string}
|
|
93
|
+
describe?: string
|
|
94
|
+
region?: string
|
|
95
|
+
zone?: string
|
|
96
|
+
kubeConfigString?: string
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export type UpdateClusterRequest = {
|
|
88
100
|
name?: string
|
|
89
101
|
aliasName?: string
|
|
90
102
|
provider?: ClusterProvider
|
|
@@ -300,11 +300,11 @@ export class Cluster {
|
|
|
300
300
|
static ValidateKubeConfig(req: KpandaIoApiClustersV1alpha1Cluster.ValidateKubeConfigRequest, initReq?: fm.InitReq): Promise<KpandaIoApiClustersV1alpha1Cluster.ValidateKubeConfigResponse> {
|
|
301
301
|
return fm.fetchReq<KpandaIoApiClustersV1alpha1Cluster.ValidateKubeConfigRequest, KpandaIoApiClustersV1alpha1Cluster.ValidateKubeConfigResponse>(`/apis/kpanda.io/v1alpha1/clusters/validate`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
302
302
|
}
|
|
303
|
-
static CreateCluster(req: KpandaIoApiClustersV1alpha1Cluster.
|
|
304
|
-
return fm.fetchReq<KpandaIoApiClustersV1alpha1Cluster.
|
|
303
|
+
static CreateCluster(req: KpandaIoApiClustersV1alpha1Cluster.IntegrateClusterRequest, initReq?: fm.InitReq): Promise<KpandaIoApiClustersV1alpha1Cluster.CreateOrUpdateClusterResponse> {
|
|
304
|
+
return fm.fetchReq<KpandaIoApiClustersV1alpha1Cluster.IntegrateClusterRequest, KpandaIoApiClustersV1alpha1Cluster.CreateOrUpdateClusterResponse>(`/apis/kpanda.io/v1alpha1/clusters`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
305
305
|
}
|
|
306
|
-
static UpdateClusters(req: KpandaIoApiClustersV1alpha1Cluster.
|
|
307
|
-
return fm.fetchReq<KpandaIoApiClustersV1alpha1Cluster.
|
|
306
|
+
static UpdateClusters(req: KpandaIoApiClustersV1alpha1Cluster.UpdateClusterRequest, initReq?: fm.InitReq): Promise<KpandaIoApiClustersV1alpha1Cluster.CreateOrUpdateClusterResponse> {
|
|
307
|
+
return fm.fetchReq<KpandaIoApiClustersV1alpha1Cluster.UpdateClusterRequest, KpandaIoApiClustersV1alpha1Cluster.CreateOrUpdateClusterResponse>(`/apis/kpanda.io/v1alpha1/clusters/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
308
308
|
}
|
|
309
309
|
static EditClusterLabels(req: KpandaIoApiClustersV1alpha1Cluster.EditClusterLabelsRequest, initReq?: fm.InitReq): Promise<KpandaIoApiClustersV1alpha1Cluster.EditClusterLabelsResponse> {
|
|
310
310
|
return fm.fetchReq<KpandaIoApiClustersV1alpha1Cluster.EditClusterLabelsRequest, KpandaIoApiClustersV1alpha1Cluster.EditClusterLabelsResponse>(`/apis/kpanda.io/v1alpha1/clusters/${req["name"]}/labels`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|