diff --git a/chart/Chart.yaml b/chart/Chart.yaml index 039c650..eea220c 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -16,8 +16,8 @@ apiVersion: v2 name: dnation-kubernetes-jsonnet-translator type: application -version: 1.0.2 -appVersion: 1.0.2 +version: 1.0.3 +appVersion: 1.0.3 description: dNation Translator is a simple container for translating jsonnet content stored in k8s configmaps to **grafana dashboards** or **prometheus rules**. keywords: - jsonnet diff --git a/docker/Dockerfile b/docker/Dockerfile index ef0b578..d2356c1 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -15,7 +15,7 @@ RUN pip3 install /app FROM python:3.8-slim -LABEL Version="1.0.2" +LABEL Version="1.0.3" LABEL Vendor="dNation" LABEL Description="Container generates json resources from jsonnet resources (grafana dashboards, prometheus rules)" diff --git a/translator/main.py b/translator/main.py index 13b5fd8..bf20cc7 100644 --- a/translator/main.py +++ b/translator/main.py @@ -222,6 +222,11 @@ def delete_generated_resources(args_): Returns: None """ + try: + config.load_kube_config() + except config.config_exception.ConfigException: + config.load_incluster_config() + coa = client.CustomObjectsApi() v1 = client.CoreV1Api()