Skip to content

Commit

Permalink
gpu node cr name (labring#3634)
Browse files Browse the repository at this point in the history
  • Loading branch information
c121914yu committed Aug 4, 2023
1 parent 5258eb4 commit 6584695
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ export const valuationMap: Record<string, number> = {
gpu: 1000
};

const gpuCrName = 'gpu-info';
const gpuCrName = 'node-gpu-info';
const gpuCrNS = 'node-system'

export default async function handler(req: NextApiRequest, res: NextApiResponse) {
try {
Expand Down Expand Up @@ -120,7 +121,7 @@ async function getPriceCr({
/* get gpu nodes by configmap. */
async function getGpuNode({ k8sCore }: { k8sCore: CoreV1Api }) {
try {
const { body } = await k8sCore.readNamespacedConfigMap(gpuCrName, 'sealos');
const { body } = await k8sCore.readNamespacedConfigMap(gpuCrName, gpuCrNS);
const gpuMap = body?.data?.gpu;
if (!gpuMap) return [];
const parseGpuMap = JSON.parse(gpuMap) as Record<
Expand Down

0 comments on commit 6584695

Please sign in to comment.