From 510d9f82e450fe2eaeee68e3c465f3acf4159520 Mon Sep 17 00:00:00 2001 From: Marcus Aspin Date: Mon, 30 Oct 2023 17:22:18 +0000 Subject: [PATCH] Keep container running --- tools/schema-spy/run.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/schema-spy/run.sh b/tools/schema-spy/run.sh index 59027ce802..e61545df2e 100755 --- a/tools/schema-spy/run.sh +++ b/tools/schema-spy/run.sh @@ -10,7 +10,7 @@ trap delete_pod SIGTERM SIGINT # Start pod kubectl run "$pod_name" \ --image=schemaspy/schemaspy:6.2.4 \ - --restart=Never --stdin=true --tty=true --rm \ + --restart=Never --stdin=true --tty=true \ --overrides='{ "spec": { "containers": [ @@ -37,4 +37,7 @@ includes='^(^Z.*$|^.*[0-9]$|^PRF_.*$|^PERF_.*$|^MIS_.*$|^.*_MV$|^.*\\$.*$|^.*TRA kubectl exec "$pod_name" -- /usr/local/bin/schemaspy -db "${DB}" -host "${HOST}" -port "${PORT}" -s "${SCHEMA}" -u "${USERNAME}" -p "${PASSWORD}" -cat "${SCHEMA}" -t orathin-service -I "$includes" -vizjs # Download report -kubectl cp "$pod_name:/output" schema-spy-report \ No newline at end of file +kubectl cp "$pod_name:/output" schema-spy-report + +# Clean up +delete_pod \ No newline at end of file