Remove empty . (#1611)

* refactor(efs-cleaner): Change alpine image to debian for coreutils

Logging deleted file

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>

* refactor(chalice): return connection string without empty .

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>

---------

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
This commit is contained in:
Rajesh Rajendran 2023-11-06 16:55:37 +01:00 committed by GitHub
parent ad59831751
commit e5c665f118
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -11,7 +11,7 @@ from chalicelib.utils.TimeUTC import TimeUTC
def app_connection_string(name, port, path):
namespace = config("POD_NAMESPACE", default="app")
conn_string = config("CLUSTER_URL", default="svc.cluster.local")
return f"http://{name}.{namespace}.{conn_string}:{port}/{path}"
return f"http://{'.'.join(filter(None,[name,namespace,conn_string]))}:{port}/{path}"
HEALTH_ENDPOINTS = {

View file

@ -25,7 +25,7 @@ spec:
restartPolicy: Never
containers:
- name: efs-cleaner
image: alpine
image: debian:stable-slim
command:
- /bin/sh
- -c
@ -35,7 +35,7 @@ spec:
set -x
echo "Cleaning NFS strorage for data older than {{.Values.efsCleaner.retention}} days"
storage=`du -sh /mnt/efs`
find /mnt/efs -type f -mtime +{{.Values.efsCleaner.retention}} -delete
find /mnt/efs -type f -mtime +{{.Values.efsCleaner.retention}} -exec /bin/bash -c "ls -lah {}; rm {}" \;
echo "Storage before cleaning"
echo ${storage}
echo "Storage after cleaning"