Skip to content

Commit

Permalink
chore(k8s-system-tests): overcommit memory
Browse files Browse the repository at this point in the history
  • Loading branch information
marko-k0 committed Nov 4, 2024
1 parent 1a1c514 commit 0af27c0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions rs/tests/driver/src/k8s/tnet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,7 @@ spec:
&vm_name.clone(),
&vm_req.vcpus.to_string(),
&vm_req.memory_kibibytes.to_string(),
&(vm_req.memory_kibibytes / 2).to_string(),
ipv4,
ipv6,
false,
Expand Down
12 changes: 10 additions & 2 deletions rs/tests/driver/src/k8s/virtualmachine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,11 @@ spec:
- port: 18444
- port: 20443
resources:
overcommitGuestOverhead: true
requests:
memory: {memory}Ki
memory: {memory_request}Ki
memory:
guest: {memory}Ki
networks:
- name: default
pod: {}
Expand Down Expand Up @@ -165,8 +168,11 @@ spec:
- port: 19100
- port: 19531
resources:
overcommitGuestOverhead: true
requests:
memory: {memory}Ki
memory: {memory_request}Ki
memory:
guest: {memory}Ki
networks:
- name: default
pod: {}
Expand All @@ -184,6 +190,7 @@ pub async fn create_vm(
name: &str,
cpus: &str,
memory: &str,
memory_request: &str,
ipv4: Ipv4Addr,
ipv6: Ipv6Addr,
running: bool,
Expand All @@ -201,6 +208,7 @@ pub async fn create_vm(
.replace("{tnet}", &owner.name)
.replace("{running}", &running.to_string())
.replace("{memory}", memory)
.replace("{memory_request}", memory_request)
.replace("{cpus}", cpus)
.replace("{ipv4}", &ipv4.to_string())
.replace("{ipv6}", &ipv6.to_string());
Expand Down

0 comments on commit 0af27c0

Please sign in to comment.