From bd6eefd912db3649caac9c2c80a2ef44206288a5 Mon Sep 17 00:00:00 2001 From: Jelle Dijkstra Date: Thu, 19 Jun 2025 11:45:07 +0200 Subject: [PATCH] Fix for missing download-list var --- .../controller/blobdownload/gpkg_download.sh | 18 ++++++++++-------- .../expected/configmap-init-scripts.yaml | 2 +- .../wfs/complete/expected/deployment.yaml | 2 +- .../expected/configmap-init-scripts.yaml | 2 +- .../wfs/minimal/expected/deployment.yaml | 2 +- .../expected/configmap-init-scripts.yaml | 2 +- .../wms/complete/expected/deployment.yaml | 2 +- .../expected/configmap-init-scripts.yaml | 2 +- .../custom-mapfile/expected/deployment.yaml | 2 +- .../expected/configmap-init-scripts.yaml | 2 +- .../wms/minimal/expected/deployment.yaml | 2 +- .../expected/configmap-init-scripts.yaml | 2 +- .../wms/patches/expected/deployment.yaml | 2 +- 13 files changed, 22 insertions(+), 20 deletions(-) diff --git a/internal/controller/blobdownload/gpkg_download.sh b/internal/controller/blobdownload/gpkg_download.sh index 8d036a0..a7bdef4 100644 --- a/internal/controller/blobdownload/gpkg_download.sh +++ b/internal/controller/blobdownload/gpkg_download.sh @@ -117,14 +117,16 @@ function download_all() { # Download all geopackages from GEOPACKAGE_DOWNLOAD_LIST # Example: GEOPACKAGE_DOWNLOAD_LIST=path/1/file.gpkg;path/3/other_file.gpkg - gpkgs=(${GEOPACKAGE_DOWNLOAD_LIST//;/ }) - for gpkg_path in "${gpkgs[@]}" - do - filename=$(basename $gpkg_path) - download $gpkg_path $filename - done - - echo msg=\"All GeoPackages downloaded\" total_time_seconds=$(expr $(date '+%s') - $start_time) + if [ -n "$GEOPACKAGE_DOWNLOAD_LIST" ]; then + gpkgs=(${GEOPACKAGE_DOWNLOAD_LIST//;/ }) + for gpkg_path in "${gpkgs[@]}" + do + filename=$(basename $gpkg_path) + download $gpkg_path $filename + done + + echo msg=\"All GeoPackages downloaded\" total_time_seconds=$(expr $(date '+%s') - $start_time) + fi } function rm_file_and_exit() { diff --git a/internal/controller/test_data/wfs/complete/expected/configmap-init-scripts.yaml b/internal/controller/test_data/wfs/complete/expected/configmap-init-scripts.yaml index ad70452..83e8b6c 100644 --- a/internal/controller/test_data/wfs/complete/expected/configmap-init-scripts.yaml +++ b/internal/controller/test_data/wfs/complete/expected/configmap-init-scripts.yaml @@ -179,7 +179,7 @@ metadata: service-type: wfs service-version: v1_0 theme: theme - name: complete-wfs-init-scripts-fft29bbtdd + name: complete-wfs-init-scripts-dcmbkf564h namespace: default ownerReferences: - apiVersion: pdok.nl/v3 diff --git a/internal/controller/test_data/wfs/complete/expected/deployment.yaml b/internal/controller/test_data/wfs/complete/expected/deployment.yaml index cbae2df..9275d98 100644 --- a/internal/controller/test_data/wfs/complete/expected/deployment.yaml +++ b/internal/controller/test_data/wfs/complete/expected/deployment.yaml @@ -258,7 +258,7 @@ spec: name: mapserver - configMap: defaultMode: 511 - name: complete-wfs-init-scripts-fft29bbtdd + name: complete-wfs-init-scripts-dcmbkf564h name: init-scripts - configMap: name: complete-wfs-capabilities-generator-g7fh2dbt4m diff --git a/internal/controller/test_data/wfs/minimal/expected/configmap-init-scripts.yaml b/internal/controller/test_data/wfs/minimal/expected/configmap-init-scripts.yaml index 3563e0f..243426f 100644 --- a/internal/controller/test_data/wfs/minimal/expected/configmap-init-scripts.yaml +++ b/internal/controller/test_data/wfs/minimal/expected/configmap-init-scripts.yaml @@ -11,7 +11,7 @@ metadata: pdok.nl/inspire: 'false' service-type: wfs service-version: v1_0 - name: minimal-wfs-init-scripts-fft29bbtdd + name: minimal-wfs-init-scripts-dcmbkf564h namespace: default ownerReferences: - apiVersion: pdok.nl/v3 diff --git a/internal/controller/test_data/wfs/minimal/expected/deployment.yaml b/internal/controller/test_data/wfs/minimal/expected/deployment.yaml index ce7277d..5852310 100644 --- a/internal/controller/test_data/wfs/minimal/expected/deployment.yaml +++ b/internal/controller/test_data/wfs/minimal/expected/deployment.yaml @@ -241,7 +241,7 @@ spec: name: mapserver - configMap: defaultMode: 511 - name: minimal-wfs-init-scripts-fft29bbtdd + name: minimal-wfs-init-scripts-dcmbkf564h name: init-scripts - configMap: name: minimal-wfs-capabilities-generator-m46924mtk7 diff --git a/internal/controller/test_data/wms/complete/expected/configmap-init-scripts.yaml b/internal/controller/test_data/wms/complete/expected/configmap-init-scripts.yaml index 51abcc2..e0f5971 100644 --- a/internal/controller/test_data/wms/complete/expected/configmap-init-scripts.yaml +++ b/internal/controller/test_data/wms/complete/expected/configmap-init-scripts.yaml @@ -179,7 +179,7 @@ metadata: service-type: wms service-version: v1_0 theme: "2016" - name: complete-wms-init-scripts-fft29bbtdd + name: complete-wms-init-scripts-dcmbkf564h namespace: default ownerReferences: - apiVersion: pdok.nl/v3 diff --git a/internal/controller/test_data/wms/complete/expected/deployment.yaml b/internal/controller/test_data/wms/complete/expected/deployment.yaml index cb0d145..ce0d8ad 100644 --- a/internal/controller/test_data/wms/complete/expected/deployment.yaml +++ b/internal/controller/test_data/wms/complete/expected/deployment.yaml @@ -375,7 +375,7 @@ spec: name: ogc-webservice-proxy-config - configMap: defaultMode: 511 - name: complete-wms-init-scripts-fft29bbtdd + name: complete-wms-init-scripts-dcmbkf564h name: init-scripts - configMap: name: complete-wms-capabilities-generator-ccc59c7dhm diff --git a/internal/controller/test_data/wms/custom-mapfile/expected/configmap-init-scripts.yaml b/internal/controller/test_data/wms/custom-mapfile/expected/configmap-init-scripts.yaml index bb9ca94..ff54d76 100644 --- a/internal/controller/test_data/wms/custom-mapfile/expected/configmap-init-scripts.yaml +++ b/internal/controller/test_data/wms/custom-mapfile/expected/configmap-init-scripts.yaml @@ -178,7 +178,7 @@ metadata: pdok.nl/inspire: "false" service-type: wms service-version: v1_0 - name: custom-mapfile-wms-init-scripts-fft29bbtdd + name: custom-mapfile-wms-init-scripts-dcmbkf564h namespace: default ownerReferences: - apiVersion: pdok.nl/v3 diff --git a/internal/controller/test_data/wms/custom-mapfile/expected/deployment.yaml b/internal/controller/test_data/wms/custom-mapfile/expected/deployment.yaml index 5550662..6e1eb97 100644 --- a/internal/controller/test_data/wms/custom-mapfile/expected/deployment.yaml +++ b/internal/controller/test_data/wms/custom-mapfile/expected/deployment.yaml @@ -325,7 +325,7 @@ spec: name: ogc-webservice-proxy-config - configMap: defaultMode: 511 - name: custom-mapfile-wms-init-scripts-fft29bbtdd + name: custom-mapfile-wms-init-scripts-dcmbkf564h name: init-scripts - configMap: name: custom-mapfile-wms-capabilities-generator-fbhc96kd2b diff --git a/internal/controller/test_data/wms/minimal/expected/configmap-init-scripts.yaml b/internal/controller/test_data/wms/minimal/expected/configmap-init-scripts.yaml index 377c8d4..a43cb17 100644 --- a/internal/controller/test_data/wms/minimal/expected/configmap-init-scripts.yaml +++ b/internal/controller/test_data/wms/minimal/expected/configmap-init-scripts.yaml @@ -178,7 +178,7 @@ metadata: pdok.nl/inspire: "false" service-type: wms service-version: v1_0 - name: minimal-wms-init-scripts-fft29bbtdd + name: minimal-wms-init-scripts-dcmbkf564h namespace: default ownerReferences: - apiVersion: pdok.nl/v3 diff --git a/internal/controller/test_data/wms/minimal/expected/deployment.yaml b/internal/controller/test_data/wms/minimal/expected/deployment.yaml index 418ae6e..572c071 100644 --- a/internal/controller/test_data/wms/minimal/expected/deployment.yaml +++ b/internal/controller/test_data/wms/minimal/expected/deployment.yaml @@ -339,7 +339,7 @@ spec: name: ogc-webservice-proxy-config - configMap: defaultMode: 511 - name: minimal-wms-init-scripts-fft29bbtdd + name: minimal-wms-init-scripts-dcmbkf564h name: init-scripts - configMap: name: minimal-wms-capabilities-generator-fbhc96kd2b diff --git a/internal/controller/test_data/wms/patches/expected/configmap-init-scripts.yaml b/internal/controller/test_data/wms/patches/expected/configmap-init-scripts.yaml index 8465891..5b71547 100644 --- a/internal/controller/test_data/wms/patches/expected/configmap-init-scripts.yaml +++ b/internal/controller/test_data/wms/patches/expected/configmap-init-scripts.yaml @@ -178,7 +178,7 @@ metadata: pdok.nl/inspire: "false" service-type: wms service-version: v1_0 - name: patches-wms-init-scripts-fft29bbtdd + name: patches-wms-init-scripts-dcmbkf564h namespace: default ownerReferences: - apiVersion: pdok.nl/v3 diff --git a/internal/controller/test_data/wms/patches/expected/deployment.yaml b/internal/controller/test_data/wms/patches/expected/deployment.yaml index a99ada6..688b7f6 100644 --- a/internal/controller/test_data/wms/patches/expected/deployment.yaml +++ b/internal/controller/test_data/wms/patches/expected/deployment.yaml @@ -346,7 +346,7 @@ spec: name: ogc-webservice-proxy-config - configMap: defaultMode: 511 - name: patches-wms-init-scripts-fft29bbtdd + name: patches-wms-init-scripts-dcmbkf564h name: init-scripts - configMap: name: patches-wms-capabilities-generator-hbgd5m652m