diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index c660f1611..739cb64c5 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/checkout@v6 - name: Install Dagger - uses: dagger/dagger-for-github@v8.2.0 + uses: dagger/dagger-for-github@v8.4.0 with: version: "latest" - name: Copy .bin-env @@ -35,7 +35,7 @@ jobs: steps: - uses: actions/checkout@v6 - name: Install Dagger - uses: dagger/dagger-for-github@v8.2.0 + uses: dagger/dagger-for-github@v8.4.0 with: version: "latest" - name: Build service images diff --git a/.github/workflows/push-dev-containers.yml b/.github/workflows/push-dev-containers.yml index 71eda2f5f..aadd78fa4 100644 --- a/.github/workflows/push-dev-containers.yml +++ b/.github/workflows/push-dev-containers.yml @@ -13,7 +13,7 @@ jobs: steps: - uses: actions/checkout@v6 - name: Install Dagger - uses: dagger/dagger-for-github@v8.2.0 + uses: dagger/dagger-for-github@v8.4.0 with: version: "latest" - name: Docker login diff --git a/.github/workflows/push-latest-containers.yml b/.github/workflows/push-latest-containers.yml index 749b8dc4e..68f51c86f 100644 --- a/.github/workflows/push-latest-containers.yml +++ b/.github/workflows/push-latest-containers.yml @@ -14,7 +14,7 @@ jobs: steps: - uses: actions/checkout@v6 - name: Install Dagger - uses: dagger/dagger-for-github@v8.2.0 + uses: dagger/dagger-for-github@v8.4.0 with: version: "latest" - name: Docker login diff --git a/bin/k8s-generate b/bin/k8s-generate index f26848874..422f5da89 100755 --- a/bin/k8s-generate +++ b/bin/k8s-generate @@ -36,14 +36,21 @@ export HEADWAY_DATA_TAG export HEADWAY_CONTAINER_TAG="${HEADWAY_CONTAINER_TAG:-latest}" source bin/_source-env.sh "$CONFIG_DIR" +set -a source ".bin-env" +set +a +EXISTING_DEPLOYMENT_CONFIG="${OUTPUT_DIR}/deployment-config.yaml" PELIAS_CONFIG_FILE="data/${HEADWAY_AREA}/${HEADWAY_AREA}.pelias.json" -if [ ! -f "$PELIAS_CONFIG_FILE" ]; then - echo "Missing pelias config file: ${PELIAS_CONFIG_FILE}" +if [ -f "$PELIAS_CONFIG_FILE" ]; then + PELIAS_CONFIG_JSON=$(cat $PELIAS_CONFIG_FILE) +elif [ -f "$EXISTING_DEPLOYMENT_CONFIG" ]; then + echo "Warning: ${PELIAS_CONFIG_FILE} not found; extracting pelias config from existing ${EXISTING_DEPLOYMENT_CONFIG}" + PELIAS_CONFIG_JSON=$(python3 -c "import yaml, sys; d=yaml.safe_load(sys.stdin); print(d['data']['pelias-config-json'], end='')" < "$EXISTING_DEPLOYMENT_CONFIG") +else + echo "Missing pelias config file: ${PELIAS_CONFIG_FILE} and no existing rendered output to fall back on" exit 1 fi -PELIAS_CONFIG_JSON=$(cat $PELIAS_CONFIG_FILE) indent4() { while IFS= read -r line; do printf ' %s\n' "$line"; done; } export PELIAS_CONFIG_JSON_YAML="| @@ -128,4 +135,3 @@ do render_template $file done - diff --git a/k8s/_template/tileserver-deployment.yaml.tpl b/k8s/_template/tileserver-deployment.yaml.tpl index ee8736a59..b8f53dcf3 100644 --- a/k8s/_template/tileserver-deployment.yaml.tpl +++ b/k8s/_template/tileserver-deployment.yaml.tpl @@ -60,9 +60,9 @@ spec: value: "8000" resources: limits: - memory: 500Mi + memory: 1500Mi requests: - memory: 200Mi + memory: 250Mi livenessProbe: httpGet: path: / diff --git a/k8s/configs/planet-dev/tileserver-deployment.yaml b/k8s/configs/planet-dev/tileserver-deployment.yaml index f23cb4f52..b8a3b4940 100644 --- a/k8s/configs/planet-dev/tileserver-deployment.yaml +++ b/k8s/configs/planet-dev/tileserver-deployment.yaml @@ -60,9 +60,9 @@ spec: value: "8000" resources: limits: - memory: 500Mi + memory: 1500Mi requests: - memory: 200Mi + memory: 250Mi livenessProbe: httpGet: path: / diff --git a/k8s/configs/planet/tileserver-deployment.yaml b/k8s/configs/planet/tileserver-deployment.yaml index 31bf243c5..15954e791 100644 --- a/k8s/configs/planet/tileserver-deployment.yaml +++ b/k8s/configs/planet/tileserver-deployment.yaml @@ -60,9 +60,9 @@ spec: value: "8000" resources: limits: - memory: 500Mi + memory: 1500Mi requests: - memory: 200Mi + memory: 250Mi livenessProbe: httpGet: path: / diff --git a/k8s/configs/seattle-dev/tileserver-deployment.yaml b/k8s/configs/seattle-dev/tileserver-deployment.yaml index f23cb4f52..b8a3b4940 100644 --- a/k8s/configs/seattle-dev/tileserver-deployment.yaml +++ b/k8s/configs/seattle-dev/tileserver-deployment.yaml @@ -60,9 +60,9 @@ spec: value: "8000" resources: limits: - memory: 500Mi + memory: 1500Mi requests: - memory: 200Mi + memory: 250Mi livenessProbe: httpGet: path: / diff --git a/services/tileserver/martin-config.yaml b/services/tileserver/martin-config.yaml index 94343a327..f805778dd 100644 --- a/services/tileserver/martin-config.yaml +++ b/services/tileserver/martin-config.yaml @@ -1,3 +1,4 @@ +cache_size_mb: 1024 pmtiles: sources: areamap: /data/tiles/areamap.pmtiles diff --git a/services/tileserver/martin-dev-config.yaml b/services/tileserver/martin-dev-config.yaml index 7016ca892..9483f769a 100644 --- a/services/tileserver/martin-dev-config.yaml +++ b/services/tileserver/martin-dev-config.yaml @@ -1,3 +1,4 @@ +cache_size_mb: 1024 pmtiles: sources: areamap: ../../data/Bogota/Bogota.pmtiles