Skip to content

Commit

Permalink
chart/navi-back syncup
Browse files Browse the repository at this point in the history
  • Loading branch information
uk-navi-ci authored and i-bogomazov committed Nov 5, 2024
1 parent 32d6538 commit 148d313
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 15 deletions.
2 changes: 1 addition & 1 deletion charts/navi-back/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ keywords:
- back
- backend
version: 1.30.0
appVersion: 7.27.1.2
appVersion: 7.29.2.2
dependencies:
- name: generic-chart
version: '*'
Expand Down
28 changes: 17 additions & 11 deletions charts/navi-back/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ See the [documentation](https://docs.2gis.com/en/on-premise/navigation) to learn
| Name | Description | Value |
| ------------------ | ----------- | --------------------------- |
| `image.repository` | Repository | `2gis-on-premise/navi-back` |
| `image.tag` | Tag | `7.27.1.2` |
| `image.tag` | Tag | `7.29.2.2` |
| `image.pullPolicy` | Pull Policy | `IfNotPresent` |

### Navi-Back application settings
Expand All @@ -88,6 +88,8 @@ See the [documentation](https://docs.2gis.com/en/on-premise/navigation) to learn
| `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 | |
| `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 | |
| `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 | |
| `naviback.walkingUserSpeedsUrl` | URL of walking user speeds | |
| `naviback.routeAsUsualUrl` | URL of route as usual | |
| `naviback.dmSourcesLimit` | Size limit for source matrices | `1000` |
| `naviback.dmTargetsLimit` | Size limit for target matrices | `1000` |
| `naviback.handlersNumber` | Total number of HTTP/GRPC handlers | `1` |
Expand All @@ -99,6 +101,7 @@ See the [documentation](https://docs.2gis.com/en/on-premise/navigation) to learn
| `naviback.timeoutIncrementSec` | Downloading time increment after failures | `140` |
| `naviback.totalRetryDurationSec` | Downloading timeout with all failure retries | `2400` |
| `naviback.initialRetryIntervalSec` | Initial timeout for a failure retry | `2` |
| `naviback.clearCacheThreshold` | Memory usage percentage threshold to run cache cleanup | `90` |
| `naviback.dump.result` | Dump results in logs | `false` |
| `naviback.dump.query` | Dump queries in logs | `false` |
| `naviback.dump.answer` | Dump answers in logs | `false` |
Expand Down Expand Up @@ -161,25 +164,28 @@ See the [documentation](https://docs.2gis.com/en/on-premise/navigation) to learn
| `naviback.validation.isochrone.requestSchemaName` | Name of isochrone request validation schema | `IsochroneApiRequestModel.json` |
| `naviback.validation.isochrone.responseSchemaName` | Name of isochrone response validation schema | `IsochroneApiResponseModel.json` |
| `naviback.tilesMetricsThreshold` | The value at which we send tiles metrics (used for internal tests) | `0` |
| `naviback.engineUpdatePeriodSec` | The time interval between engine updates | `30` |
| `naviback.hierarchies.enabled` | If SN cache available | `false` |
| `naviback.hierarchies.skipPatches` | Skip patches in hierarchies cache, ignored if skipShortcuts set | `false` |
| `naviback.hierarchies.skipShortcuts` | Skip shortcuts in SN cache | `false` |
| `naviback.hierarchies.s3path` | Hierarchies cache remote location | `""` |
| `naviback.hierarchies.volume` | Hierarchies local cache specification. Leave empty for default emptydir. | `{}` |
| `naviback.etaScheduleIndex.enabled` | If Schedule Index available | `false` |
| `naviback.etaScheduleIndex.url` | Schedule Index remote url | `""` |

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

| Name | Description | Value |
| --------------------------------- | ------------------------------------------ | ----------------------- |
| `envoy.image.repository` | Repository | `2gis-on-premise/envoy` |
| `envoy.image.tag` | Tag | `v1.27.0` |
| `envoy.image.pullPolicy` | Pull Policy | `IfNotPresent` |
| `envoy.resources` | Container resources requirements structure | `{}` |
| `envoy.resources.requests.cpu` | CPU request, recommended value `100m` | `undefined` |
| `envoy.resources.requests.memory` | Memory request, recommended value `100Mi` | `undefined` |
| `envoy.resources.limits.cpu` | CPU limit, recommended value `100m` | `undefined` |
| `envoy.resources.limits.memory` | Memory limit, recommended value `100Mi` | `undefined` |
| Name | Description | Value |
| --------------------------------- | -------------------------------------------------------------------------------------------- | ----------------------- |
| `envoy.image.repository` | Repository | `2gis-on-premise/envoy` |
| `envoy.image.tag` | Tag | `v1.27.0` |
| `envoy.image.pullPolicy` | Pull Policy | `IfNotPresent` |
| `envoy.concurrency` | The number of worker threads to run. Use `max(1, floor(resources.limits.cpu))` if set to `0` | `""` |
| `envoy.resources` | Container resources requirements structure | `{}` |
| `envoy.resources.requests.cpu` | CPU request, recommended value `100m` | `undefined` |
| `envoy.resources.requests.memory` | Memory request, recommended value `100Mi` | `undefined` |
| `envoy.resources.limits.cpu` | CPU limit, recommended value `100m` | `undefined` |
| `envoy.resources.limits.memory` | Memory limit, recommended value `100Mi` | `undefined` |

### Service account settings

Expand Down
13 changes: 13 additions & 0 deletions charts/navi-back/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -408,3 +408,16 @@ Usage:
{{- define "custom.ca.mountPath" -}}
{{ .Values.customCAs.certsPath | default "/usr/local/share/ca-certificates" }}
{{- end -}}

{{/*
Calculate envoy --concurrency value
*/}}
{{- define "envoy.get-concurrency" }}
{{- if ne 0 (.Values.envoy.concurrency | int) }}
{{- max 1 (.Values.envoy.concurrency | int) -}}
{{- else if (.Values.envoy.resources.limits).cpu }}
{{- max 1 (include "generic-chart.parse-resource-quantity" .Values.envoy.resources.limits.cpu | floor | int) }}
{{- else }}
{{- printf "1" -}}
{{- end }}
{{- end }}
25 changes: 24 additions & 1 deletion charts/navi-back/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,28 @@ data:
}
},
{{- end }}{{- /* .Values.naviback.indices.snImport.enabled */}}
{{- if .Values.naviback.indices.routeAsUsual.enabled }}
"route_as_usual": {
"update_period": 0,
"nodes": [
"{{ .Values.naviback.routeAsUsualUrl }}"
],
"timeout_seconds": {
"count": 60
}
},
{{- end }}{{- /* .Values.naviback.indices.routeAsUsual.enabled */}}
{{- if .Values.naviback.indices.walkingUserSpeeds.enabled }}
"walking_user_speeds": {
"update_period": 0,
"nodes": [
"{{ .Values.naviback.walkingUserSpeedsUrl }}"
],
"timeout_seconds": {
"count": 60
}
},
{{- end }}{{- /* .Values.naviback.indices.walkingUserSpeeds.enabled */}}
{{- if .Values.naviback.indices.geoImport.enabled }}
"geo_import": {
"update_period": 0,
Expand Down Expand Up @@ -663,7 +685,8 @@ data:
"dump_answer": {{ mustToJson (.Values.naviback.dump).answer }},
"max_parallel_workers": 2,
"use_memory_mapped_vfs": true,
"engine_update_period_sec": {{ include "config.setEngineUpdatePeriod" $ | default 30 }},
"clear_cache_threshold": {{ .Values.naviback.clearCacheThreshold | int }},
"engine_update_period_sec": {{ include "config.setEngineUpdatePeriod" $ | default .Values.naviback.engineUpdatePeriodSec }},
{{- if .Values.naviback.server_id }}
"server_id": "{{- include "tplvalues.render" ( dict "value" .Values.naviback.server_id "context" .) }}",
{{- else }}
Expand Down
15 changes: 14 additions & 1 deletion charts/navi-back/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ spec:
{{- end }}
{{- if .Values.naviback.hierarchies.enabled }}
- name: hierarchies-volume
{{- if .Values.naviback.hierarchies.volume }}
{{- toYaml .Values.naviback.hierarchies.volume | nindent 8 }}
{{- else }}
emptyDir: {}
{{- end }}{{- /* if .Values.naviback.hierarchies.volume */}}
{{- end }}
{{- if .Values.extraVolumes }}
{{- include "tplvalues.render" (dict "value" .Values.extraVolumes "context" $) | nindent 6 }}
Expand All @@ -91,6 +95,15 @@ spec:
{{- toYaml .Values.securityContext | nindent 12 }}
image: {{ required "A valid .Values.dgctlDockerRegistry entry required" .Values.dgctlDockerRegistry }}/{{ .Values.envoy.image.repository }}:{{ .Values.envoy.image.tag }}
imagePullPolicy: {{ .Values.envoy.image.pullPolicy }}
args:
- -c
- /etc/envoy/envoy.yaml
{{- if and (kindIs "string" .Values.envoy.concurrency) (eq "" .Values.envoy.concurrency) }}
{{/* envoy.concurrency = '', skip */}}
{{- else }}
- "--concurrency"
- {{ include "envoy.get-concurrency" . | quote }}
{{- end }}
volumeMounts:
- name: {{ include "generic-chart.fullname" . }}-configmap
mountPath: /etc/envoy/envoy.yaml
Expand Down Expand Up @@ -205,7 +218,7 @@ spec:
mountPath: "/tmp/hierarchies"
{{- end }}
{{- if .Values.extraVolumeMounts }}
{{- include "tplvalues.render" (dict "value" .Values.extraVolumeMounts "context" $) | nindent 10 }}
{{- include "tplvalues.render" (dict "value" .Values.extraVolumeMounts "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.customCAs.bundle }}
- name: {{ include "generic-chart.fullname" . }}-configmap-ca
Expand Down
Loading

0 comments on commit 148d313

Please sign in to comment.