diff --git a/.gitignore b/.gitignore index 57343a92..506eaf76 100644 --- a/.gitignore +++ b/.gitignore @@ -47,4 +47,5 @@ ohm/charts/ k3s.sh *.zip test-preview.sh -values.k3s.preview.yaml \ No newline at end of file +values.k3s.preview.yaml +tiler-preview.sh \ No newline at end of file diff --git a/images/tiler-imposm/config/layers/landuse_areas.json b/images/tiler-imposm/config/layers/landuse_areas.json index ff427e8e..c7d6e2ff 100644 --- a/images/tiler-imposm/config/layers/landuse_areas.json +++ b/images/tiler-imposm/config/layers/landuse_areas.json @@ -87,6 +87,18 @@ "exclude": [ "water" ] + }, + "golf": { + "mapping": { + "golf": [ + "green", + "bunker", + "fairway", + "rough", + "tee", + "driving_range" + ] + } } } } diff --git a/images/tiler-imposm/config/layers/landuse_points.json b/images/tiler-imposm/config/layers/landuse_points.json index 2374ebff..786a523f 100644 --- a/images/tiler-imposm/config/layers/landuse_points.json +++ b/images/tiler-imposm/config/layers/landuse_points.json @@ -79,6 +79,15 @@ "__any__" ] } + }, + "golf": { + "mapping": { + "golf": [ + "pin", + "hole", + "tee" + ] + } } } } diff --git a/images/tiler-imposm/config/layers/natural_lines.json b/images/tiler-imposm/config/layers/natural_lines.json new file mode 100644 index 00000000..90b60622 --- /dev/null +++ b/images/tiler-imposm/config/layers/natural_lines.json @@ -0,0 +1,63 @@ +{ + "tags": { + "load_all": true, + "exclude": [ + "created_by", + "source", + "source:datetime" + ] + }, + "generalized_tables": {}, + "tables": { + "natural_lines": { + "fields": [ + { + "type": "id", + "name": "osm_id", + "key": null + }, + { + "type": "geometry", + "name": "geometry", + "key": null + }, + { + "type": "string", + "name": "name", + "key": "name" + }, + { + "type": "mapping_value", + "name": "type", + "key": null + }, + { + "type": "mapping_key", + "name": "class", + "key": null + }, + { + "type": "string", + "name": "start_date", + "key": "start_date" + }, + { + "type": "string", + "name": "end_date", + "key": "end_date" + }, + { + "type": "hstore_tags", + "name": "tags", + "key": null + } + ], + "type": "linestring", + "mapping": { + "natural": [ + "cliff" + ] + } + } + } +} diff --git a/images/tiler-imposm/config/layers/water_lines.json b/images/tiler-imposm/config/layers/water_lines.json index 2604360e..217926d4 100644 --- a/images/tiler-imposm/config/layers/water_lines.json +++ b/images/tiler-imposm/config/layers/water_lines.json @@ -64,9 +64,6 @@ ], "barrier": [ "ditch" - ], - "natural": [ - "cliff" ] } } diff --git a/images/tiler-imposm/queries/ohm_mviews/buildings.sql b/images/tiler-imposm/queries/ohm_mviews/buildings.sql index 350b3721..823754b5 100644 --- a/images/tiler-imposm/queries/ohm_mviews/buildings.sql +++ b/images/tiler-imposm/queries/ohm_mviews/buildings.sql @@ -28,7 +28,8 @@ SELECT create_points_mview( 'FALSE::boolean AS hide_3d', 'NULL::text AS roof_material', 'NULL::text AS roof_colour', - 'NULL::text AS roof_shape' + 'NULL::text AS roof_shape', + 'NULLIF(tags->''golf'', '''') AS golf' ], NULL ); @@ -54,7 +55,8 @@ SELECT create_areas_mview( '(class = ''building:part'') AS is_building_part, EXISTS (SELECT 1 FROM osm_buildings_relation_members obrm WHERE obrm.member = ABS(osm_buildings.osm_id) AND obrm.role = ''outline'') AS hide_3d, render_height(height, building_height, building_levels) AS render_height, - render_min_height(min_height, building_min_level) AS render_min_height', + render_min_height(min_height, building_min_level) AS render_min_height, + NULLIF(tags->''golf'', '''') AS golf', '{"roof_height": "parse_to_meters(roof_height)"}'::jsonb, ARRAY['height', 'min_height', 'building_height', 'building_levels', 'building_min_level'] ); diff --git a/images/tiler-imposm/queries/ohm_mviews/natural_lines.sql b/images/tiler-imposm/queries/ohm_mviews/natural_lines.sql new file mode 100644 index 00000000..fd04e719 --- /dev/null +++ b/images/tiler-imposm/queries/ohm_mviews/natural_lines.sql @@ -0,0 +1,18 @@ +-- ============================================================================ +-- Natural Lines Materialized Views for Multiple Zoom Levels +-- Natural line features (natural=cliff, ...) split out of water_lines so they +-- are not tied to the water layer (issue #1345). Source table: osm_natural_lines. +-- The base type filter is kept explicit so new natural line types can be added +-- to the import without automatically showing up at every zoom. +-- ============================================================================ + +DROP MATERIALIZED VIEW IF EXISTS mv_natural_lines_z16_20 CASCADE; + +SELECT create_lines_mview('osm_natural_lines', 'mv_natural_lines_z16_20', 0, 0, 'id, osm_id, type', 'type IN (''cliff'')'); +SELECT create_mview_line_from_mview('mv_natural_lines_z16_20', 'mv_natural_lines_z13_15', 5, 'type IN (''cliff'')'); +SELECT create_mview_line_from_mview('mv_natural_lines_z13_15', 'mv_natural_lines_z10_12', 20, 'type IN (''cliff'')'); + +-- Refresh lines views +-- REFRESH MATERIALIZED VIEW CONCURRENTLY mv_natural_lines_z16_20; +-- REFRESH MATERIALIZED VIEW CONCURRENTLY mv_natural_lines_z13_15; +-- REFRESH MATERIALIZED VIEW CONCURRENTLY mv_natural_lines_z10_12; diff --git a/images/tiler-imposm/queries/ohm_mviews/places.sql b/images/tiler-imposm/queries/ohm_mviews/places.sql index 5091f060..f0949dcb 100644 --- a/images/tiler-imposm/queries/ohm_mviews/places.sql +++ b/images/tiler-imposm/queries/ohm_mviews/places.sql @@ -195,7 +195,7 @@ SELECT create_place_points_centroids_mview ( SELECT create_place_points_centroids_mview ( 'mv_place_points_centroids_z11_20', - ARRAY ['plot', 'square', 'islet'], + ARRAY ['plot', 'square', 'islet', 'island'], ARRAY ['state', 'province', 'region', 'county', 'municipality', 'city', 'town', 'village', 'suburb', 'locality', 'hamlet', 'islet', 'neighbourhood', 'district', 'borough', 'quarter', 'isolated_dwelling', 'farm'] ); @@ -204,7 +204,7 @@ SELECT create_place_points_centroids_mview ( -- ============================================================================ SELECT create_place_areas_mview( 'mv_place_areas_z14_20', - ARRAY['plot', 'square', 'islet'] + ARRAY['plot', 'square', 'islet', 'island'] ); -- Refresh centroids views diff --git a/images/tiler-imposm/queries/ohm_mviews/routes_01_merge_by_date.sql b/images/tiler-imposm/queries/ohm_mviews/routes_01_merge_by_date.sql index 9073b182..df180065 100644 --- a/images/tiler-imposm/queries/ohm_mviews/routes_01_merge_by_date.sql +++ b/images/tiler-imposm/queries/ohm_mviews/routes_01_merge_by_date.sql @@ -95,16 +95,14 @@ SELECT log_notice('STEP 3: Backfill for osm_route_multilines'); SET statement_timeout = 2400000; UPDATE osm_route_multilines SET start_decdate = isodatetodecimaldate(pad_date(start_date::TEXT, 'start')::TEXT, FALSE), - end_decdate = isodatetodecimaldate(pad_date(end_date::TEXT, 'end')::TEXT, FALSE) -WHERE ST_GeometryType(geometry) IN ('ST_LineString', 'ST_MultiLineString'); + end_decdate = isodatetodecimaldate(pad_date(end_date::TEXT, 'end')::TEXT, FALSE); --- osm_route_lines SET statement_timeout = 2400000; UPDATE osm_route_lines SET start_decdate = isodatetodecimaldate(pad_date(start_date::TEXT, 'start')::TEXT, FALSE), - end_decdate = isodatetodecimaldate(pad_date(end_date::TEXT, 'end')::TEXT, FALSE) -WHERE ST_GeometryType(geometry) IN ('ST_LineString', 'ST_MultiLineString'); + end_decdate = isodatetodecimaldate(pad_date(end_date::TEXT, 'end')::TEXT, FALSE); -- ============================================================================ -- STEP 4: Create Materialized View for merged routes per continuous temporal range @@ -124,6 +122,12 @@ WITH union_sources AS ( me_highway AS highway FROM osm_route_multilines WHERE geometry IS NOT NULL + -- Fail-safe: drop rows whose date is present but invalid (text exists but did not + -- parse to a decimal date). An absent date stays NULL and keeps its unbounded + -- meaning; an invalid date would otherwise become unbounded and render the route + -- across all time (see issues #1369 / #1362). Hide it until the data is fixed. + AND NOT (COALESCE(start_date, '') <> '' AND start_decdate IS NULL) + AND NOT (COALESCE(end_date, '') <> '' AND end_decdate IS NULL) UNION ALL @@ -136,6 +140,9 @@ WITH union_sources AS ( highway FROM osm_route_lines WHERE geometry IS NOT NULL + -- Fail-safe: drop rows whose date is present but invalid (see multi-lines branch above). + AND NOT (COALESCE(start_date, '') <> '' AND start_decdate IS NULL) + AND NOT (COALESCE(end_date, '') <> '' AND end_decdate IS NULL) ), -- CTE to identify ways that DO have at least one date ways_with_dates AS ( diff --git a/images/tiler-imposm/queries/ohm_mviews/transport_lines.sql b/images/tiler-imposm/queries/ohm_mviews/transport_lines.sql index e8ab7942..51b924aa 100644 --- a/images/tiler-imposm/queries/ohm_mviews/transport_lines.sql +++ b/images/tiler-imposm/queries/ohm_mviews/transport_lines.sql @@ -215,6 +215,7 @@ BEGIN ELSE type END AS type, NULLIF(tags->'construction', '') AS construction, + NULLIF(tags->'golf', '') AS golf, class, NULLIF(name, '') AS name, NULLIF(tunnel, 0) AS tunnel, @@ -262,6 +263,7 @@ BEGIN ELSE type END AS type, NULLIF(tags->'construction', '') AS construction, + NULLIF(tags->'golf', '') AS golf, class, NULLIF(name, '') AS name, NULLIF(tunnel, 0) AS tunnel, diff --git a/images/tiler-imposm/queries/ohm_mviews/water.sql b/images/tiler-imposm/queries/ohm_mviews/water.sql index ac7e764a..1b91d5a6 100644 --- a/images/tiler-imposm/queries/ohm_mviews/water.sql +++ b/images/tiler-imposm/queries/ohm_mviews/water.sql @@ -6,7 +6,7 @@ -- Delete existing views, in cascade DROP MATERIALIZED VIEW IF EXISTS mv_water_areas_z16_20 CASCADE; -SELECT create_areas_mview('osm_water_areas', 'mv_water_areas_z16_20', 0, 0, 'id, osm_id, type', NULL, NULL, NULL); +SELECT create_areas_mview('osm_water_areas', 'mv_water_areas_z16_20', 0, 0, 'id, osm_id, type', NULL, 'NULLIF(tags->''golf'', '''') AS golf', NULL); SELECT create_area_mview_from_mview('mv_water_areas_z16_20','mv_water_areas_z13_15',5,0.0,NULL); SELECT create_area_mview_from_mview('mv_water_areas_z13_15','mv_water_areas_z10_12',20,100, 'type IN (''water'',''pond'',''basin'',''canal'',''mill_pond'',''riverbank'')'); SELECT create_area_mview_from_mview('mv_water_areas_z10_12','mv_water_areas_z8_9',100,10000, NULL); @@ -27,9 +27,9 @@ select create_mview_centroid_from_mview('mv_water_areas_z8_9','mv_water_areas_ce -- Water lines Materialized Views for Multiple Zoom Levels -- ============================================================================ -SELECT create_lines_mview('osm_water_lines', 'mv_water_lines_z16_20', 0, 0, 'id, osm_id, type', 'type IN (''river'', ''canal'', ''cliff'', ''dam'', ''stream'', ''ditch'', ''drain'')'); -SELECT create_mview_line_from_mview('mv_water_lines_z16_20', 'mv_water_lines_z13_15', 5, 'type IN (''river'', ''canal'', ''cliff'', ''dam'', ''stream'')'); -SELECT create_mview_line_from_mview('mv_water_lines_z13_15', 'mv_water_lines_z10_12', 20, 'type IN (''river'', ''canal'', ''cliff'', ''dam'')'); +SELECT create_lines_mview('osm_water_lines', 'mv_water_lines_z16_20', 0, 0, 'id, osm_id, type', 'type IN (''river'', ''canal'', ''dam'', ''stream'', ''ditch'', ''drain'')'); +SELECT create_mview_line_from_mview('mv_water_lines_z16_20', 'mv_water_lines_z13_15', 5, 'type IN (''river'', ''canal'', ''dam'', ''stream'')'); +SELECT create_mview_line_from_mview('mv_water_lines_z13_15', 'mv_water_lines_z10_12', 20, 'type IN (''river'', ''canal'', ''dam'')'); SELECT create_mview_line_from_mview('mv_water_lines_z10_12', 'mv_water_lines_z8_9', 100, 'type IN (''river'', ''canal'')'); -- Refresh areas views diff --git a/images/tiler-imposm/scripts/create_mviews.sh b/images/tiler-imposm/scripts/create_mviews.sh index e1063267..eec48f41 100755 --- a/images/tiler-imposm/scripts/create_mviews.sh +++ b/images/tiler-imposm/scripts/create_mviews.sh @@ -85,6 +85,9 @@ execute_sql_file queries/ohm_mviews/transport_lines.sql execute_sql_file queries/ohm_mviews/water.sql +## natural lines (cliff, ...) — split out of water_lines (#1345) +execute_sql_file queries/ohm_mviews/natural_lines.sql + ## routes execute_sql_file queries/ohm_mviews/routes_01_merge_by_date.sql execute_sql_file queries/ohm_mviews/routes_02_indexed.sql diff --git a/images/tiler-imposm/scripts/refresh_mviews.sh b/images/tiler-imposm/scripts/refresh_mviews.sh index 824584a3..8c1355ac 100755 --- a/images/tiler-imposm/scripts/refresh_mviews.sh +++ b/images/tiler-imposm/scripts/refresh_mviews.sh @@ -228,6 +228,13 @@ water_views=( mv_water_lines_z8_9 ) +# natural lines (cliff, ...) — split out of water_lines (#1345) +natural_views=( + mv_natural_lines_z16_20 + mv_natural_lines_z13_15 + mv_natural_lines_z10_12 +) + buildings_views=( # areas mv_buildings_areas_z14_15 @@ -293,6 +300,7 @@ refresh_mviews_group "OTHERS" 180 light "${others_views[@]}" & refresh_mviews_group "COMMUNICATION" 180 light "${communication_views[@]}" & refresh_mviews_group "PLACES" 180 light "${places_views[@]}" & refresh_mviews_group "WATER" 180 light "${water_views[@]}" & +refresh_mviews_group "NATURAL" 180 light "${natural_views[@]}" & refresh_mviews_group "BUILDINGS" 180 light "${buildings_views[@]}" & refresh_mviews_group "ROUTES" 180 light "${routes_views[@]}" & refresh_mviews_group "NO_ADMIN_BOUNDARIES" 180 light "${no_admin_boundaries_views[@]}" & diff --git a/images/tiler-imposm/start.sh b/images/tiler-imposm/start.sh index 67170fa3..33f17742 100755 --- a/images/tiler-imposm/start.sh +++ b/images/tiler-imposm/start.sh @@ -125,6 +125,12 @@ function uploadExpiredFiles() { # Function to upload last state file function uploadLastState() { + # Skip when no bucket is configured (e.g. preview builds with empty + # AWS_S3_BUCKET). Without this, `aws s3 cp` runs with an empty target and + # fails every loop with "Invalid argument type". + if [ -z "$AWS_S3_BUCKET" ]; then + return + fi # Path to the last.state.txt file local state_file="$DIFF_DIR/last.state.txt" local s3_path="${AWS_S3_BUCKET}/${BUCKET_IMPOSM_FOLDER}/last.state.txt" diff --git a/images/tiler-monitor-pipeline/imposm_config_loader.py b/images/tiler-monitor-pipeline/imposm_config_loader.py index 1d85b0c3..2061bbc3 100644 --- a/images/tiler-monitor-pipeline/imposm_config_loader.py +++ b/images/tiler-monitor-pipeline/imposm_config_loader.py @@ -45,6 +45,7 @@ "osm_landuse_points": ["mv_landuse_points", "mv_landuse_points_centroids_z6_7", "mv_landuse_points_centroids_z16_20"], "osm_water_areas": ["mv_water_areas_z0_2", "mv_water_areas_z16_20", "mv_water_areas_centroids_z8_9", "mv_water_areas_centroids_z16_20"], "osm_water_lines": ["mv_water_lines_z8_9", "mv_water_lines_z16_20"], + "osm_natural_lines": ["mv_natural_lines_z10_12", "mv_natural_lines_z16_20"], "osm_other_areas": ["mv_other_areas_z8_9", "mv_other_areas_z16_20"], "osm_other_lines": ["mv_other_lines_z14_15", "mv_other_lines_z16_20"], "osm_other_points": ["mv_other_points", "mv_other_points_centroids_z8_9", "mv_other_points_centroids_z16_20"], diff --git a/images/tiler-monitor-pipeline/tables_config.json b/images/tiler-monitor-pipeline/tables_config.json index ef0c407f..dcd7fdaf 100644 --- a/images/tiler-monitor-pipeline/tables_config.json +++ b/images/tiler-monitor-pipeline/tables_config.json @@ -53,8 +53,8 @@ "views": ["mv_other_areas_z8_9", "mv_other_areas_z16_20", "mv_other_lines_z14_15", "mv_other_lines_z16_20", "mv_other_points", "mv_other_points_centroids_z8_9", "mv_other_points_centroids_z16_20"] }, "natural": { - "tables": ["osm_landuse_areas", "osm_landuse_lines", "osm_landuse_points", "osm_water_areas", "osm_water_lines"], - "views": ["mv_landuse_areas_z6_7", "mv_landuse_areas_z16_20", "mv_landuse_lines_z14_15", "mv_landuse_lines_z16_20", "mv_landuse_points", "mv_landuse_points_centroids_z6_7", "mv_landuse_points_centroids_z16_20", "mv_water_areas_z0_2", "mv_water_areas_z16_20", "mv_water_areas_centroids_z8_9", "mv_water_areas_centroids_z16_20", "mv_water_lines_z8_9", "mv_water_lines_z16_20"] + "tables": ["osm_landuse_areas", "osm_landuse_lines", "osm_landuse_points", "osm_water_areas", "osm_water_lines", "osm_natural_lines"], + "views": ["mv_landuse_areas_z6_7", "mv_landuse_areas_z16_20", "mv_landuse_lines_z14_15", "mv_landuse_lines_z16_20", "mv_landuse_points", "mv_landuse_points_centroids_z6_7", "mv_landuse_points_centroids_z16_20", "mv_water_areas_z0_2", "mv_water_areas_z16_20", "mv_water_areas_centroids_z8_9", "mv_water_areas_centroids_z16_20", "mv_water_lines_z8_9", "mv_water_lines_z16_20", "mv_natural_lines_z10_12", "mv_natural_lines_z16_20"] }, "place": { "tables": ["osm_place_areas", "osm_place_points"], diff --git a/images/tiler-server-martin/config/functions.json b/images/tiler-server-martin/config/functions.json index 52ff5d48..79ef1b78 100644 --- a/images/tiler-server-martin/config/functions.json +++ b/images/tiler-server-martin/config/functions.json @@ -104,6 +104,17 @@ [null, "mv_water_lines_z16_20"] ] }, + { + "function_name": "natural_lines", + "source_layer": "natural_lines", + "exclude_columns": ["geometry", "tags"], + "min_zoom": 10, + "zoom_mapping": [ + [12, "mv_natural_lines_z10_12"], + [15, "mv_natural_lines_z13_15"], + [null, "mv_natural_lines_z16_20"] + ] + }, { "function_name": "transport_areas", "source_layer": "transport_areas", diff --git a/ohm/requirements.yaml b/ohm/requirements.yaml index 1d8c400f..c5a7cbf1 100644 --- a/ohm/requirements.yaml +++ b/ohm/requirements.yaml @@ -1,4 +1,4 @@ dependencies: - name: osm-seed - version: '0.1.0-0.dev.git.1006.h3d2d82a' + version: '0.1.0-0.dev.git.998.h0ce62c6' repository: https://osm-seed.github.io/osm-seed-chart/ \ No newline at end of file diff --git a/values.k3s.preview-tiler.yaml b/values.k3s.preview-tiler.yaml new file mode 100644 index 00000000..f375d2fb --- /dev/null +++ b/values.k3s.preview-tiler.yaml @@ -0,0 +1,182 @@ +#osm-seed: + environment: staging + cloudProvider: k3s + serviceType: ClusterIP + createClusterIssuer: false + ingressClassName: "" + domain: ohmstaging.org + adminEmail: admin@openhistoricalmap.org + + # --- everything off except the tiler build chain --- + web: { enabled: false } + db: { enabled: false } + memcached: { enabled: false } + cgimap: { enabled: false } + fullHistory: { enabled: false } + changesetsDump: { enabled: false } + dbBackupRestore: { enabled: false } + planetDump: { enabled: false } + replicationJob: { enabled: false } + populateApidb: { enabled: false } + osmProcessor: { enabled: false } + tilerServer: { enabled: false } + tilerServerCacheCleaner: { enabled: false } + tilerCacheCleanerJob: { enabled: false } + tilerCache: { enabled: false } + tilerMonitorPipeline: { enabled: false } + tmDb: { enabled: false } + tmApi: { enabled: false } + osmSimpleMetrics: { enabled: false } + monitoringReplication: { enabled: false } + changesetReplicationJob: { enabled: false } + planetFiles: { enabled: false } + taginfoWeb: { enabled: false } + taginfoDataProcessor: { enabled: false } + nominatimUI: { enabled: false } + nominatimApi: { enabled: false } + overpassApi: { enabled: false } + osmchaWeb: { enabled: false } + osmchaApi: { enabled: false } + osmchaDb: { enabled: false } + osmxAdiffBuilder: { enabled: false } + planetStats: { enabled: false } + + # --- tiler build chain ON, on per-branch disks --- + tilerDb: + enabled: true + image: + name: ghcr.io/openhistoricalmap/tiler-db + tag: 0.0.1-0.dev.git.3389.h62b55811 + priorityClass: medium-priority + env: + POSTGRES_DB: tiler_osm_production + POSTGRES_USER: postgres + # injected at install time via --set from $POSTGRES_PASSWORD + POSTGRES_PASSWORD: "" + POSTGRES_PORT: 5432 + sharedMemorySize: 4Gi + # Without this the db runs on postgres defaults (128MB shared_buffers, 64MB + # maintenance_work_mem), which makes a full import + building ~50 mviews very + # slow. maintenance_work_mem is the big lever for mview/index creation. + postgresqlConfig: + enabled: true + values: | + listen_addresses = '*' + max_connections = 100 + shared_buffers = 16GB + work_mem = 512MB + maintenance_work_mem = 10GB + effective_cache_size = 32GB + max_wal_size = 24GB + min_wal_size = 2GB + random_page_cost = 1.0 + checkpoint_completion_target = 0.9 + dynamic_shared_memory_type = posix + effective_io_concurrency = 300 + datestyle = 'iso, mdy' + timezone = 'Etc/UTC' + default_text_search_config = 'pg_catalog.english' + # Disposable preview import DB: trade crash durability for import speed. + # synchronous_commit=off only risks losing the last few txns on a crash + # (no corruption). full_page_writes=off is the bigger win but can leave + # torn pages after a crash; safe here only because we rebuild from scratch. + synchronous_commit = off + full_page_writes = off + # Parallelism: sized to the 8-core node (freed after staging tiler is gone) + max_parallel_workers_per_gather = 4 + max_parallel_maintenance_workers = 4 + max_parallel_workers = 8 + max_worker_processes = 8 + persistenceDisk: + enabled: true + accessMode: ReadWriteOnce + mountPath: /var/lib/postgresql/data + subPath: postgresql-data + staticHostPath: true + localVolumeHostPath: /mnt/tiler-db-data-v2 + resources: + enabled: false + + tilerImposm: + enabled: true + image: + name: ghcr.io/openhistoricalmap/tiler-imposm + tag: 0.0.1-0.dev.git.3415.hb6a77ee2 + priorityClass: medium-priority + livenessProbe: + enabled: false + serviceAccount: + enabled: false + env: + TILER_IMPORT_FROM: osm + TILER_IMPORT_PBF_URL: https://s3.amazonaws.com/planet.openhistoricalmap.org/planet/planet-260704_0001.osm.pbf + REPLICATION_URL: http://s3.amazonaws.com/planet.openhistoricalmap.org/replication/minute/ + SEQUENCE_NUMBER: "1690000" + OVERWRITE_STATE: false + # preview must not write to the shared S3 expiry/language buckets + UPLOAD_EXPIRED_FILES: false + IMPORT_NATURAL_EARTH: true + IMPORT_OSM_LAND: true + IMPOSM3_IMPORT_LAYERS: "all" + CLOUDPROVIDER: aws + AWS_S3_BUCKET: "" + AWS_ACCESS_KEY_ID: "" + AWS_SECRET_ACCESS_KEY: "" + REFRESH_MVIEWS: true + RECREATE_MVIEWS_ON_UPDATE: true + STARTUP_GRACE_SECONDS: "86400" + persistenceDisk: + enabled: true + accessMode: ReadWriteOnce + mountPath: /mnt/data + staticHostPath: true + localVolumeHostPath: /mnt/tiler-imposm-data-v2 + resources: + enabled: true + nodeSelector: + enabled: false + nodeAffinity: + enabled: false + + tilerServerMartin: + enabled: false + image: + name: ghcr.io/openhistoricalmap/tiler-server-martin + tag: 0.0.1-0.dev.git.3413.hab2776d4 + priorityClass: medium-priority + replicaCount: 1 + # POSTGRES_* come from the tiler-db configmap (envFrom), so martin connects + # to the DB built by tilerImposm above. + env: + OHM_DOMAIN: preview-tiler.ohmstaging.org + MARTIN_WORKER_PROCESSES: 8 + MARTIN_POOL_SIZE: 10 + # empty bucket = skip the vtiles_languages.geojson upload to S3 + AWS_S3_BUCKET: "" + resources: + enabled: false + nodeSelector: + enabled: false + nodeAffinity: + enabled: false + + # Cache in front of martin (VCL backend = -tiler-server-martin). + # Serves tiles on port 6081 at /maps/ohm/{z}/{x}/{y}. Ingress stays off: + # reach it with a port-forward. Set ingress.enabled + hosts to expose it. + tilerVarnish: + enabled: false + ingress: + enabled: false + image: + name: varnish + tag: "7.5" + priorityClass: medium-priority + replicaCount: 1 + dynamicSize: "4G" + staticSize: "1G" + resources: + enabled: false + nodeSelector: + enabled: false + nodeAffinity: + enabled: false diff --git a/values.k3s.production.template.yaml b/values.k3s.production.template.yaml index f2580da7..231019c0 100644 --- a/values.k3s.production.template.yaml +++ b/values.k3s.production.template.yaml @@ -48,7 +48,7 @@ osm-seed: mountPath: /var/lib/postgresql/data subPath: postgresql-data staticHostPath: true - localVolumeHostPath: /mnt/tiler-db-data + localVolumeHostPath: /mnt/tiler-db-data-v2 resources: enabled: false postgresqlConfig: @@ -135,6 +135,8 @@ osm-seed: tilerImposm: enabled: true priorityClass: medium-priority + livenessProbe: + enabled: true serviceAccount: enabled: false env: @@ -158,7 +160,7 @@ osm-seed: accessMode: ReadWriteOnce mountPath: /mnt/data staticHostPath: true - localVolumeHostPath: /mnt/tiler-imposm-data + localVolumeHostPath: /mnt/tiler-imposm-data-v2 resources: enabled: true nodeSelector: diff --git a/values.k3s.staging.template.yaml b/values.k3s.staging.template.yaml index 2274f18f..3015e699 100644 --- a/values.k3s.staging.template.yaml +++ b/values.k3s.staging.template.yaml @@ -48,7 +48,7 @@ osm-seed: mountPath: /var/lib/postgresql/data subPath: postgresql-data staticHostPath: true - localVolumeHostPath: /mnt/tiler-db-data + localVolumeHostPath: /mnt/tiler-db-data-v2 resources: enabled: false postgresqlConfig: @@ -118,6 +118,8 @@ osm-seed: tilerImposm: enabled: true priorityClass: medium-priority + livenessProbe: + enabled: true serviceAccount: enabled: false env: @@ -141,7 +143,7 @@ osm-seed: accessMode: ReadWriteOnce mountPath: /mnt/data staticHostPath: true - localVolumeHostPath: /mnt/tiler-imposm-data + localVolumeHostPath: /mnt/tiler-imposm-data-v2 resources: enabled: true nodeSelector: