From e5c665f1188bd72c36c2d9650fdf995c5bfc03ac Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Mon, 6 Nov 2023 16:55:37 +0100 Subject: [PATCH] Remove empty . (#1611) * refactor(efs-cleaner): Change alpine image to debian for coreutils Logging deleted file Signed-off-by: rjshrjndrn * refactor(chalice): return connection string without empty . Signed-off-by: rjshrjndrn --------- Signed-off-by: rjshrjndrn --- api/chalicelib/core/health.py | 2 +- .../openreplay/charts/utilities/templates/efs-cron.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/chalicelib/core/health.py b/api/chalicelib/core/health.py index 8066e2409..82f307444 100644 --- a/api/chalicelib/core/health.py +++ b/api/chalicelib/core/health.py @@ -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 = { diff --git a/scripts/helmcharts/openreplay/charts/utilities/templates/efs-cron.yaml b/scripts/helmcharts/openreplay/charts/utilities/templates/efs-cron.yaml index a2a6967ca..454ce848e 100644 --- a/scripts/helmcharts/openreplay/charts/utilities/templates/efs-cron.yaml +++ b/scripts/helmcharts/openreplay/charts/utilities/templates/efs-cron.yaml @@ -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"