merge: 同步 origin/master
This commit is contained in:
@@ -439,13 +439,16 @@ function compactMemoryPressureCandidate(value: unknown): Record<string, unknown>
|
|||||||
action: { op: action.op, allowlist: action.allowlist },
|
action: { op: action.op, allowlist: action.allowlist },
|
||||||
};
|
};
|
||||||
if (candidate.kind === "cgroup-memory-reclaim") {
|
if (candidate.kind === "cgroup-memory-reclaim") {
|
||||||
|
const memoryStat = recordOrEmpty(candidate.memoryStat);
|
||||||
return {
|
return {
|
||||||
...base,
|
id: candidate.id,
|
||||||
|
kind: candidate.kind,
|
||||||
configId: candidate.configId,
|
configId: candidate.configId,
|
||||||
|
reason: candidate.reason,
|
||||||
|
risk: candidate.risk,
|
||||||
path: candidate.path,
|
path: candidate.path,
|
||||||
workloadSelector: compactWorkloadSelector(candidate.workloadSelector),
|
workloadSelector: compactWorkloadSelector(candidate.workloadSelector),
|
||||||
resolvedPod: compactResolvedPod(candidate.resolvedPod),
|
resolvedPod: compactResolvedPod(candidate.resolvedPod),
|
||||||
reclaimBytes: candidate.reclaimBytes,
|
|
||||||
requestedMemoryReclaimBytes: candidate.requestedMemoryReclaimBytes,
|
requestedMemoryReclaimBytes: candidate.requestedMemoryReclaimBytes,
|
||||||
requestedMemoryReclaim: candidate.requestedMemoryReclaim,
|
requestedMemoryReclaim: candidate.requestedMemoryReclaim,
|
||||||
estimateKind: candidate.estimateKind,
|
estimateKind: candidate.estimateKind,
|
||||||
@@ -453,6 +456,7 @@ function compactMemoryPressureCandidate(value: unknown): Record<string, unknown>
|
|||||||
minimumInactiveAnonBytes: candidate.minimumInactiveAnonBytes,
|
minimumInactiveAnonBytes: candidate.minimumInactiveAnonBytes,
|
||||||
memoryCurrentBytes: candidate.memoryCurrentBytes,
|
memoryCurrentBytes: candidate.memoryCurrentBytes,
|
||||||
memorySwapCurrentBytes: candidate.memorySwapCurrentBytes,
|
memorySwapCurrentBytes: candidate.memorySwapCurrentBytes,
|
||||||
|
inactiveAnonBytes: memoryStat.inactive_anon,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
const identities = Array.isArray(candidate.processIdentities) ? candidate.processIdentities.map(recordOrEmpty) : [];
|
const identities = Array.isArray(candidate.processIdentities) ? candidate.processIdentities.map(recordOrEmpty) : [];
|
||||||
|
|||||||
Reference in New Issue
Block a user