public void scaleByAction(final ScaleAction action) throws Exception {
        V1Scale scale = appsV1Api.readNamespacedDeploymentScale(
                deploymentProperties.getName(),
                deploymentProperties.getNamespace(),
                null);
        V1ScaleSpec spec = scale.getSpec();
        int currentReplicas = (Objects.nonNull(spec) && Objects.nonNull(spec.getReplicas()))
                ? spec.getReplicas()
                : 0;
        int newReplicas = calculateNewReplicaCount(currentReplicas, action);
        scaleByNum(newReplicas);
    }
scale by action.

@param action action
shenyu-admin/src/main/java/org/apache/shenyu/admin/scale/scaler/KubernetesScaler.java