EOX GitLab Instance

Skip to content
Snippets Groups Projects

add option for extra cache and overlayLayers with source as full layer without time dimension

Merged Lubomir Dolezal requested to merge cache_extra into main
3 files
+ 38
12
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -58,7 +58,7 @@
{{- if .Values.global.storage.cache.type }}
{{ if eq .Values.global.storage.cache.type "swift" }}
<cache name={{ .Values.global.storage.cache.name | default "cache" | quote }} type="swift">
<cache name="cache" type="swift">
<auth_url>{{ .Values.global.storage.cache.auth_url_short }}</auth_url>
<auth_version>{{ .Values.global.storage.cache.auth_version }}</auth_version>
<tenant>{{ .Values.global.storage.cache.project_id }}</tenant>
@@ -93,20 +93,18 @@
{{- if .Values.global.storage.cache_extra }}
{{- if .Values.global.storage.cache_extra.type }}
{{ if eq .Values.global.storage.cache_extra.type "swift" }}
<cache name={{ .Values.global.storage.cache_extra.name | default "cache" | quote }} type="swift">
<cache name="cache_extra" type="swift">
<auth_url>{{ .Values.global.storage.cache_extra.auth_url_short }}</auth_url>
<auth_version>{{ .Values.global.storage.cache_extra.auth_version }}</auth_version>
<tenant>{{ .Values.global.storage.cache_extra.project_id }}</tenant>
<username>{{ .Values.global.storage.cache_extra.username }}</username>
<password>{{ .Values.global.storage.cache_extra.password }}</password>
<container>{{ .Values.global.storage.cache_extra.container }}</container>
{{- if .Values.config_extra.key }}
<key>{{ .Values.config_extra.key }}</key>
{{- end }}
<key>{{ .Values.config.cache_extra_key }}</key>
</cache>
{{- else if eq .Values.global.storage.cache_extra.type "S3" }}
<cache name="cache" type="s3">
<url>{{ .Values.global.storage.cache_extra.endpoint_url }}{{ .Values.config.key }}</url>
<cache name="cache_extra" type="s3">
<url>{{ .Values.global.storage.cache_extra.endpoint_url }}{{ .Values.config.cache_extra_key }}</url>
<headers>
<Host>{{ .Values.global.storage.cache_extra.host }}</Host>
</headers>
@@ -117,13 +115,13 @@
{{- end }}
</cache>
{{- else }}
<cache name="cache" type="sqlite3">
<dbfile>/tmp/cache.db</dbfile>
<cache name="cache_extra" type="sqlite3">
<dbfile>/tmp/cache_extra.db</dbfile>
</cache>
{{- end }}
{{- else }}
<cache name="cache" type="sqlite3">
<dbfile>/tmp/cache.db</dbfile>
<cache name="cache_extra" type="sqlite3">
<dbfile>/tmp/cache_extra.db</dbfile>
</cache>
{{- end }}
{{- end }}
@@ -177,4 +175,31 @@
{{- end }}
{{- range $layer := .Values.global.overlayLayers }}
{{- if $layer.source }}
<tileset name="{{ $layer.id }}">
<metadata>
<title>{{ $layer.title }}</title>
<abstract>{{ $layer.abstract }}</abstract>
</metadata>
<source>{{ $layer.source | default $layer.id}}</source>
<cache>cache_extra</cache>
{{- $grids := $layer.grids }}
{{- if $grids }}
{{- range $grid := $grids }}
<grid max-cached-zoom="{{ $grid.zoom }}" out-of-zoom-strategy="reassemble"
{{- if hasKey $grid "restricted_extent" }} restricted_extent="{{$grid.restricted_extent}}"{{- end }}
>{{ $grid.name }}</grid>
{{- end }}
{{- else }}
<grid max-cached-zoom="10" out-of-zoom-strategy="reassemble">WGS84</grid>
{{- end }}
<format>mixed</format>
<metatile>1 1</metatile>
<metabuffer>1</metabuffer>
<expires>{{ $.Values.config.expires }}</expires>
</tileset>
{{- end }}
{{- end }}
</mapcache>
Loading