[Fix-12451][k8s] Read the kubeconfig from cluster conf (#12452)
This commit is contained in:
parent
1e62855fa9
commit
6309b78d37
|
|
@ -17,10 +17,10 @@
|
|||
|
||||
package org.apache.dolphinscheduler.api.k8s;
|
||||
|
||||
import org.apache.dolphinscheduler.api.utils.ClusterConfUtils;
|
||||
import org.apache.dolphinscheduler.dao.entity.Cluster;
|
||||
import org.apache.dolphinscheduler.dao.mapper.ClusterMapper;
|
||||
import org.apache.dolphinscheduler.remote.exceptions.RemotingException;
|
||||
import org.apache.dolphinscheduler.service.utils.ClusterConfUtils;
|
||||
|
||||
import java.util.Hashtable;
|
||||
import java.util.Map;
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ import org.apache.dolphinscheduler.api.dto.ClusterDto;
|
|||
import org.apache.dolphinscheduler.api.enums.Status;
|
||||
import org.apache.dolphinscheduler.api.k8s.K8sManager;
|
||||
import org.apache.dolphinscheduler.api.service.ClusterService;
|
||||
import org.apache.dolphinscheduler.api.utils.ClusterConfUtils;
|
||||
import org.apache.dolphinscheduler.api.utils.PageInfo;
|
||||
import org.apache.dolphinscheduler.api.utils.Result;
|
||||
import org.apache.dolphinscheduler.common.Constants;
|
||||
|
|
@ -33,6 +32,7 @@ import org.apache.dolphinscheduler.dao.entity.User;
|
|||
import org.apache.dolphinscheduler.dao.mapper.ClusterMapper;
|
||||
import org.apache.dolphinscheduler.dao.mapper.K8sNamespaceMapper;
|
||||
import org.apache.dolphinscheduler.remote.exceptions.RemotingException;
|
||||
import org.apache.dolphinscheduler.service.utils.ClusterConfUtils;
|
||||
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
|
|
|||
|
|
@ -126,6 +126,7 @@ import org.apache.dolphinscheduler.service.expand.CuringParamsService;
|
|||
import org.apache.dolphinscheduler.service.log.LogClient;
|
||||
import org.apache.dolphinscheduler.service.model.TaskNode;
|
||||
import org.apache.dolphinscheduler.service.task.TaskPluginManager;
|
||||
import org.apache.dolphinscheduler.service.utils.ClusterConfUtils;
|
||||
import org.apache.dolphinscheduler.service.utils.DagHelper;
|
||||
import org.apache.dolphinscheduler.spi.enums.ResourceType;
|
||||
import org.apache.dolphinscheduler.spi.utils.StringUtils;
|
||||
|
|
@ -3143,7 +3144,7 @@ public class ProcessServiceImpl implements ProcessService {
|
|||
QueryWrapper<Cluster> nodeWrapper = new QueryWrapper<>();
|
||||
nodeWrapper.eq("name", clusterName);
|
||||
Cluster cluster = clusterMapper.selectOne(nodeWrapper);
|
||||
return cluster == null ? null : cluster.getConfig();
|
||||
return cluster == null ? null : ClusterConfUtils.getK8sConfig(cluster.getConfig());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.dolphinscheduler.api.utils;
|
||||
package org.apache.dolphinscheduler.service.utils;
|
||||
|
||||
import org.apache.dolphinscheduler.common.utils.JSONUtils;
|
||||
import org.apache.dolphinscheduler.spi.utils.StringUtils;
|
||||
Loading…
Reference in New Issue