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:
parent
ad59831751
commit
e5c665f118
2 changed files with 3 additions and 3 deletions
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue