Skip to content

Commit 4ce4a76

Browse files
authored
chart/navi-back syncup (#531)
1 parent 8b342e6 commit 4ce4a76

File tree

6 files changed

+86
-15
lines changed

6 files changed

+86
-15
lines changed

charts/navi-back/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ keywords:
77
- back
88
- backend
99
version: 1.30.0
10-
appVersion: 7.27.1.2
10+
appVersion: 7.29.2.2
1111
dependencies:
1212
- name: generic-chart
1313
version: '*'

charts/navi-back/README.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ See the [documentation](https://docs.2gis.com/en/on-premise/navigation) to learn
7878
| Name | Description | Value |
7979
| ------------------ | ----------- | --------------------------- |
8080
| `image.repository` | Repository | `2gis-on-premise/navi-back` |
81-
| `image.tag` | Tag | `7.27.1.2` |
81+
| `image.tag` | Tag | `7.29.2.2` |
8282
| `image.pullPolicy` | Pull Policy | `IfNotPresent` |
8383

8484
### Navi-Back application settings
@@ -88,6 +88,8 @@ See the [documentation](https://docs.2gis.com/en/on-premise/navigation) to learn
8888
| `naviback.ecaHost` | DEPRECATED: Use naviback.ecaUrl. Domain name of the [Traffic Proxy service](https://docs.2gis.com/en/on-premise/traffic-proxy). <br> This URL should be accessible from all the pods within your Kubernetes cluster | |
8989
| `naviback.ecaUrl` | URL of the [Traffic Proxy service](https://docs.2gis.com/en/on-premise/traffic-proxy). <br> This URL should be accessible from all the pods within your Kubernetes cluster | |
9090
| `naviback.forecastHost` | URL of Traffic forecast service. See the [Traffic Proxy service](https://docs.2gis.com/en/on-premise/traffic-proxy). <br> This URL should be accessible from all the pods within your Kubernetes cluster | |
91+
| `naviback.walkingUserSpeedsUrl` | URL of walking user speeds | |
92+
| `naviback.routeAsUsualUrl` | URL of route as usual | |
9193
| `naviback.dmSourcesLimit` | Size limit for source matrices | `1000` |
9294
| `naviback.dmTargetsLimit` | Size limit for target matrices | `1000` |
9395
| `naviback.handlersNumber` | Total number of HTTP/GRPC handlers | `1` |
@@ -99,6 +101,7 @@ See the [documentation](https://docs.2gis.com/en/on-premise/navigation) to learn
99101
| `naviback.timeoutIncrementSec` | Downloading time increment after failures | `140` |
100102
| `naviback.totalRetryDurationSec` | Downloading timeout with all failure retries | `2400` |
101103
| `naviback.initialRetryIntervalSec` | Initial timeout for a failure retry | `2` |
104+
| `naviback.clearCacheThreshold` | Memory usage percentage threshold to run cache cleanup | `90` |
102105
| `naviback.dump.result` | Dump results in logs | `false` |
103106
| `naviback.dump.query` | Dump queries in logs | `false` |
104107
| `naviback.dump.answer` | Dump answers in logs | `false` |
@@ -161,25 +164,28 @@ See the [documentation](https://docs.2gis.com/en/on-premise/navigation) to learn
161164
| `naviback.validation.isochrone.requestSchemaName` | Name of isochrone request validation schema | `IsochroneApiRequestModel.json` |
162165
| `naviback.validation.isochrone.responseSchemaName` | Name of isochrone response validation schema | `IsochroneApiResponseModel.json` |
163166
| `naviback.tilesMetricsThreshold` | The value at which we send tiles metrics (used for internal tests) | `0` |
167+
| `naviback.engineUpdatePeriodSec` | The time interval between engine updates | `30` |
164168
| `naviback.hierarchies.enabled` | If SN cache available | `false` |
165169
| `naviback.hierarchies.skipPatches` | Skip patches in hierarchies cache, ignored if skipShortcuts set | `false` |
166170
| `naviback.hierarchies.skipShortcuts` | Skip shortcuts in SN cache | `false` |
167171
| `naviback.hierarchies.s3path` | Hierarchies cache remote location | `""` |
172+
| `naviback.hierarchies.volume` | Hierarchies local cache specification. Leave empty for default emptydir. | `{}` |
168173
| `naviback.etaScheduleIndex.enabled` | If Schedule Index available | `false` |
169174
| `naviback.etaScheduleIndex.url` | Schedule Index remote url | `""` |
170175

171176
### Envoy settings, ignored if not `transmitter.enabled`. Leave with defaults, FOR FUTURE RELEASE.
172177

173-
| Name | Description | Value |
174-
| --------------------------------- | ------------------------------------------ | ----------------------- |
175-
| `envoy.image.repository` | Repository | `2gis-on-premise/envoy` |
176-
| `envoy.image.tag` | Tag | `v1.27.0` |
177-
| `envoy.image.pullPolicy` | Pull Policy | `IfNotPresent` |
178-
| `envoy.resources` | Container resources requirements structure | `{}` |
179-
| `envoy.resources.requests.cpu` | CPU request, recommended value `100m` | `undefined` |
180-
| `envoy.resources.requests.memory` | Memory request, recommended value `100Mi` | `undefined` |
181-
| `envoy.resources.limits.cpu` | CPU limit, recommended value `100m` | `undefined` |
182-
| `envoy.resources.limits.memory` | Memory limit, recommended value `100Mi` | `undefined` |
178+
| Name | Description | Value |
179+
| --------------------------------- | -------------------------------------------------------------------------------------------- | ----------------------- |
180+
| `envoy.image.repository` | Repository | `2gis-on-premise/envoy` |
181+
| `envoy.image.tag` | Tag | `v1.27.0` |
182+
| `envoy.image.pullPolicy` | Pull Policy | `IfNotPresent` |
183+
| `envoy.concurrency` | The number of worker threads to run. Use `max(1, floor(resources.limits.cpu))` if set to `0` | `""` |
184+
| `envoy.resources` | Container resources requirements structure | `{}` |
185+
| `envoy.resources.requests.cpu` | CPU request, recommended value `100m` | `undefined` |
186+
| `envoy.resources.requests.memory` | Memory request, recommended value `100Mi` | `undefined` |
187+
| `envoy.resources.limits.cpu` | CPU limit, recommended value `100m` | `undefined` |
188+
| `envoy.resources.limits.memory` | Memory limit, recommended value `100Mi` | `undefined` |
183189

184190
### Service account settings
185191

charts/navi-back/templates/_helpers.tpl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,3 +408,16 @@ Usage:
408408
{{- define "custom.ca.mountPath" -}}
409409
{{ .Values.customCAs.certsPath | default "/usr/local/share/ca-certificates" }}
410410
{{- end -}}
411+
412+
{{/*
413+
Calculate envoy --concurrency value
414+
*/}}
415+
{{- define "envoy.get-concurrency" }}
416+
{{- if ne 0 (.Values.envoy.concurrency | int) }}
417+
{{- max 1 (.Values.envoy.concurrency | int) -}}
418+
{{- else if (.Values.envoy.resources.limits).cpu }}
419+
{{- max 1 (include "generic-chart.parse-resource-quantity" .Values.envoy.resources.limits.cpu | floor | int) }}
420+
{{- else }}
421+
{{- printf "1" -}}
422+
{{- end }}
423+
{{- end }}

charts/navi-back/templates/configmap.yaml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,28 @@ data:
466466
}
467467
},
468468
{{- end }}{{- /* .Values.naviback.indices.snImport.enabled */}}
469+
{{- if .Values.naviback.indices.routeAsUsual.enabled }}
470+
"route_as_usual": {
471+
"update_period": 0,
472+
"nodes": [
473+
"{{ .Values.naviback.routeAsUsualUrl }}"
474+
],
475+
"timeout_seconds": {
476+
"count": 60
477+
}
478+
},
479+
{{- end }}{{- /* .Values.naviback.indices.routeAsUsual.enabled */}}
480+
{{- if .Values.naviback.indices.walkingUserSpeeds.enabled }}
481+
"walking_user_speeds": {
482+
"update_period": 0,
483+
"nodes": [
484+
"{{ .Values.naviback.walkingUserSpeedsUrl }}"
485+
],
486+
"timeout_seconds": {
487+
"count": 60
488+
}
489+
},
490+
{{- end }}{{- /* .Values.naviback.indices.walkingUserSpeeds.enabled */}}
469491
{{- if .Values.naviback.indices.geoImport.enabled }}
470492
"geo_import": {
471493
"update_period": 0,
@@ -663,7 +685,8 @@ data:
663685
"dump_answer": {{ mustToJson (.Values.naviback.dump).answer }},
664686
"max_parallel_workers": 2,
665687
"use_memory_mapped_vfs": true,
666-
"engine_update_period_sec": {{ include "config.setEngineUpdatePeriod" $ | default 30 }},
688+
"clear_cache_threshold": {{ .Values.naviback.clearCacheThreshold | int }},
689+
"engine_update_period_sec": {{ include "config.setEngineUpdatePeriod" $ | default .Values.naviback.engineUpdatePeriodSec }},
667690
{{- if .Values.naviback.server_id }}
668691
"server_id": "{{- include "tplvalues.render" ( dict "value" .Values.naviback.server_id "context" .) }}",
669692
{{- else }}

charts/navi-back/templates/deployment.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,11 @@ spec:
7171
{{- end }}
7272
{{- if .Values.naviback.hierarchies.enabled }}
7373
- name: hierarchies-volume
74+
{{- if .Values.naviback.hierarchies.volume }}
75+
{{- toYaml .Values.naviback.hierarchies.volume | nindent 8 }}
76+
{{- else }}
7477
emptyDir: {}
78+
{{- end }}{{- /* if .Values.naviback.hierarchies.volume */}}
7579
{{- end }}
7680
{{- if .Values.extraVolumes }}
7781
{{- include "tplvalues.render" (dict "value" .Values.extraVolumes "context" $) | nindent 6 }}
@@ -91,6 +95,15 @@ spec:
9195
{{- toYaml .Values.securityContext | nindent 12 }}
9296
image: {{ required "A valid .Values.dgctlDockerRegistry entry required" .Values.dgctlDockerRegistry }}/{{ .Values.envoy.image.repository }}:{{ .Values.envoy.image.tag }}
9397
imagePullPolicy: {{ .Values.envoy.image.pullPolicy }}
98+
args:
99+
- -c
100+
- /etc/envoy/envoy.yaml
101+
{{- if and (kindIs "string" .Values.envoy.concurrency) (eq "" .Values.envoy.concurrency) }}
102+
{{/* envoy.concurrency = '', skip */}}
103+
{{- else }}
104+
- "--concurrency"
105+
- {{ include "envoy.get-concurrency" . | quote }}
106+
{{- end }}
94107
volumeMounts:
95108
- name: {{ include "generic-chart.fullname" . }}-configmap
96109
mountPath: /etc/envoy/envoy.yaml
@@ -205,7 +218,7 @@ spec:
205218
mountPath: "/tmp/hierarchies"
206219
{{- end }}
207220
{{- if .Values.extraVolumeMounts }}
208-
{{- include "tplvalues.render" (dict "value" .Values.extraVolumeMounts "context" $) | nindent 10 }}
221+
{{- include "tplvalues.render" (dict "value" .Values.extraVolumeMounts "context" $) | nindent 12 }}
209222
{{- end }}
210223
{{- if .Values.customCAs.bundle }}
211224
- name: {{ include "generic-chart.fullname" . }}-configmap-ca

0 commit comments

Comments
 (0)