[FEATURE] Server service containerization
This commit is contained in:
parent
22bf905415
commit
12d198456c
9 changed files with 165 additions and 91 deletions
|
@ -47,11 +47,13 @@ export async function getInstances() {
|
|||
const serverInstances = serverDeployments.map((s) => {
|
||||
name = s.metadata.annotations["minecluster.dunemask.net/server-name"];
|
||||
metrics = null;
|
||||
started = !!s.spec.replicas;
|
||||
started = !!s.spec.template.spec.containers.find((c) =>
|
||||
c.name.includes(`mcl-${name}-server`),
|
||||
);
|
||||
const pod = podMetricsResponse.items.find(({ metadata: md }) => {
|
||||
return md.labels && md.labels.app && md.labels.app === `mcl-${name}-app`;
|
||||
});
|
||||
if (pod) {
|
||||
if (started && pod) {
|
||||
const podCpus = pod.containers.map(
|
||||
({ usage }) => parseInt(usage.cpu) / 1_000_000,
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue