INNER CODE UNIT · JavaScript

podCount

rohitg00/k8sgames · js/engine/ClusterState.js:560

      const podCount = usage.pods + 1;
      if (podCount > quota.hard.pods) {
        violations.push(`Pod count exceeded: ${podCount} > ${quota.hard.pods}`);
      }
    }

    return {
      allowed: violations.length === 0,
      violations,
      usage,
    };
  }

  _parseCpu(value) {
    if (typeof value === 'number') return value;
    const str = String(value);
    if (str.endsWith('m')) return parseInt(str, 10);
    return parseFloat(str) * 1000;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…