swh/staging: Deploy tmp emptyDir on afn loaders
Related to swh/infra/sysadm-environment#5464 (closed)
These modifications will deploy an emptyDir volume with medium
field set to Memory
on the deployment loader-add-forge-now
in staging environment.
The value limitedMemory
will be the limit of the pod's memory and the tmpfs volume space.
helm-diff
[swh] Comparing changes between branches production and staging_afn_emptydir (per environment)...
Your branch is up to date with 'origin/production'.
[swh] Generate config in production branch for environment staging, namespace swh...
[swh] Generate config in production branch for environment staging, namespace swh-cassandra...
[swh] Generate config in production branch for environment staging, namespace swh-cassandra-next-version...
[swh] Generate config in staging_afn_emptydir branch for environment staging...
[swh] Generate config in staging_afn_emptydir branch for environment staging...
[swh] Generate config in staging_afn_emptydir branch for environment staging...
Your branch is up to date with 'origin/production'.
[swh] Generate config in production branch for environment production, namespace swh...
[swh] Generate config in production branch for environment production, namespace swh-cassandra...
[swh] Generate config in production branch for environment production, namespace swh-cassandra-next-version...
[swh] Generate config in staging_afn_emptydir branch for environment production...
[swh] Generate config in staging_afn_emptydir branch for environment production...
[swh] Generate config in staging_afn_emptydir branch for environment production...
------------- diff for environment staging namespace swh -------------
_ __ __
_| |_ _ / _|/ _| between /tmp/swh-chart.swh.yNa0WNdX/staging-swh.before, 141 documents
/ _' | | | | |_| |_ and /tmp/swh-chart.swh.yNa0WNdX/staging-swh.after, 141 documents
| (_| | |_| | _| _|
\__,_|\__, |_| |_| returned no differences
|___/
------------- diff for environment staging namespace swh-cassandra -------------
_ __ __
_| |_ _ / _|/ _| between /tmp/swh-chart.swh.yNa0WNdX/staging-swh-cassandra.before, 459 documents
/ _' | | | | |_| |_ and /tmp/swh-chart.swh.yNa0WNdX/staging-swh-cassandra.after, 459 documents
| (_| | |_| | _| _|
\__,_|\__, |_| |_| returned two differences
|___/
spec.template.spec.containers.loaders.resources (apps/v1/Deployment/swh-cassandra/loader-add-forge-now)
+ one map entry added:
limits:
memory: 2Gi
spec.template.spec.volumes.localstorage (apps/v1/Deployment/swh-cassandra/loader-add-forge-now)
- one map entry removed: + one map entry added:
ephemeral: emptyDir:
volumeClaimTemplate: medium: Memory
metadata: sizeLimit: 2Gi
labels:
type: ephemeral-volume
spec:
resources:
requests:
storage: 100Gi
storageClassName: local-path
accessModes:
- ReadWriteOnce
------------- diff for environment staging namespace swh-cassandra-next-version -------------
_ __ __
_| |_ _ / _|/ _| between /tmp/swh-chart.swh.yNa0WNdX/staging-swh-cassandra-next-version.before, 370 documents
/ _' | | | | |_| |_ and /tmp/swh-chart.swh.yNa0WNdX/staging-swh-cassandra-next-version.after, 370 documents
| (_| | |_| | _| _|
\__,_|\__, |_| |_| returned no differences
|___/
------------- diff for environment production namespace swh -------------
_ __ __
_| |_ _ / _|/ _| between /tmp/swh-chart.swh.yNa0WNdX/production-swh.before, 154 documents
/ _' | | | | |_| |_ and /tmp/swh-chart.swh.yNa0WNdX/production-swh.after, 154 documents
| (_| | |_| | _| _|
\__,_|\__, |_| |_| returned no differences
|___/
------------- diff for environment production namespace swh-cassandra -------------
_ __ __
_| |_ _ / _|/ _| between /tmp/swh-chart.swh.yNa0WNdX/production-swh-cassandra.before, 481 documents
/ _' | | | | |_| |_ and /tmp/swh-chart.swh.yNa0WNdX/production-swh-cassandra.after, 481 documents
| (_| | |_| | _| _|
\__,_|\__, |_| |_| returned no differences
|___/
Filling a tmp disk
root@test-emptydir-76df847d79-hlvx6:~# df -hT /tmp
Filesystem Type Size Used Avail Use% Mounted on
tmpfs tmpfs 256M 7.0M 250M 3% /tmp
root@test-emptydir-76df847d79-hlvx6:~# wget -P /tmp https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-12.8.0-amd64-netinst.iso
--2024-11-13 11:27:56-- https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-12.8.0-amd64-netinst.iso
Resolving cdimage.debian.org (cdimage.debian.org)... 194.71.11.173, 194.71.11.163, 2001:6b0:19::163, ...
Connecting to cdimage.debian.org (cdimage.debian.org)|194.71.11.173|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://chuangtzu.ftp.acc.umu.se/debian-cd/current/amd64/iso-cd/debian-12.8.0-amd64-netinst.iso [following]
--2024-11-13 11:27:57-- https://chuangtzu.ftp.acc.umu.se/debian-cd/current/amd64/iso-cd/debian-12.8.0-amd64-netinst.iso
Resolving chuangtzu.ftp.acc.umu.se (chuangtzu.ftp.acc.umu.se)... 194.71.11.167, 2001:6b0:19::167
Connecting to chuangtzu.ftp.acc.umu.se (chuangtzu.ftp.acc.umu.se)|194.71.11.167|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 661651456 (631M) [application/x-iso9660-image]
Saving to: '/tmp/debian-12.8.0-amd64-netinst.iso'
debian-12.8.0-amd64-netinst.iso 39%[==========================================================> ] 249.07M 32.0MB/s in 7.9s
Cannot write to '/tmp/debian-12.8.0-amd64-netinst.iso' (No space left on device).
root@test-emptydir-76df847d79-hlvx6:~# df -hT /tmp
Filesystem Type Size Used Avail Use% Mounted on
tmpfs tmpfs 256M 256M 0 100% /tmp
Edited by Guillaume Samson