From 3f3bd68eef8ad9054b96345b7ab486af1f516af7 Mon Sep 17 00:00:00 2001 From: Christoph Klingspor <45142009+cklingspor@users.noreply.github.com> Date: Thu, 7 Nov 2024 16:15:29 +0100 Subject: [PATCH] Fix/0.2.0 rc3 make image standalone (#20) * Added missing env var to example cronjob * Add two missing files to image, extend entrypoint to make image runable in standalone. --- Dockerfile | 5 +++-- examples/k8s_cron_job.yaml | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a8c625f..0b6cfd6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,8 +13,9 @@ COPY src/opencost_parquet_exporter.py /app/opencost_parquet_exporter.py COPY src/data_types.json /app/data_types.json COPY src/rename_cols.json /app/rename_cols.json COPY src/ignore_alloc_keys.json /app/ignore_alloc_keys.json +COPY src/storage_factory.py /app/storage_factory.py +COPY src/storage /app/storage RUN chmod 755 /app/opencost_parquet_exporter.py && chown -R opencost /app/ USER opencost ENV PATH="/app/.venv/bin:$PATH" -CMD ["/app/opencost_parquet_exporter.py"] -ENTRYPOINT ["/app/.venv/bin/python3"] +ENTRYPOINT ["/app/.venv/bin/python3", "/app/opencost_parquet_exporter.py"] diff --git a/examples/k8s_cron_job.yaml b/examples/k8s_cron_job.yaml index 8930c9d..9a51372 100644 --- a/examples/k8s_cron_job.yaml +++ b/examples/k8s_cron_job.yaml @@ -35,6 +35,8 @@ spec: value: opencost.opencost.svc.cluster.local. - name: OPENCOST_PARQUET_SVC_PORT value: "9003" + - name: OPENCOST_PARQUET_STORAGE_BACKEND + value: "[aws, azure]" image: ghcr.io/opencost/opencost-parquet-exporter:latest imagePullPolicy: Always name: export-opencost