Gallardot commented on code in PR #14991:
URL:
https://github.com/apache/dolphinscheduler/pull/14991#discussion_r1369843792
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/K8sNamespaceController.java:
##########
@@ -104,56 +101,21 @@ public Result queryNamespaceListPaging(@Parameter(hidden
= true) @RequestAttribu
* @param loginUser
* @param namespace k8s namespace
* @param clusterCode clusterCode
- * @param limitsCpu max cpu
- * @param limitsMemory max memory
* @return
*/
@Operation(summary = "createK8sNamespace", description =
"CREATE_NAMESPACE_NOTES")
@Parameters({
@Parameter(name = "namespace", description = "NAMESPACE", required
= true, schema = @Schema(implementation = String.class)),
- @Parameter(name = "clusterCode", description = "CLUSTER_CODE",
required = true, schema = @Schema(implementation = long.class)),
- @Parameter(name = "limits_cpu", description = "LIMITS_CPU",
required = false, schema = @Schema(implementation = double.class)),
- @Parameter(name = "limits_memory", description = "LIMITS_MEMORY",
required = false, schema = @Schema(implementation = int.class))
+ @Parameter(name = "clusterCode", description = "CLUSTER_CODE",
required = true, schema = @Schema(implementation = long.class))
})
@PostMapping()
@ResponseStatus(HttpStatus.CREATED)
@ApiException(CREATE_K8S_NAMESPACE_ERROR)
public Result createNamespace(@Parameter(hidden = true)
@RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam(value = "namespace") String
namespace,
- @RequestParam(value = "clusterCode") Long
clusterCode,
- @RequestParam(value = "limitsCpu", required
= false) Double limitsCpu,
- @RequestParam(value = "limitsMemory",
required = false) Integer limitsMemory) {
- Map<String, Object> result =
- k8sNamespaceService.createK8sNamespace(loginUser, namespace,
clusterCode, limitsCpu, limitsMemory);
- return returnDataList(result);
- }
-
- /**
- * update namespace,namespace and k8s not allowed update, because may
create on k8s,can delete and create new instead
- *
- * @param loginUser
- * @param userName owner
- * @param limitsCpu max cpu
- * @param limitsMemory max memory
- * @return
- */
- @Operation(summary = "updateK8sNamespace", description =
"UPDATE_NAMESPACE_NOTES")
- @Parameters({
- @Parameter(name = "id", description = "K8S_NAMESPACE_ID", required
= true, schema = @Schema(implementation = int.class, example = "100")),
- @Parameter(name = "userName", description = "OWNER", required =
false, schema = @Schema(implementation = String.class)),
- @Parameter(name = "limitsCpu", description = "LIMITS_CPU",
required = false, schema = @Schema(implementation = double.class)),
- @Parameter(name = "limitsMemory", description = "LIMITS_MEMORY",
required = false, schema = @Schema(implementation = int.class))})
- @PutMapping(value = "/{id}")
- @ResponseStatus(HttpStatus.CREATED)
- @ApiException(UPDATE_K8S_NAMESPACE_ERROR)
- public Result updateNamespace(@Parameter(hidden = true)
@RequestAttribute(value = Constants.SESSION_USER) User loginUser,
Review Comment:
This API only modifies ResourceQuota, but it is no longer necessary as there
are currently no ResourceQuota, and the UI will not call this API again.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]