diff --git a/.gitignore b/.gitignore index 34b82a233..2b8f1bd3e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ .idea .DS_Store readme-generator-for-helm +Chart.lock +/charts/*/charts diff --git a/charts/navi-back/Chart.yaml b/charts/navi-back/Chart.yaml index ecadf3af5..e1f31d734 100644 --- a/charts/navi-back/Chart.yaml +++ b/charts/navi-back/Chart.yaml @@ -7,7 +7,11 @@ keywords: - back - backend version: 1.24.0 -appVersion: 7.15.2.4 +appVersion: 7.23.0.5 +dependencies: + - name: generic-chart + version: "*" + repository: file://../generic-chart maintainers: - name: 2gis url: https://github.com/2gis diff --git a/charts/navi-back/README.md b/charts/navi-back/README.md index 9da6418b3..5f12e302e 100644 --- a/charts/navi-back/README.md +++ b/charts/navi-back/README.md @@ -22,231 +22,277 @@ See the [documentation](https://docs.2gis.com/en/on-premise/navigation) to learn ### Docker Registry settings -| Name | Description | Value | -| --------------------- | --------------------------------------------------------------------------------------- | ----- | -| `dgctlDockerRegistry` | Docker Registry endpoint where On-Premise services' images reside. Format: `host:port`. | `""` | +| Name | Description | Value | +| --------------------- | -------------------------------------------------------------------------------------- | ----- | +| `dgctlDockerRegistry` | Docker Registry endpoint where On-Premise services' images reside. Format: `host:port` | `""` | ### Common settings -| Name | Description | Value | -| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ----- | -| `replicaCount` | A replica count for the pod. | `1` | -| `revisionHistoryLimit` | Number of replica sets to keep for deployment rollbacks | `1` | -| `imagePullSecrets` | Kubernetes image pull secrets. | `[]` | -| `nameOverride` | Base name to use in all the Kubernetes entities deployed by this chart. | `""` | -| `fullnameOverride` | Base fullname to use in all the Kubernetes entities deployed by this chart. | `""` | -| `podAnnotations` | Kubernetes [pod annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/). | `{}` | -| `podSecurityContext` | Kubernetes [pod security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/). | `{}` | -| `securityContext` | Kubernetes [security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/). | `{}` | -| `nodeSelector` | Kubernetes [node selectors](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector). | `{}` | -| `tolerations` | Kubernetes [tolerations](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) settings. | `[]` | -| `affinity` | Kubernetes pod [affinity settings](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity). | `{}` | -| `labels` | Custom labels to set to Deployment resource. | `{}` | -| `priorityClassName` | Kubernetes [Pod Priority](https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/#priorityclass) class name. | `""` | -| `preStopDelay` | Delay in seconds before terminating container. | `5` | -| `terminationGracePeriodSeconds` | Maximum time allowed for graceful shutdown. | `60` | - -### Deployment settings +| Name | Description | Value | +| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------ | +| `replicaCount` | A replica count for the pod | `1` | +| `revisionHistoryLimit` | Number of replica sets to keep for deployment rollbacks | `1` | +| `imagePullSecrets` | Kubernetes image pull secrets | `[]` | +| `nameOverride` | Base name to use in all the Kubernetes entities deployed by this chart | `""` | +| `fullnameOverride` | Base fullname to use in all the Kubernetes entities deployed by this chart | `""` | +| `podAnnotations` | Kubernetes [pod annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) | `{}` | +| `podSecurityContext` | Kubernetes [pod security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) | `{}` | +| `securityContext` | Kubernetes [security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) | `{}` | +| `nodeSelector` | Kubernetes [node selectors](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector) | `{}` | +| `tolerations` | Kubernetes [tolerations](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) settings | `[]` | +| `affinity` | Kubernetes pod [affinity settings](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity) | `{}` | +| `labels` | Custom labels to set to Deployment resource | `{}` | +| `priorityClassName` | Kubernetes [Pod Priority](https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/#priorityclass) class name | `""` | +| `preStopDelay` | Delay in seconds before terminating container | `5` | +| `terminationGracePeriodSeconds` | Maximum time allowed for graceful shutdown | `60` | +| `extraVolumes` | Optionally specify extra list of additional volumes | `[]` | +| `extraVolumeMounts` | Optionally specify extra list of additional volumeMounts | `[]` | +| `initContainers` | Add additional init containers | `[]` | +| `sidecars` | Add additional sidecar containers | `[]` | +| `livenessProbe.enabled` | Enable livenessProbe | `true` | +| `livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `0` | +| `livenessProbe.periodSeconds` | Period seconds for livenessProbe | `5` | +| `livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `3` | +| `livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `2` | +| `livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` | +| `readinessProbe.enabled` | Enable readinessProbe | `true` | +| `readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `0` | +| `readinessProbe.periodSeconds` | Period seconds for readinessProbe | `5` | +| `readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `3` | +| `readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `2` | +| `readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` | +| `startupProbe.enabled` | Enable startupProbe | `true` | +| `startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `0` | +| `startupProbe.periodSeconds` | Period seconds for startupProbe | `5` | +| `startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `5` | +| `startupProbe.failureThreshold` | Failure threshold for startupProbe | `360` | +| `startupProbe.successThreshold` | Success threshold for startupProbe | `1` | +| `customLivenessProbe` | Override default liveness probe | `{}` | +| `customReadinessProbe` | Override default readiness probe | `{}` | +| `customStartupProbe` | Override default startup probe | `{}` | +| `command` | Override default command | `[]` | +| `args` | Override default args | `[]` | + +### Container image settings | Name | Description | Value | | ------------------ | ----------- | --------------------------- | | `image.repository` | Repository | `2gis-on-premise/navi-back` | -| `image.tag` | Tag | `7.15.2.4` | +| `image.tag` | Tag | `7.23.0.5` | | `image.pullPolicy` | Pull Policy | `IfNotPresent` | ### Navi-Back application settings -| Name | Description | Value | -| ------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | -| `naviback.ecaHost` | DEPRECATED: Use naviback.ecaUrl. Domain name of the [Traffic Proxy service](https://docs.2gis.com/en/on-premise/traffic-proxy).
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).
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).
This URL should be accessible from all the pods within your Kubernetes cluster. | | -| `naviback.dmSourcesLimit` | Size limit for source matrices. | `1000` | -| `naviback.dmTargetsLimit` | Size limit for target matrices. | `1000` | -| `naviback.handlersNumber` | Number of HTTP handlers. | `1` | -| `naviback.maxProcessTime` | Maximum processing time limit in minutes. | `600` | -| `naviback.responseTimelimit` | Maximum response time limit in minutes. | `60` | -| `naviback.requestTimeout` | Maximum request time limit in minutes. | `60` | -| `naviback.timeoutLimitSec` | Maximum downloading time can be reached after failures. | `1200` | -| `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.dump.result` | Dump results in logs. | `false` | -| `naviback.dump.query` | Dump queries in logs. | `false` | -| `naviback.dump.answer` | Dump answers in logs. | `false` | -| `naviback.logLevel` | Logging level, one of: Verbose, Info, Warning, Error, Fatal. | `Info` | -| `naviback.indexFilename` | Name of index file. | `index.json.zip` | -| `naviback.citiesFilename` | Name of the cities file on Castle | `cities.conf.zip` | -| `naviback.sentry.enabled` | If sending crash dumps to Sentry needed | `false` | -| `naviback.sentry.address` | Sentry URL | `sentry.host` | -| `naviback.sentry.project` | Sentry project ID | `navi-back` | -| `naviback.sentry.username` | Sentry username | `navi-back` | -| `naviback.sentry.printMessages` | If outgoing messages needed | `false` | -| `naviback.sentry.debug` | Debugging switch | `false` | -| `naviback.sentry.reportPath` | Local directory to dump | `/tmp/sentry` | -| `naviback.sentry.handler` | Handler file location | `/usr/sbin/2gis/mosesd/crashpad_handler` | -| `naviback.castleHost` | URL of Navi-Castle service, ex: http://navi-castle.svc.
This URL should be accessible from all the pods within your Kubernetes cluster. | `""` | -| `naviback.enablePassableBarriers` | Consider passable barriers. | | -| `naviback.grpcPort` | GRPC port to serve. Disabled if empty. | | -| `naviback.disableUpdates` | Test switch for disabling runtime background updates | `false` | -| `naviback.indices` | List of dynamic indices kill switches. | | -| `naviback.additionalSections` | Optinal JSON block to be added to config file as-is. | | -| `naviback.simpleNetwork.bicycle` | Enable simple network for bicycle routing | | -| `naviback.simpleNetwork.car` | Enable simple network for auto routing | | -| `naviback.simpleNetwork.emergency` | Enable simple network for emergency vehicles routing | `false` | -| `naviback.simpleNetwork.pedestrian` | Enable simple network for pedestrian routing | | -| `naviback.simpleNetwork.taxi` | Enable simple network for taxi routing | | -| `naviback.simpleNetwork.truck` | Enable simple network for truck routing | | -| `naviback.simpleNetwork.scooter` | Enable simple network for scooters routing | | -| `naviback.attractor.bicycle` | Enable enhanced attractor for bicycle routing | | -| `naviback.attractor.car` | Enable enhanced attractor for auto routing | | -| `naviback.attractor.pedestrian` | Enable enhanced attractor for pedestrian routing | | -| `naviback.attractor.taxi` | Enable enhanced attractor for taxi routing | | -| `naviback.attractor.truck` | Enable enhanced attractor for truck routing | | -| `naviback.attractor.scooter` | Enable enhanced attractor for scooters routing | | -| `naviback.bss.enabled` | Enable sending information on the construction of routes to the business statistics service | `false` | -| `naviback.bss.client.serviceRemoteAddress` | Remote address business statistics service. Requeruired for enable sending information. | `""` | -| `naviback.bss.client.messageCountToFlush` | Message count to flush. | `500` | -| `naviback.bss.client.useCompression` | Enable compression. | `true` | -| `naviback.bss.client.packageSizeMaxBytes` | Package size max bytes. | `1800000` | -| `naviback.bss.client.pendingTransmissionMaxCount` | Pending transmission max count. | `10` | -| `naviback.reduceEdgesOptimizationFlag` | Enable optimizations for distance matrix queries processing | | -| `naviback.behindSplitter` | Current instance is behind splitter or not | `false` | -| `naviback.overrideConfig` | Complete config override. For test purposes only. | `""` | -| `naviback.rtr.enabled` | Enable real time restrictions. | `false` | -| `naviback.rtr.url` | URL real time restrictions server. | `http://rtr.navi` | +| Name | Description | Value | +| ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | +| `naviback.ecaHost` | DEPRECATED: Use naviback.ecaUrl. Domain name of the [Traffic Proxy service](https://docs.2gis.com/en/on-premise/traffic-proxy).
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).
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).
This URL should be accessible from all the pods within your Kubernetes cluster | | +| `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` | +| `naviback.queueSize` | Internal queue size | `128` | +| `naviback.maxProcessTime` | Maximum processing time limit in minutes | `20` | +| `naviback.responseTimelimit` | Maximum response time limit in minutes | `120` | +| `naviback.requestTimeout` | Maximum request time limit in minutes | `120` | +| `naviback.timeoutLimitSec` | Maximum downloading time can be reached after failures | `1200` | +| `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.dump.result` | Dump results in logs | `false` | +| `naviback.dump.query` | Dump queries in logs | `false` | +| `naviback.dump.answer` | Dump answers in logs | `false` | +| `naviback.logLevel` | Logging level, one of: Verbose, Info, Warning, Error, Fatal | `Info` | +| `naviback.indexFilename` | Name of the index file on Castle | `index.json.zip` | +| `naviback.citiesFilename` | Name of the cities file on Castle | `cities.conf.zip` | +| `naviback.sentry.enabled` | If sending crash dumps to Sentry needed | `false` | +| `naviback.sentry.address` | Sentry URL | `sentry.local` | +| `naviback.sentry.project` | Sentry project ID | `navi-back` | +| `naviback.sentry.username` | Sentry username | `navi` | +| `naviback.sentry.printMessages` | If outgoing messages needed | `false` | +| `naviback.sentry.debug` | Debugging switch | `false` | +| `naviback.sentry.reportPath` | Local directory to dump | `/tmp/sentry` | +| `naviback.sentry.handler` | Handler file location | `/usr/sbin/2gis/mosesd/crashpad_handler` | +| `naviback.castleHost` | DEPRECATED: Use naviback.castleUrl. Domain name of Navi-Castle service.
This URL should be accessible from all the pods within your Kubernetes cluster | | +| `naviback.castleUrl` | URL of Navi-Castle service.
This URL should be accessible from all the pods within your Kubernetes cluster | `""` | +| `naviback.enablePassableBarriers` | Consider passable barriers | | +| `naviback.grpcPort` | GRPC port to serve. Disabled if empty | | +| `naviback.disableUpdates` | Test switch for disabling runtime background updates | `false` | +| `naviback.indices` | List of dynamic indices kill switches | | +| `naviback.additionalSections` | Optinal JSON block to be added to config file as-is | | +| `naviback.simpleNetwork.bicycle` | Enable simple network for bicycle routing | | +| `naviback.simpleNetwork.car` | Enable simple network for auto routing | | +| `naviback.simpleNetwork.emergency` | Enable simple network for emergency vehicles routing | | +| `naviback.simpleNetwork.pedestrian` | Enable simple network for pedestrian routing | | +| `naviback.simpleNetwork.taxi` | Enable simple network for taxi routing | | +| `naviback.simpleNetwork.truck` | Enable simple network for truck routing | | +| `naviback.simpleNetwork.scooter` | Enable simple network for scooters routing | | +| `naviback.attractor.bicycle` | Enable enhanced attractor for bicycle routing | | +| `naviback.attractor.car` | Enable enhanced attractor for auto routing | | +| `naviback.attractor.pedestrian` | Enable enhanced attractor for pedestrian routing | | +| `naviback.attractor.taxi` | Enable enhanced attractor for taxi routing | | +| `naviback.attractor.truck` | Enable enhanced attractor for truck routing | | +| `naviback.attractor.scooter` | Enable enhanced attractor for scooters routing | | +| `naviback.bss.enabled` | Enable sending information on the construction of routes to the business statistics service | `false` | +| `naviback.bss.client.serviceRemoteAddress` | Remote address business statistics service. Requeruired for enable sending information | `""` | +| `naviback.bss.client.messageCountToFlush` | Message count to flush | `500` | +| `naviback.bss.client.useCompression` | Enable compression | `true` | +| `naviback.bss.client.packageSizeMaxBytes` | Package size max bytes | `1800000` | +| `naviback.bss.client.pendingTransmissionMaxCount` | Pending transmission max count | `10` | +| `naviback.bss.client.timeoutLimitMilSec` | Maximum request time limit in milliseconds | `5000` | +| `naviback.reduceEdgesOptimizationFlag` | Enable optimizations for distance matrix queries processing | | +| `naviback.behindSplitter` | The current instance is behind splitter or not | `false` | +| `naviback.overrideConfig` | Complete config override. For test purposes only | `""` | +| `naviback.rtr.enabled` | Enable real time restrictions | `false` | +| `naviback.rtr.url` | URL real time restrictions server | `http://rtr` | +| `naviback.rtr.updatePeriod` | Update period from real time restrictions server | `60` | +| `naviback.validation.enabled` | Enable validation responses and requests (used for internal tests) | `false` | +| `naviback.validation.ctx.schemasFolder` | Path to folder with ctx JSON schemas | `/usr/share/2gis/schemas/nsr_schemas` | +| `naviback.validation.ctx.requestSchemaName` | Name of ctx request validation schema | `CTXRequestModel.json` | +| `naviback.validation.ctx.responseSchemaName` | Name of ctx response validation schema | `CTXResponseModelV4.json` | +| `naviback.validation.bss.schemasFolder` | Path to folder with bss JSON schemas | `/usr/share/2gis/schemas/bss_schemas` | +| `naviback.validation.bss.requestSchemaName` | Name of bss request validation schema | `""` | +| `naviback.validation.bss.responseSchemaName` | Name of bss response validation schema | `401.schema.json` | +| `naviback.validation.distanceMatrix.schemasFolder` | Path to folder with distance matrix JSON schemas | `/usr/share/2gis/schemas/nsr_schemas` | +| `naviback.validation.distanceMatrix.requestSchemaName` | Name of distance matrix request validation schema | `DistanceMatrixRequestModel.json` | +| `naviback.validation.distanceMatrix.responseSchemaName` | Name of distance matrix response validation schema | `DistanceMatrixResponseModel.json` | +| `naviback.validation.isochrone.schemasFolder` | Path to folder with isochrone JSON schemas | `/usr/share/2gis/schemas/nsr_schemas` | +| `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.hierarchies.enabled` | If hierarchies cache available | `false` | +| `naviback.hierarchies.s3path` | Hierarchies cache remote location | `""` | +| `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` | - -### Frozen data settings. For test purposes only. - -| Name | Description | Value | -| -------------------------------------- | ------------------------------------------- | ----------------------------- | -| `frozenData.enabled` | If use frozen data is enabled. | `false` | -| `frozenData.image.repository` | Repository | `2gis-on-premise/frozen-data` | -| `frozenData.image.tag` | Tag | `""` | -| `frozenData.image.pullPolicy` | Pull Policy | `Always` | -| `frozenData.resources` | Container resources requirements structure. | `{}` | -| `frozenData.resources.requests.cpu` | CPU request, recommended value `100m`. | `undefined` | -| `frozenData.resources.requests.memory` | Memory request, recommended value `100Mi`. | `undefined` | -| `frozenData.resources.limits.cpu` | CPU limit, recommended value `100m`. | `undefined` | -| `frozenData.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.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 -| Name | Description | Value | -| ---------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ------- | -| `serviceAccount.create` | Specifies whether a service account should be created. | `false` | -| `serviceAccount.annotations` | Annotations to add to the service account. | `{}` | -| `serviceAccount.name` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template. | `""` | +| Name | Description | Value | +| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ------- | +| `serviceAccount.create` | Specifies whether a service account should be created | `false` | +| `serviceAccount.annotations` | Annotations to add to the service account | `{}` | +| `serviceAccount.name` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template | `""` | ### Service settings -| Name | Description | Value | -| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ----------- | -| `service.type` | Kubernetes [service type](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types). | `ClusterIP` | -| `service.clusterIP` | Controls Service cluster IP allocation. Cannot be changed after resource creation. | `""` | -| `service.port` | Service port. | `80` | -| `service.grpcPort` | Service GRPC port if `naviback.grpcPort` enabled. | `50051` | -| `service.annotations` | Kubernetes [service annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/). | `{}` | -| `service.labels` | Kubernetes [service labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/). | `nil` | -| `service.headless.enabled` | Enable creating a secondary headless service | `false` | -| `service.headless.annotations` | Annotations for secondary headless service | `{}` | +| Name | Description | Value | +| ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------- | ----------- | +| `service.type` | Kubernetes [service type](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) | `ClusterIP` | +| `service.clusterIP` | Controls Service cluster IP allocation. Cannot be changed after resource creation | `""` | +| `service.port` | Service port | `80` | +| `service.grpcPort` | Service GRPC port if `naviback.grpcPort` enabled | `50051` | +| `service.annotations` | Kubernetes [service annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) | `{}` | +| `service.labels` | Kubernetes [service labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) | `nil` | +| `service.extraPorts` | Extra ports to expose in the service (normally used with the `sidecar` value) | `[]` | +| `service.headless.enabled` | Enable creating a secondary headless service | `false` | +| `service.headless.annotations` | Annotations for secondary headless service | `{}` | ### Kubernetes [Ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/) settings -| Name | Description | Value | -| ------------------------------------ | ----------------------------------------- | ----------------------- | -| `ingress.enabled` | If Ingress is enabled for the service. | `false` | -| `ingress.className` | Name of the Ingress controller class. | `nginx` | -| `ingress.hosts[0].host` | Hostname for the Ingress service. | `navi-back.example.com` | -| `ingress.hosts[0].paths[0].path` | Path of the host for the Ingress service. | `/` | -| `ingress.hosts[0].paths[0].pathType` | Type of the path for the Ingress service. | `Prefix` | -| `ingress.tls` | TLS configuration | `[]` | +| Name | Description | Value | +| ------------------------------------ | ---------------------------------------- | ----------------------- | +| `ingress.className` | Name of the Ingress controller class | `nginx` | +| `ingress.enabled` | If Ingress is enabled for the service | `false` | +| `ingress.hosts[0].host` | Hostname for the Ingress service | `navi-back.example.com` | +| `ingress.hosts[0].paths[0].path` | Path of the host for the Ingress service | `/` | +| `ingress.hosts[0].paths[0].pathType` | Type of the path for the Ingress service | `Prefix` | +| `ingress.tls` | TLS configuration | `[]` | ### Limits -| Name | Description | Value | -| --------------------------- | ------------------------------------------- | ----------- | -| `resources` | Container resources requirements structure. | `{}` | -| `resources.requests.cpu` | CPU request, recommended value `1000m`. | `undefined` | -| `resources.requests.memory` | Memory request, recommended value `2Gi`. | `undefined` | -| `resources.limits.cpu` | CPU limit, recommended value `3000m`. | `undefined` | -| `resources.limits.memory` | Memory limit, recommended value `8Gi`. | `undefined` | +| Name | Description | Value | +| --------------------------- | ------------------------------------------ | ----------- | +| `resources` | Container resources requirements structure | `{}` | +| `resources.requests.cpu` | CPU request, recommended value `1000m` | `undefined` | +| `resources.requests.memory` | Memory request, recommended value `2Gi` | `undefined` | +| `resources.limits.cpu` | CPU limit, recommended value `3000m` | `undefined` | +| `resources.limits.memory` | Memory limit, recommended value `8Gi` | `undefined` | ### Kubernetes [Horizontal Pod Autoscaling](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) settings -| Name | Description | Value | -| ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | -| `hpa.enabled` | If HPA is enabled for the service. | `false` | -| `hpa.minReplicas` | Lower limit for the number of replicas to which the autoscaler can scale down. | `1` | -| `hpa.maxReplicas` | Upper limit for the number of replicas to which the autoscaler can scale up. | `100` | -| `hpa.scaleDownStabilizationWindowSeconds` | Scale-down window. | `""` | -| `hpa.scaleUpStabilizationWindowSeconds` | Scale-up window. | `""` | -| `hpa.targetCPUUtilizationPercentage` | Target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified the default autoscaling policy will be used. | `80` | -| `hpa.targetMemoryUtilizationPercentage` | Target average memory utilization (represented as a percentage of requested memory) over all the pods; if not specified the default autoscaling policy will be used. | `""` | +| Name | Description | Value | +| ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | +| `hpa.enabled` | If HPA is enabled for the service | `false` | +| `hpa.minReplicas` | Lower limit for the number of replicas to which the autoscaler can scale down | `1` | +| `hpa.maxReplicas` | Upper limit for the number of replicas to which the autoscaler can scale up | `100` | +| `hpa.scaleDownStabilizationWindowSeconds` | Scale-down window | `""` | +| `hpa.scaleUpStabilizationWindowSeconds` | Scale-up window | `""` | +| `hpa.targetCPUUtilizationPercentage` | Target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified the default autoscaling policy will be used | `80` | +| `hpa.targetMemoryUtilizationPercentage` | Target average memory utilization (represented as a percentage of requested memory) over all the pods; if not specified the default autoscaling policy will be used | `""` | ### Kubernetes [Vertical Pod Autoscaling](https://github.com/kubernetes/autoscaler/blob/master/vertical-pod-autoscaler/README.md) settings -| Name | Description | Value | -| ----------------------- | ------------------------------------------------------------------------------------------------------------ | ------- | -| `vpa.enabled` | If VPA is enabled for the service. | `false` | -| `vpa.updateMode` | VPA [update mode](https://github.com/kubernetes/autoscaler/tree/master/vertical-pod-autoscaler#quick-start). | `Auto` | -| `vpa.minAllowed.cpu` | Lower limit for the number of CPUs to which the autoscaler can scale down. | | -| `vpa.minAllowed.memory` | Lower limit for the RAM size to which the autoscaler can scale down. | | -| `vpa.maxAllowed.cpu` | Upper limit for the number of CPUs to which the autoscaler can scale up. | | -| `vpa.maxAllowed.memory` | Upper limit for the RAM size to which the autoscaler can scale up. | | +| Name | Description | Value | +| ----------------------- | ----------------------------------------------------------------------------------------------------------- | ------- | +| `vpa.enabled` | If VPA is enabled for the service | `false` | +| `vpa.updateMode` | VPA [update mode](https://github.com/kubernetes/autoscaler/tree/master/vertical-pod-autoscaler#quick-start) | `Auto` | +| `vpa.minAllowed.cpu` | Lower limit for the number of CPUs to which the autoscaler can scale down | | +| `vpa.minAllowed.memory` | Lower limit for the RAM size to which the autoscaler can scale down | | +| `vpa.maxAllowed.cpu` | Upper limit for the number of CPUs to which the autoscaler can scale up | | +| `vpa.maxAllowed.memory` | Upper limit for the RAM size to which the autoscaler can scale up | | ### Kubernetes [Pod Disruption Budget](https://kubernetes.io/docs/concepts/workloads/pods/disruptions/#pod-disruption-budgets) settings -| Name | Description | Value | -| -------------------- | ---------------------------------------------------- | ------- | -| `pdb.enabled` | If PDB is enabled for the service. | `false` | -| `pdb.minAvailable` | How many pods must be available after the eviction. | `""` | -| `pdb.maxUnavailable` | How many pods can be unavailable after the eviction. | `1` | +| Name | Description | Value | +| -------------------- | --------------------------------------------------- | ------- | +| `pdb.enabled` | If PDB is enabled for the service | `false` | +| `pdb.minAvailable` | How many pods must be available after the eviction | `""` | +| `pdb.maxUnavailable` | How many pods can be unavailable after the eviction | `1` | ### Kafka settings for interacting with Distance Matrix Async Service -| Name | Description | Value | -| ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------- | -------------- | -| `kafka.enabled` | If the Kafka is enabled. | `false` | -| `kafka.groupId` | Navi-Back service group identifier. | `navi_back` | -| `kafka.properties` | Properties as supported by librdkafka. Refer to inline comments for details. | | -| `kafka.fileProperties` | As kafka.properties, but kept in a file, which passed to application as a filename. Refer to inline comments for details. | `{}` | -| `kafka.distanceMatrix` | **Settings for interacting with Distance Matrix Async service.** | | -| `kafka.distanceMatrix.taskTopic` | Name of the topic for receiving new tasks from Distance Matrix Async API. | `task_topic` | -| `kafka.distanceMatrix.cancelTopic` | Name of the topic for canceling or receiving information about finished tasks. | `cancel_topic` | -| `kafka.distanceMatrix.statusTopic` | Name of the topic for receiving task status information. | `status_topic` | -| `kafka.distanceMatrix.updateTaskStatusPeriodSec` | Update period for task statuses. | `120` | -| `kafka.distanceMatrix.messageExpiredPeriodSec` | Update period for task cancellations. | `3600` | -| `kafka.distanceMatrix.requestDownloadTimeoutSec` | Timeout for downloading request data. | `20` | -| `kafka.distanceMatrix.responseUploadTimeoutSec` | Timeout for uploading response data. | `40` | +| Name | Description | Value | +| ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -------------- | +| `kafka.enabled` | If the Kafka is enabled | `false` | +| `kafka.groupId` | Navi-Back service group identifier | `navi_back` | +| `kafka.handlersNumber` | Number of Kafka handlers | `2` | +| `kafka.properties` | Properties as supported by librdkafka. Refer to inline comments for details | | +| `kafka.fileProperties` | As kafka.properties, but kept in a file, which passed to application as a filename. Refer to inline comments for details | `{}` | +| `kafka.distanceMatrix` | **Settings for interacting with Distance Matrix Async service.** | | +| `kafka.distanceMatrix.taskTopic` | Name of the topic for receiving new tasks from Distance Matrix Async API | `task_topic` | +| `kafka.distanceMatrix.cancelTopic` | Name of the topic for canceling or receiving information about finished tasks | `cancel_topic` | +| `kafka.distanceMatrix.statusTopic` | Name of the topic for receiving task status information | `status_topic` | +| `kafka.distanceMatrix.updateTaskStatusPeriodSec` | Update period for task statuses | `120` | +| `kafka.distanceMatrix.messageExpiredPeriodSec` | Update period for task cancellations | `3600` | +| `kafka.distanceMatrix.requestDownloadTimeoutSec` | Timeout for downloading request data | `20` | +| `kafka.distanceMatrix.responseUploadTimeoutSec` | Timeout for uploading response data | `40` | ### S3-compatible storage settings for interacting with Distance Matrix Async Service -| Name | Description | Value | -| -------------- | --------------------------------------- | ------- | -| `s3.enabled` | if S3 storage is enabled. | `false` | -| `s3.host` | S3 endpoint, ex: async-matrix-s3.host. | `""` | -| `s3.bucket` | S3 bucket name. | `""` | -| `s3.accessKey` | S3 access key for accessing the bucket. | `""` | -| `s3.secretKey` | S3 secret key for accessing the bucket. | `""` | +| Name | Description | Value | +| -------------- | ----------------------------------------- | ------- | +| `s3.enabled` | if S3 storage is enabled | `false` | +| `s3.host` | S3 endpoint, ex: async-matrix-s3.host | `""` | +| `s3.bucket` | S3 bucket name | `""` | +| `s3.accessKey` | S3 access key for accessing the bucket | `""` | +| `s3.secretKey` | S3 secret key for accessing the bucket | `""` | +| `s3.suffix` | String to append to file names in replies | `""` | ### Settings for attractor connection. Leave with defaults, FOR FUTURE RELEASE. -| Name | Description | Value | -| ------------------------------- | ------------------------------------------------------------------- | ---------------------------- | -| `transmitter.enabled` | if attractor connection required | `false` | -| `transmitter.type` | connection type one of: grpc, grpc-async, grpc-stream, ws, ws-async | `grpc-async-stream` | -| `transmitter.host` | attractor service | `http://navi-attractor.host` | -| `transmitter.port` | attractor port | `50051` | -| `transmitter.responseTimeoutMs` | response waiting timeout | `100` | +| Name | Description | Value | +| ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- | +| `transmitter.enabled` | if attractor connection required | `false` | +| `transmitter.type` | connection type one of: grpc, grpc-async, grpc-stream, ws, ws-async | `grpc-async-stream` | +| `transmitter.host` | attractor service | `http://navi-attractor.host` | +| `transmitter.port` | attractor port | `50051` | +| `transmitter.responseTimeoutMs` | response waiting timeout | `2000` | +| `transmitter.retry.enabled` | Enable retry failed requests | `false` | +| `transmitter.retry.retryOn` | Status [codes for retry](https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/router_filter#x-envoy-retry-grpc-on) | `internal,unavailable` | +| `transmitter.retry.numRetries` | Specifies the allowed number of retries | `5` | ### Back-end and attractor group properties. Leave with defaults, FOR FUTURE RELEASE. @@ -258,10 +304,9 @@ See the [documentation](https://docs.2gis.com/en/on-premise/navigation) to learn ### License settings -| Name | Description | Value | -| ---------------------- | ---------------------------------------------------------------- | ------- | -| `license.url` | Address of the License service v2. Ex: https://license.svc | `""` | -| `license.notSupported` | Excludes the configuration block if true, for old versions only. | `false` | +| Name | Description | Value | +| ------------- | ---------------------------------------------------------- | ----- | +| `license.url` | Address of the License service v2. Ex: https://license.svc | `""` | ### Metrics aggregator container. Leave with defaults, FOR FUTURE RELEASE. @@ -271,12 +316,12 @@ See the [documentation](https://docs.2gis.com/en/on-premise/navigation) to learn | `metrics.image.repository` | Repository | `2gis-on-premise/metrics-aggregator` | | `metrics.image.tag` | Tag | `""` | | `metrics.image.pullPolicy` | Pull Policy | `IfNotPresent` | -| `metrics.port` | Port of container. | `9090` | -| `metrics.resources` | Container resources requirements structure. | `{}` | -| `metrics.resources.requests.cpu` | CPU request, recommended value `10m`. | `undefined` | -| `metrics.resources.requests.memory` | Memory request, recommended value `10Mi`. | | -| `metrics.resources.limits.cpu` | CPU limit, recommended value `100m`. | | -| `metrics.resources.limits.memory` | Memory limit, recommended value `10Mi`. | | +| `metrics.port` | Port of container | `9090` | +| `metrics.resources` | Container resources requirements structure | `{}` | +| `metrics.resources.requests.cpu` | CPU request, recommended value `10m` | `undefined` | +| `metrics.resources.requests.memory` | Memory request, recommended value `10Mi` | | +| `metrics.resources.limits.cpu` | CPU limit, recommended value `100m` | | +| `metrics.resources.limits.memory` | Memory limit, recommended value `10Mi` | | ## Maintainers diff --git a/charts/navi-back/templates/NOTES.txt b/charts/navi-back/templates/NOTES.txt index 0dbc794de..28d930565 100644 --- a/charts/navi-back/templates/NOTES.txt +++ b/charts/navi-back/templates/NOTES.txt @@ -6,16 +6,16 @@ {{- end }} {{- end }} {{- else if contains "NodePort" .Values.service.type }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "naviback.fullname" . }}) + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "generic-chart.fullname" . }}) export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") echo http://$NODE_IP:$NODE_PORT {{- else if contains "LoadBalancer" .Values.service.type }} NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "naviback.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "naviback.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") + You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "generic-chart.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "generic-chart.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") echo http://$SERVICE_IP:{{ .Values.service.port }} {{- else if contains "ClusterIP" .Values.service.type }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "naviback.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "generic-chart.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") echo "Visit http://127.0.0.1:8080 to use your application" kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT diff --git a/charts/navi-back/templates/_helpers.tpl b/charts/navi-back/templates/_helpers.tpl index 588d0b449..c81df9461 100644 --- a/charts/navi-back/templates/_helpers.tpl +++ b/charts/navi-back/templates/_helpers.tpl @@ -1,39 +1,9 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "naviback.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "naviback.fullname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := default .Chart.Name .Values.nameOverride }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} -{{- end }} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "naviback.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - {{/* Distinguishable main container name +Override generic-chart +TODO: rewrite https://github.com/helm/helm/issues/11291 */}} -{{- define "naviback.containerName" -}} +{{- define "generic-chart.containerName" -}} {{- if .Values.dataGroup.enabled }} {{- .Values.dataGroup.prefix }}-{{ .Chart.Name }} {{- else }} @@ -41,51 +11,6 @@ Distinguishable main container name {{- end }} {{- end -}} -{{/* -Common labels -*/}} -{{- define "naviback.labels" -}} -helm.sh/chart: {{ include "naviback.chart" . }} -{{ include "naviback.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "naviback.selectorLabels" -}} -app.kubernetes.io/name: {{ include "naviback.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "naviback.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "naviback.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} - - -{{/* -Renders a value that contains template. -Usage: -{{ include "tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $) }} -*/}} -{{- define "tplvalues.render" -}} - {{- if typeIs "string" .value }} - {{- tpl .value .context }} - {{- else }} - {{- tpl (.value | toYaml) .context }} - {{- end }} -{{- end -}} - {{/* Get count of CPU from limits. @@ -448,48 +373,29 @@ Usage: {{- end -}} {{- end -}} -{{/* -Return the target Kubernetes version -*/}} -{{- define "capabilities.kubeVersion" -}} -{{- if .Values.global }} - {{- if .Values.global.kubeVersion }} - {{- .Values.global.kubeVersion -}} - {{- else }} - {{- default .Capabilities.KubeVersion.Version .Values.kubeVersion -}} - {{- end -}} -{{- else }} -{{- default .Capabilities.KubeVersion.Version .Values.kubeVersion -}} -{{- end -}} -{{- end -}} - -{{/* -Return the appropriate apiVersion for Horizontal Pod Autoscaler. -*/}} -{{- define "capabilities.hpa.apiVersion" -}} -{{- if semverCompare "<1.23-0" (include "capabilities.kubeVersion" .) -}} -{{- if .beta2 -}} -{{- print "autoscaling/v2beta2" -}} -{{- else -}} -{{- print "autoscaling/v2beta1" -}} -{{- end -}} -{{- else -}} -{{- print "autoscaling/v2" -}} -{{- end -}} -{{- end -}} - {{/* Set castle url -If use frozenData return local path Usage: {{ include "config.setCastleUrl" $ }} */}} {{- define "config.setCastleUrl" -}} - {{- if .Values.frozenData.enabled -}} - {{- printf "file://{LOCAL_PATH}" -}} - {{- else if .Values.naviback.castleUrl -}} + {{- if .Values.naviback.castleUrl -}} {{- printf .Values.naviback.castleUrl -}} {{- else if .Values.naviback.castleHost -}} {{- printf "http://%s" .Values.naviback.castleHost -}} {{- end -}} {{- end -}} + +{{/* +Set restriction url +If rtr enabled return naviback.rtr.url, else return naviback.castleUrl +Usage: +{{ include "config.setRestrictionUrl" $ }} +*/}} +{{- define "config.setRestrictionUrl" -}} + {{- if .Values.naviback.rtr.enabled -}} + {{- printf .Values.naviback.rtr.url -}} + {{- else -}} + {{- printf (include "config.setCastleUrl" $) -}} + {{- end -}} +{{- end -}} diff --git a/charts/navi-back/templates/configmap.yaml b/charts/navi-back/templates/configmap.yaml index 6446863ac..0313ae448 100644 --- a/charts/navi-back/templates/configmap.yaml +++ b/charts/navi-back/templates/configmap.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: ConfigMap metadata: - name: {{ include "naviback.fullname" . }}-configmap + name: {{ include "generic-chart.fullname" . }}-configmap data: navi-back.conf: | {{- if .Values.naviback.overrideConfig }} @@ -27,18 +27,11 @@ data: "pid_file": "/var/run/2gis/navi-back.pid" }, {{- /* distribute equally fot HTTP/GRPC */}} - {{- $httpHandlers := 0 }} - {{- $grpcHandlers := 0 }} - {{- if .Values.naviback.grpcPort }} - {{- $httpHandlers = div .Values.naviback.handlersNumber 2 }} - {{- $grpcHandlers = sub .Values.naviback.handlersNumber $httpHandlers }} - {{- else }} - {{- $httpHandlers = .Values.naviback.handlersNumber }} - {{- end }} "http": { "server": "0.0.0.0", "port": {{ .Values.naviback.appPort }}, - "handlers_number": {{ $httpHandlers }}, + "handlers_number": {{ .Values.naviback.handlersNumber | int }}, + "queue_size": {{ .Values.naviback.queueSize | int }}, "log_verbose": false, "max_process_time": {{ .Values.naviback.maxProcessTime | default 20 | int }}, "response_timelimit": {{ .Values.naviback.responseTimelimit | default 120 | int }}, @@ -52,23 +45,22 @@ data: {{- if .Values.naviback.grpcPort }} "grpc": { - "server" : "0.0.0.0", - "port" : {{ .Values.naviback.grpcPort | int }}, - "max_process_time" : {{ .Values.naviback.maxProcessTime | default 20 | int }}, - "response_timelimit" : {{ .Values.naviback.responseTimelimit | default 120 | int }}, - "request_timeout" : {{ .Values.naviback.requestTimeout | default 120 | int }}, - "thread_pool_size" : {{ $grpcHandlers }} + "server": "0.0.0.0", + "port": {{ .Values.naviback.grpcPort | int }}, + "max_process_time": {{ .Values.naviback.maxProcessTime | default 20 | int }}, + "response_timelimit": {{ .Values.naviback.responseTimelimit | default 120 | int }}, + "request_timeout": {{ .Values.naviback.requestTimeout | default 120 | int }} }, {{- end }} {{- if .Values.naviback.sentry.enabled }} - "error_tracker" : { - "report_destination_address" : {{ .Values.naviback.sentry.address | quote }}, - "project_name" : {{ .Values.naviback.sentry.project | quote }}, - "user_name" : {{ .Values.naviback.sentry.username | quote }}, - "print_outgoing_messages" : {{ .Values.naviback.sentry.printMessages | default false }}, - "debug" : {{ .Values.naviback.sentry.debug | default false }}, - "path" : {{ .Values.naviback.sentry.reportPath | default "/tmp/sentry" | quote }}, - "handler" : {{ .Values.naviback.sentry.handler | default "/usr/sbin/2gis/mosesd/crashpad_handler" | quote }} + "error_tracker": { + "report_destination_address": {{ .Values.naviback.sentry.address | quote }}, + "project_name": {{ .Values.naviback.sentry.project | quote }}, + "user_name": {{ .Values.naviback.sentry.username | quote }}, + "print_outgoing_messages": {{ .Values.naviback.sentry.printMessages | default false }}, + "debug": {{ .Values.naviback.sentry.debug | default false }}, + "path": {{ .Values.naviback.sentry.reportPath | default "/tmp/sentry" | quote }}, + "handler": {{ .Values.naviback.sentry.handler | default "/usr/sbin/2gis/mosesd/crashpad_handler" | quote }} }, {{- end }} {{- if .Values.transmitter.enabled }} @@ -76,19 +68,52 @@ data: "type": {{ .Values.transmitter.type | quote }}, "host": "127.0.0.1", "port": 9999, - "response_timeout_ms": {{ .Values.transmitter.responseTimeoutMs | int }} + "timeout_limit_ms": {{ .Values.transmitter.responseTimeoutMs | int }} }, {{- end }} "context": { + {{- if .Values.naviback.validation.enabled }} + "validation": [ + { + "service_name": "ctx", + "schemas_folder": {{ .Values.naviback.validation.ctx.schemasFolder | quote }}, + "request_schema_name": {{ .Values.naviback.validation.ctx.requestSchemaName | quote }}, + "response_schema_name": {{ .Values.naviback.validation.ctx.responseSchemaName | quote }} + }, + { + "service_name": "bss", + "schemas_folder": {{ .Values.naviback.validation.bss.schemasFolder | quote }}, + "request_schema_name": {{ .Values.naviback.validation.bss.requestSchemaName | quote }}, + "response_schema_name": {{ .Values.naviback.validation.bss.responseSchemaName | quote }} + }, + { + "service_name": "distance_matrix", + "schemas_folder": {{ .Values.naviback.validation.distanceMatrix.schemasFolder | quote }}, + "request_schema_name": {{ .Values.naviback.validation.distanceMatrix.requestSchemaName | quote }}, + "response_schema_name": {{ .Values.naviback.validation.distanceMatrix.responseSchemaName | quote }} + }, + { + "service_name": "isochrone", + "schemas_folder": {{ .Values.naviback.validation.isochrone.schemasFolder | quote }}, + "request_schema_name": {{ .Values.naviback.validation.isochrone.requestSchemaName | quote }}, + "response_schema_name": {{ .Values.naviback.validation.isochrone.responseSchemaName | quote }} + } + ], + {{- end }} "variables": { "LOCAL_PATH": "/opt/castle", "LOCAL_ETC": "/etc/2gis/mosesd", + {{- if .Values.naviback.hierarchies.enabled }} + "S3_CACHE_PATH": {{ .Values.naviback.hierarchies.s3path | quote }}, + "SHORTCUT_PATH": "/tmp/hierarchies/shortcuts", + "PATCHES_PATH": "/tmp/hierarchies/patches", + {{- end }}{{- /* if .Values.naviback.hierarchies.enabled */}} "REMOTE_PATH": "{{ include "config.setCastleUrl" $ }}", - "REMOTE_FORECAST" : "{{ .Values.naviback.forecastHost }}", - "REMOTE_ECA" : "{{ include "config.setEcaUrl" $ }}" + "REMOTE_FORECAST": "{{ .Values.naviback.forecastHost }}", + "REMOTE_ECA": "{{ include "config.setEcaUrl" $ }}" }, - "rules": { - "update_period" : 0, + "rules": { + "update_period": 0, "nodes": [ "file://{LOCAL_ETC}/rules.conf" ], @@ -120,116 +145,81 @@ data: }, {{- if not (include "config.isCTX" $) }} {{- if .Values.naviback.indices.speedIndex.enabled }} - "speed_index" : - { - "update_period" : {{ .Values.naviback.disableUpdates | ternary 604800 20 }}, - "nodes" : - [ - "{REMOTE_ECA}/traffic/moses/speeds5.json" - ], - "timeout_seconds": - { - "count": 60 - } + "speed_index": { + "update_period": {{ .Values.naviback.disableUpdates | ternary 604800 20 }}, + "nodes": [ + "{REMOTE_ECA}/traffic/moses/speeds5.json" + ], + "timeout_seconds": { + "count": 60 + } }, {{- end }}{{- /* .Values.naviback.indices.speedIndex.enabled */}} - {{- if .Values.naviback.indices.forecastedSpeedsIndex.enabled }} - "forecasted_speeds_index" : - { - "update_period" : {{ .Values.naviback.disableUpdates | ternary 604800 20 }}, - "nodes" : - [ - "http://{REMOTE_FORECAST}/index.json" - ], - "timeout_seconds": - { - "count": 30 - } + {{- if and .Values.naviback.indices.forecastedSpeedsIndex.enabled .Values.naviback.forecastHost }} + "forecasted_speeds_index": { + "update_period": {{ .Values.naviback.disableUpdates | ternary 604800 20 }}, + "nodes": [ + "http://{REMOTE_FORECAST}/index.json" + ], + "timeout_seconds": { + "count": 30 + } }, {{- end }}{{- /* .Values.naviback.indices.forecastedSpeedsIndex.enabled */}} - {{- if .Values.naviback.indices.forecastedSpeeds.enabled }} - "forecasted_speeds" : - { - "update_period" : 0, - "nodes" : - [ - "http://{REMOTE_FORECAST}/" - ], - "timeout_seconds": - { - "count": 30 - } + {{- if and .Values.naviback.indices.forecastedSpeeds.enabled .Values.naviback.forecastHost }} + "forecasted_speeds": { + "update_period": 0, + "nodes": [ + "http://{REMOTE_FORECAST}/" + ], + "timeout_seconds": { + "count": 30 + } }, {{- end }}{{- /* .Values.naviback.indices.forecastedSpeeds.enabled */}} {{- if .Values.naviback.indices.etaCorrectionCores.enabled }} - "eta_correction_cores" : - { - "update_period" : 0, - "nodes" : - [ - "{REMOTE_PATH}/" - ], - "timeout_seconds": - { - "count": 60 - } + "eta_correction_cores": { + "update_period": 0, + "nodes": [ + "{REMOTE_PATH}/" + ], + "timeout_seconds": { + "count": 60 + } }, {{- end }}{{- /* .Values.naviback.indices.etaCorrectionCores.enabled */}} - {{- if .Values.naviback.indices.taxiReferers.enabled }} - "taxi_referers": - { - "update_period" : 3600, - "nodes" : - [ - "{REMOTE_PATH}/options/taxi_referers.json" - ], - "timeout_seconds": - { - "count": 360 - } - }, - {{- end }}{{- /* .Values.naviback.indices.taxiReferers.enabled */}} {{- else }} {{- if .Values.naviback.indices.restrictedTransportRoutes.enabled }} - "restricted_transport_routes" : - { - "update_period" : 0, - "nodes" : - [ - "{REMOTE_PATH}/" - ], - "timeout_seconds": - { - "count": 10 - } + "restricted_transport_routes": { + "update_period": 0, + "nodes": [ + "{REMOTE_PATH}/" + ], + "timeout_seconds": { + "count": 10 + } }, {{- end }}{{- /* .Values.naviback.indices.restrictedTransportRoutes.enabled */}} {{- if .Values.naviback.indices.restrictedTransportPlatforms.enabled }} - "restricted_transport_platforms" : - { - "update_period" : 0, - "nodes" : - [ - "{REMOTE_PATH}/" - ], - "timeout_seconds": - { - "count": 10 - } + "restricted_transport_platforms": { + "update_period": 0, + "nodes": [ + "{REMOTE_PATH}/" + ], + "timeout_seconds": { + "count": 10 + } }, {{- end }}{{- /* .Values.naviback.indices.restrictedTransportPlatforms.enabled */}} {{- if .Values.naviback.indices.restrictedTransportIndex.enabled }} - "restricted_transport_index" : - { - "update_period" : {{ .Values.naviback.disableUpdates | ternary 604800 300 }}, - "nodes" : - [ - "{REMOTE_PATH}/restricted_transport.json.zip" - ], - "timeout_seconds": - { - "count": 10 - } + "restricted_transport_index": { + "update_period": {{ .Values.naviback.disableUpdates | ternary 604800 300 }}, + "nodes": [ + "{REMOTE_PATH}/restricted_transport.json.zip" + ], + "timeout_seconds": { + "count": 10 + } }, {{- end }}{{- /* .Values.naviback.indices.restrictedTransportIndex.enabled */}} {{- end }} @@ -297,7 +287,7 @@ data: "restrictions": { "update_period": 0, "nodes": [ - "{REMOTE_PATH}/" + "{{ include "config.setRestrictionUrl" $ }}/" ], "timeout_seconds": { "count": 30 @@ -339,207 +329,221 @@ data: }, {{- end }}{{- /* .Values.naviback.indices.speedCams.enabled */}} {{- if .Values.naviback.indices.tugcUsersIndex.enabled }} - "tugc_users_index" : - { - "update_period" : {{ .Values.naviback.disableUpdates | ternary 604800 300 }}, - "nodes" : - [ - "{REMOTE_PATH}/tugc_users.json.zip" - ], - "timeout_seconds": - { - "count": 30 - } + "tugc_users_index": { + "update_period": {{ .Values.naviback.disableUpdates | ternary 604800 300 }}, + "nodes": [ + "{REMOTE_PATH}/tugc_users.json.zip" + ], + "timeout_seconds": { + "count": 30 + } }, {{- end }}{{- /* .Values.naviback.indices.tugcUsersIndex.enabled */}} {{- if .Values.naviback.indices.tugcUsers.enabled }} - "tugc_users" : - { - "update_period" : 0, - "nodes" : - [ - "{REMOTE_PATH}/" - ], - "timeout_seconds": - { - "count": 30 - } + "tugc_users": { + "update_period": 0, + "nodes": [ + "{REMOTE_PATH}/" + ], + "timeout_seconds": { + "count": 30 + } }, {{- end }}{{- /* .Values.naviback.indices.tugcUsers.enabled */}} {{- if .Values.naviback.indices.tugc2gisIndex.enabled }} - "tugc_2gis_index" : - { - "update_period" : {{ .Values.naviback.disableUpdates | ternary 604800 600 }}, - "nodes" : - [ - "{REMOTE_PATH}/tugc_2gis.json.zip" - ], - "timeout_seconds": - { - "count": 30 - } + "tugc_2gis_index": { + "update_period": {{ .Values.naviback.disableUpdates | ternary 604800 600 }}, + "nodes": [ + "{REMOTE_PATH}/tugc_2gis.json.zip" + ], + "timeout_seconds": { + "count": 30 + } }, {{- end }}{{- /* .Values.naviback.indices.tugc2gisIndex.enabled */}} {{- if .Values.naviback.indices.tugc2gis.enabled }} - "tugc_2gis" : - { - "update_period" : 0, - "nodes" : - [ - "{REMOTE_PATH}/" - ], - "timeout_seconds": - { - "count": 30 - } + "tugc_2gis": { + "update_period": 0, + "nodes": [ + "{REMOTE_PATH}/" + ], + "timeout_seconds": { + "count": 30 + } }, {{- end }}{{- /* .Values.naviback.indices.tugc2gis.enabled */}} {{- if .Values.naviback.indices.onlineSpeeds.enabled }} - "online_speeds" : - { - "update_period" : 0, - "max_updated_time_diff_minutes" : 20, - "nodes" : - [ - "{REMOTE_ECA}/" - ], - "timeout_seconds": - { - "count": 30 - } + "online_speeds": { + "update_period": 0, + "max_updated_time_diff_minutes": 20, + "nodes": [ + "{REMOTE_ECA}/" + ], + "timeout_seconds": { + "count": 30 + } }, {{- end }}{{- /* .Values.naviback.indices.onlineSpeeds.enabled */}} {{- end }} {{- if (include "config.isTaxi" $) }} + {{- if .Values.naviback.indices.taxiReferers.enabled }} + "taxi_referers": { + "update_period": 3600, + "nodes": [ + "{REMOTE_PATH}/options/taxi_referers.json" + ], + "timeout_seconds": { + "count": 360 + } + }, + {{- end }}{{- /* .Values.naviback.indices.taxiReferers.enabled */}} {{- if .Values.naviback.indices.taxiSpeedIndex.enabled }} - "taxi_speed_index": { - "update_period": {{ .Values.naviback.disableUpdates | ternary 604800 20 }}, - "nodes": [ - "{REMOTE_ECA}/traffic/moses/speeds5.json" - ], - "timeout_seconds": { - "count": 60 - } - }, + "taxi_speed_index": { + "update_period": {{ .Values.naviback.disableUpdates | ternary 604800 20 }}, + "nodes": [ + "{REMOTE_ECA}/traffic/moses/speeds5.json" + ], + "timeout_seconds": { + "count": 60 + } + }, {{- end }}{{- /* .Values.naviback.indices.taxiSpeedIndex.enabled */}} {{- if .Values.naviback.indices.onlineTaxiSpeeds.enabled }} - "online_taxi_speeds" : - { - "update_period" : 0, - "max_updated_time_diff_minutes" : 20, - "nodes" : - [ - "{REMOTE_ECA}/" - ], - "timeout_seconds": - { - "count": 60 - } - }, + "online_taxi_speeds": { + "update_period": 0, + "max_updated_time_diff_minutes": 20, + "nodes": [ + "{REMOTE_ECA}/" + ], + "timeout_seconds": { + "count": 60 + } + }, {{- end }}{{- /* .Values.naviback.indices.onlineTaxiSpeeds.enabled */}} {{- end }} {{- if (include "config.isTruck" $) }} {{- if .Values.naviback.indices.passZones.enabled }} - "pass_zones": - { - "update_period": 0, - "nodes": - [ - "{REMOTE_PATH}/" - ], - "timeout_seconds": - { - "count": 60 - } - }, + "pass_zones": { + "update_period": 0, + "nodes": [ + "{REMOTE_PATH}/" + ], + "timeout_seconds": { + "count": 60 + } + }, {{- end }}{{- /* .Values.naviback.indices.passZones.enabled */}} {{- end }} - "edge_transition_probability": { - "update_period": 0, - "nodes": [ - "{REMOTE_PATH}/" - ], - "timeout_seconds": { - "count": 60 - }, - "cache_path": "file://{LOCAL_PATH}/{project_name}/edge_transition_probability.json" - }, - "turn_penalties": { - "update_period": 0, - "nodes": [ - "{REMOTE_PATH}/" - ], - "timeout_seconds": { - "count": 60 - }, - "cache_path": "file://{LOCAL_PATH}/{project_name}/turn_penalties.json" + "edge_transition_probability": { + "update_period": 0, + "nodes": [ + "{REMOTE_PATH}/" + ], + "timeout_seconds": { + "count": 60 + }, + "cache_path": "file://{LOCAL_PATH}/{project_name}/edge_transition_probability.json" }, - {{- if .Values.s3.enabled }} - "s3": { - "distance_matrix": { - "endpoint": {{ .Values.s3.host | quote }}, - "bucket": {{ .Values.s3.bucket | quote }}, - "access_key": {{ .Values.s3.accessKey | quote }}, - "secret_key": {{ .Values.s3.secretKey | quote }} - } + "turn_penalties": { + "update_period": 0, + "nodes": [ + "{REMOTE_PATH}/" + ], + "timeout_seconds": { + "count": 60 }, + "cache_path": "file://{LOCAL_PATH}/{project_name}/turn_penalties.json" + }, + {{- if .Values.naviback.indices.snImport.enabled }} + "sn_import": { + "update_period": 0, + "nodes": [ + "{REMOTE_PATH}/" + ], + "timeout_seconds": { + "count": 60 + } + }, + {{- end }}{{- /* .Values.naviback.indices.snImport.enabled */}} + {{- if .Values.naviback.indices.geoImport.enabled }} + "geo_import": { + "update_period": 0, + "nodes": [ + "{REMOTE_PATH}/" + ], + "timeout_seconds": { + "count": 60 + } + }, + {{- end }}{{- /* .Values.naviback.indices.geoImport.enabled */}} + {{- if .Values.s3.enabled }} + "s3": { + "distance_matrix": { + {{- if .Values.s3.suffix }} + "suffix": {{ .Values.s3.suffix | quote }}, + {{- end }} + "endpoint": {{ .Values.s3.host | quote }}, + "bucket": {{ .Values.s3.bucket | quote }}, + "access_key": {{ .Values.s3.accessKey | quote }}, + "secret_key": {{ .Values.s3.secretKey | quote }} + } + }, {{- end }} {{- if (include "config.isMapMatching" $) }} - "map_matching" : - { - "fmm": - { - "k": "24", - "radius": "4000", - "gps_error": "3000", - "vmax": "40", - "factor": "1.5", - "reverse_tolerance": "0.1" - } + "map_matching": { + "fmm": { + "k": "24", + "radius": "4000", + "gps_error": "3000", + "vmax": "40", + "factor": "1.5", + "reverse_tolerance": "0.1" + } }, {{- end }} {{- if .Values.kafka.enabled }} - "kafka": { - "task_group_id" : {{ .Values.kafka.groupId | quote }}, - "cancel_group_id": {{ .Values.kafka.groupId | quote }}, - "handlers_number": {{ .Values.kafka.handlersNumber }}, - {{- /* - Collect merged Kafka properties from these dictionaries: - - kafka.properties: this is a simple key/value dictionary - - kafka.fileProperties: this is a key/content dictionary given in values, - content is sensitive and stored in Secret resource, they get - mounted as files sonamed after key. While actual secret values are - hidden this way, what actually goes here in environment properties is - file names. This value substitution is implemented down here. - */ -}} - {{- $kafkaProperties := dict -}} - {{- range $key, $_ := .Values.kafka.fileProperties -}} - {{- $_ := set $kafkaProperties $key (printf "/etc/2gis/mosesd/secret/%s" $key) -}} - {{- end -}} - {{- $kafkaProperties := mustMerge $kafkaProperties .Values.kafka.properties -}} - "kafka_properties": {{ mustToPrettyJson $kafkaProperties | nindent 12 }}, - "distance_matrix": { - "task_topic": {{ .Values.kafka.distanceMatrix.taskTopic | quote }}, - "cancel_topic": {{ .Values.kafka.distanceMatrix.cancelTopic | quote }}, - "status_topic": {{ .Values.kafka.distanceMatrix.statusTopic | quote }}, - "update_task_status_period_sec": {{ .Values.kafka.distanceMatrix.updateTaskStatusPeriodSec | int }}, - "message_expired_period_sec" : {{ .Values.kafka.distanceMatrix.messageExpiredPeriodSec | int }}, - "request_download_timeout_sec" : {{ .Values.kafka.distanceMatrix.requestDownloadTimeoutSec | int }}, - "response_upload_timeout_sec": {{ .Values.kafka.distanceMatrix.responseUploadTimeoutSec | int }} - } - }, + "kafka": { + "task_group_id": {{ .Values.kafka.groupId | quote }}, + "cancel_group_id": {{ .Values.kafka.groupId | quote }}, + "handlers_number": {{ .Values.kafka.handlersNumber }}, + {{- /* + Collect merged Kafka properties from these dictionaries: + - kafka.properties: this is a simple key/value dictionary + - kafka.fileProperties: this is a key/content dictionary given in values, + content is sensitive and stored in Secret resource, they get + mounted as files sonamed after key. While actual secret values are + hidden this way, what actually goes here in environment properties is + file names. This value substitution is implemented down here. + */ -}} + {{- $kafkaProperties := dict -}} + {{- range $key, $_ := .Values.kafka.fileProperties -}} + {{- $_ := set $kafkaProperties $key (printf "/etc/2gis/mosesd/secret/%s" $key) -}} + {{- end -}} + {{- $kafkaProperties := mustMerge $kafkaProperties .Values.kafka.properties }} + "kafka_properties": + {{- mustToPrettyJson $kafkaProperties | nindent 12 -}}, + "distance_matrix": { + "task_topic": {{ .Values.kafka.distanceMatrix.taskTopic | quote }}, + "cancel_topic": {{ .Values.kafka.distanceMatrix.cancelTopic | quote }}, + "status_topic": {{ .Values.kafka.distanceMatrix.statusTopic | quote }}, + "update_task_status_period_sec": {{ .Values.kafka.distanceMatrix.updateTaskStatusPeriodSec | int }}, + "message_expired_period_sec": {{ .Values.kafka.distanceMatrix.messageExpiredPeriodSec | int }}, + "request_download_timeout_sec": {{ .Values.kafka.distanceMatrix.requestDownloadTimeoutSec | int }}, + "response_upload_timeout_sec": {{ .Values.kafka.distanceMatrix.responseUploadTimeoutSec | int }} + } + }, {{- end }} {{- if and .Values.naviback.bss.enabled .Values.naviback.bss.client.serviceRemoteAddress }} - "business_statistics_system" : { - "client" : { - "service_remote_address" : {{ .Values.naviback.bss.client.serviceRemoteAddress | mustToJson }}, - "message_count_to_flush" : {{ .Values.naviback.bss.client.messageCountToFlush | mustToJson }}, - "use_compression" : {{ .Values.naviback.bss.client.useCompression | mustToJson }}, - "package_size_max_bytes" : {{ .Values.naviback.bss.client.packageSizeMaxBytes | mustToJson }}, - "pending_transmission_max_count" : {{ .Values.naviback.bss.client.pendingTransmissionMaxCount | mustToJson }}, - "timeout_ms" : {{ .Values.naviback.bss.client.timeoutLimitMilSec | mustToJson }} - } - }, + "business_statistics_system": { + "client": { + "service_remote_address": {{ .Values.naviback.bss.client.serviceRemoteAddress | mustToJson }}, + "message_count_to_flush": {{ .Values.naviback.bss.client.messageCountToFlush | mustToJson }}, + "use_compression": {{ .Values.naviback.bss.client.useCompression | mustToJson }}, + "package_size_max_bytes": {{ .Values.naviback.bss.client.packageSizeMaxBytes | mustToJson }}, + "pending_transmission_max_count": {{ .Values.naviback.bss.client.pendingTransmissionMaxCount | mustToJson }}, + "timeout_ms": {{ .Values.naviback.bss.client.timeoutLimitMilSec | mustToJson }} + } + }, {{- end }}{{- /* .Values.naviback.bss.enabled */}} {{- if not .Values.license.notSupported }} {{- $licenseUrl := .Values.license.url | required "Valid license.url required!" }} @@ -548,7 +552,7 @@ data: {{- end }}{{- /* if not .Values.license.notSupported */}} {{- if .Values.naviback.rtr.enabled }} "restrictions_index": { - "update_period": 300, + "update_period": {{ .Values.naviback.rtr.updatePeriod | int }}, "nodes": [ "{{ .Values.naviback.rtr.url }}/restrictions_index.json.zip" ], @@ -558,43 +562,94 @@ data: "cache_path_": "file://{LOCAL_PATH}/{project_name}/restrictions_index.json.zip" }, {{- end }}{{- /* if .Values.naviback.rtr.enabled */}} + {{- if .Values.naviback.hierarchies.enabled }} + "hierarchies": { + "graphs_file_name": "{SHORTCUT_PATH}", + "patches_dir_name": "{PATCHES_PATH}" + }, + "hierarchy_shortcuts": { + "update_period": {{ .Values.naviback.disableUpdates | ternary 604800 600 }}, + "nodes": [ + "{S3_CACHE_PATH}/shortcuts/shortcuts.tar.gz" + ], + "timeout_seconds": { + "count": 600 + } + }, + "hierarchy_patches": { + "update_period": {{ .Values.naviback.disableUpdates | ternary 604800 600 }}, + "nodes": [ + "{S3_CACHE_PATH}/patches.json" + ], + "timeout_seconds": { + "count": 600 + } + }, + "sn_import": { + "update_period": {{ .Values.naviback.disableUpdates | ternary 604800 600 }}, + "nodes": [ + "{S3_CACHE_PATH}/sn/export_sn.tar.gz" + ], + "timeout_seconds": { + "count": 600 + } + }, + {{- end }}{{- /* if .Values.naviback.hierarchies.enabled */}} + {{- if .Values.naviback.etaScheduleIndex.enabled }} + "eta_schedule_index": { + "update_period": {{ .Values.naviback.disableUpdates | ternary 604800 10 }}, + "nodes": [ + "{{ .Values.naviback.etaScheduleIndex.url }}" + ], + "timeout_seconds": { + "count": 5 + } + }, + "eta_schedule": { + "update_period": 0, + "timeout_seconds": { + "count": 5 + } + }, + {{- end }}{{- /* if .Values.naviback.etaScheduleIndex.enabled */}} {{- if .Values.naviback.additionalSections }} {{- include "tplvalues.render" ( dict "value" .Values.naviback.additionalSections "context" $) | nindent 8 }} {{- end }} "server_info": { - "simple_network_car" : {{ include "config.setSimpleNetworkCar" $ | default false -}}, - "simple_network_pedestrian" : {{ include "config.setSimpleNetworkPedestrian" $ | default false -}}, - "simple_network_taxi" : {{ include "config.setSimpleNetworkTaxi" $ | default false -}}, - "simple_network_bicycle" : {{ include "config.setSimpleNetworkBicycle" $ | default false -}}, - "simple_network_truck" : {{ include "config.setSimpleNetworkTruck" $ | default false -}}, - "simple_network_emergency" : {{ include "config.setSimpleNetworkEmergency" $ | default false -}}, + "tiles_metrics_threshold": {{ .Values.naviback.tilesMetricsThreshold | int }}, + "simple_network_car": {{ include "config.setSimpleNetworkCar" $ | default false -}}, + "simple_network_pedestrian": {{ include "config.setSimpleNetworkPedestrian" $ | default false -}}, + "simple_network_taxi": {{ include "config.setSimpleNetworkTaxi" $ | default false -}}, + "simple_network_bicycle": {{ include "config.setSimpleNetworkBicycle" $ | default false -}}, + "simple_network_truck": {{ include "config.setSimpleNetworkTruck" $ | default false -}}, + "simple_network_emergency": {{ include "config.setSimpleNetworkEmergency" $ | default false -}}, "ctx_only": {{ include "rules.inRoutingSectionOnly" (dict "routingValue" "ctx" "context" $) -}}, - "attractor_car" : {{ include "config.setAttractorCar" $ | default false -}}, - "attractor_pedestrian" : {{ include "config.setAttractorPedestrian" $ | default false -}}, - "attractor_bicycle" : {{ include "config.setAttractorBicycle" $ | default false -}}, - "attractor_taxi" : {{ include "config.setAttractorTaxi" $ | default false -}}, - "attractor_truck" : {{ include "config.setAttractorTruck" $ | default false -}}, - "reduce_edges_optimization_flag" : {{ include "config.setReduceEdgesOptimizationFlag" $ | default false -}}, + "attractor_car": {{ include "config.setAttractorCar" $ | default false -}}, + "attractor_pedestrian": {{ include "config.setAttractorPedestrian" $ | default false -}}, + "attractor_bicycle": {{ include "config.setAttractorBicycle" $ | default false -}}, + "attractor_taxi": {{ include "config.setAttractorTaxi" $ | default false -}}, + "attractor_truck": {{ include "config.setAttractorTruck" $ | default false -}}, + "reduce_edges_optimization_flag": {{ include "config.setReduceEdgesOptimizationFlag" $ | default false -}}, {{- if ((.Values.resources).limits).cpu }} - "dist_matrix_thread_pool_size" : {{ include "config.setCpuNumber" . }}, - "simple_network_build_thread_pool_size" : {{ include "config.setCpuNumber" . }}, + "dist_matrix_thread_pool_size": {{ include "config.setCpuNumber" . }}, + "simple_network_build_thread_pool_size": {{ include "config.setCpuNumber" . }}, {{- end }} - "update_projects_limit" : 2, - "carrouting_page_cache_size" : 8192, - "carrouting_tile_cache_size" : 8192, - "carrouting_bit_tile_cache_size" : 2048, - "dump_query" : {{ mustToJson (.Values.naviback.dump).query }}, - "dump_result" : {{ mustToJson (.Values.naviback.dump).result }}, - "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 }}, + "update_projects_limit": 2, + "carrouting_page_cache_size": 8192, + "carrouting_tile_cache_size": 8192, + "carrouting_bit_tile_cache_size": 2048, + "dump_query": {{ mustToJson (.Values.naviback.dump).query }}, + "dump_result": {{ mustToJson (.Values.naviback.dump).result }}, + "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 }}, {{- if .Values.naviback.server_id }} - "server_id" : "{{- include "tplvalues.render" ( dict "value" .Values.naviback.server_id "context" .) }}", + "server_id": "{{- include "tplvalues.render" ( dict "value" .Values.naviback.server_id "context" .) }}", {{- else }} - "server_id" : "{{- include "naviback.fullname" . }}", + "server_id": "{{- include "generic-chart.fullname" . }}", {{- end }} - "extended_metrics": [ ], + "extended_metrics": [], "dash_colors": [ { "ratio": 2, @@ -678,6 +733,11 @@ data: prefix: "/" route: cluster: attractor + {{- if .Values.transmitter.retry.enabled }} + retry_policy: + retry_on: {{ .Values.transmitter.retry.retryOn | quote }} + num_retries: {{ .Values.transmitter.retry.numRetries | int }} + {{- end }} http_filters: - name: envoy.router typed_config: diff --git a/charts/navi-back/templates/deployment.yaml b/charts/navi-back/templates/deployment.yaml index 44a77a566..2ff5e1da3 100644 --- a/charts/navi-back/templates/deployment.yaml +++ b/charts/navi-back/templates/deployment.yaml @@ -1,13 +1,13 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ include "naviback.fullname" . }} + name: {{ include "generic-chart.fullname" . }} labels: - {{- include "naviback.labels" . | nindent 4 }} + {{- include "generic-chart.labels" . | nindent 4 }} rule: {{ .Values.naviback.app_rule | default "" | quote }} navigroup: {{ .Values.navigroup | default "" | quote }} {{- if .Values.dataGroup.enabled }} - dataGroupTimestamp: {{ .Values.dataGroup.timestamp | quote }} + dataGroupTimestamp: {{ .Values.dataGroup.timestamp | int | quote }} dataGroupPrefix: {{ .Values.dataGroup.prefix | quote }} {{- end }}{{- /* dataGroup.enabled */}} {{- with .Values.labels }} @@ -24,20 +24,20 @@ spec: {{- end }} selector: matchLabels: - {{- include "naviback.selectorLabels" . | nindent 6 }} + {{- include "generic-chart.selectorLabels" . | nindent 6 }} template: metadata: annotations: - checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }} + checksum/config: {{ (include (print $.Template.BasePath "/configmap.yaml") . | fromYaml).data | toYaml | sha256sum }} + checksum/secret: {{ (include (print $.Template.BasePath "/secret.yaml") . | fromYaml).data | toYaml | sha256sum }} {{- with .Values.podAnnotations }} {{- toYaml . | nindent 8 }} {{- end }} labels: - {{- include "naviback.selectorLabels" . | nindent 8 }} + {{- include "generic-chart.selectorLabels" . | nindent 8 }} navigroup: {{ .Values.navigroup | default "" | quote }} {{- if .Values.dataGroup.enabled }} - dataGroupTimestamp: {{ .Values.dataGroup.timestamp | quote }} + dataGroupTimestamp: {{ .Values.dataGroup.timestamp | int | quote }} dataGroupPrefix: {{ .Values.dataGroup.prefix | quote }} {{- end }} spec: @@ -45,53 +45,46 @@ spec: imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} - serviceAccountName: {{ include "naviback.serviceAccountName" . }} + serviceAccountName: {{ include "generic-chart.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} volumes: - - name: {{ include "naviback.fullname" . }}-configmap + - name: {{ include "generic-chart.fullname" . }}-configmap configMap: - name: {{ include "naviback.fullname" . }}-configmap + name: {{ include "generic-chart.fullname" . }}-configmap {{- if .Values.kafka.fileProperties }} - - name: {{ include "naviback.fullname" . }}-secret + - name: {{ include "generic-chart.fullname" . }}-secret secret: - secretName: {{ include "naviback.fullname" . }}-secret + secretName: {{ include "generic-chart.fullname" . }}-secret {{- end }} {{- if .Values.naviback.sentry.enabled }} - name: sentry-volume emptyDir: {} {{- end }} - {{- if .Values.frozenData.enabled }} - - name: frozen-data + {{- if .Values.naviback.hierarchies.enabled }} + - name: hierarchies-volume emptyDir: {} {{- end }} + {{- if .Values.extraVolumes }} + {{- include "tplvalues.render" (dict "value" .Values.extraVolumes "context" $) | nindent 6 }} + {{- end }} {{- if .Values.priorityClassName }} priorityClassName: {{ .Values.priorityClassName }} {{- end }} - {{- if .Values.frozenData.enabled }} + {{- if .Values.initContainers }} initContainers: - - name: frozen-data - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - image: {{ required "A valid .Values.dgctlDockerRegistry entry required" .Values.dgctlDockerRegistry }}/{{ .Values.frozenData.image.repository }}:{{ .Values.frozenData.image.tag }} - command: ['sh', '-ec', 'cp -r /frozen_data_init/* /opt/castle; ls -l /opt/castle'] - imagePullPolicy: {{ .Values.frozenData.pullPolicy }} - {{- if (.Values.frozenData).resources }} - resources: {{- toYaml .Values.frozenData.resources | nindent 12 }} - {{- end }} - volumeMounts: - - name: frozen-data - mountPath: /opt/castle + {{- include "tplvalues.render" (dict "value" .Values.initContainers "context" $) | nindent 8 }} {{- end }} containers: {{- if .Values.transmitter.enabled }} - - name: {{ include "naviback.containerName" . }}-envoy +{{- /* generic-chart.containerName redefined in _helpers.tpl */}} + - name: {{ include "generic-chart.containerName" . }}-envoy securityContext: {{- 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 }} volumeMounts: - - name: {{ include "naviback.fullname" . }}-configmap + - name: {{ include "generic-chart.fullname" . }}-configmap mountPath: /etc/envoy/envoy.yaml subPath: envoy.yaml {{- if (.Values.envoy).resources }} @@ -153,34 +146,48 @@ spec: resources: {{- toYaml .Values.metrics.resources | nindent 12 }} {{- end }} - - name: {{ include "naviback.containerName" . }} +{{- /* generic-chart.containerName redefined in _helpers.tpl */}} + - name: {{ include "generic-chart.containerName" . }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} image: {{ required "A valid .Values.dgctlDockerRegistry entry required" .Values.dgctlDockerRegistry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }} imagePullPolicy: {{ .Values.image.pullPolicy }} + {{- if .Values.command }} + command: + {{- include "tplvalues.render" (dict "value" .Values.command "context" $) | nindent 12 }} + {{- else }} command: [ "/usr/sbin/2gis/mosesd/tini", "--" ] + {{- end }} + {{- if .Values.args }} + args: + {{- include "tplvalues.render" (dict "value" .Values.args "context" $) | nindent 12 }} + {{- else }} args: - - /usr/sbin/2gis/mosesd/mosesd - - --config - - /etc/2gis/mosesd/navi-back.conf + - /usr/sbin/2gis/mosesd/mosesd + - --config + - /etc/2gis/mosesd/navi-back.conf + {{- end }} volumeMounts: - - name: {{ include "naviback.fullname" . }}-configmap + - name: {{ include "generic-chart.fullname" . }}-configmap mountPath: /etc/2gis/mosesd/navi-back.conf subPath: navi-back.conf - - name: {{ include "naviback.fullname" . }}-configmap + - name: {{ include "generic-chart.fullname" . }}-configmap mountPath: /etc/2gis/mosesd/rules.conf subPath: rules.conf {{- if .Values.kafka.fileProperties }} - - name: {{ include "naviback.fullname" . }}-secret + - name: {{ include "generic-chart.fullname" . }}-secret mountPath: /etc/2gis/mosesd/secret/ {{- end }} {{- if .Values.naviback.sentry.enabled }} - name: sentry-volume mountPath: {{ .Values.naviback.sentry.reportPath | default "/tmp/sentry" | quote }} {{- end }} - {{- if .Values.frozenData.enabled }} - - name: frozen-data - mountPath: /opt/castle + {{- if .Values.naviback.hierarchies.enabled }} + - name: hierarchies-volume + mountPath: "/tmp/hierarchies" + {{- end }} + {{- if .Values.extraVolumeMounts }} + {{- include "tplvalues.render" (dict "value" .Values.extraVolumeMounts "context" $) | nindent 10 }} {{- end }} ports: - name: http @@ -191,26 +198,48 @@ spec: containerPort: {{ .Values.naviback.grpcPort }} protocol: TCP {{- end }} + {{- if .Values.customStartupProbe }} + startupProbe: + {{- include "tplvalues.render" (dict "value" .Values.customStartupProbe "context" $) | nindent 12 }} + {{- else if .Values.startupProbe.enabled }} startupProbe: httpGet: path: /successfulwork port: http - periodSeconds: 5 - failureThreshold: 360 + initialDelaySeconds: {{ .Values.startupProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.startupProbe.periodSeconds }} + timeoutSeconds: {{ .Values.startupProbe.timeoutSeconds }} + successThreshold: {{ .Values.startupProbe.successThreshold }} + failureThreshold: {{ .Values.startupProbe.failureThreshold }} + {{- end }} + {{- if .Values.customLivenessProbe }} + livenessProbe: + {{- include "tplvalues.render" (dict "value" .Values.customLivenessProbe "context" $) | nindent 12 }} + {{- else if .Values.startupProbe.enabled }} livenessProbe: httpGet: path: /heartbeat port: http - periodSeconds: 5 - timeoutSeconds: 3 - failureThreshold: 2 + initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.livenessProbe.failureThreshold }} + {{- end }} + {{- if .Values.customReadinessProbe }} + readinessProbe: + {{- include "tplvalues.render" (dict "value" .Values.customReadinessProbe "context" $) | nindent 12 }} + {{- else if .Values.readinessProbe.enabled }} readinessProbe: httpGet: path: /successfulwork port: http - periodSeconds: 5 - timeoutSeconds: 3 - failureThreshold: 2 + initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.readinessProbe.failureThreshold }} + {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} env: @@ -223,6 +252,9 @@ spec: preStop: exec: command: ["/bin/sh", "-c", "sleep {{ .Values.preStopDelay | default 5 | int }}"] + {{- if .Values.sidecars }} + {{- include "tplvalues.render" (dict "value" .Values.sidecars "context" $) | nindent 8 }} + {{- end }} terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds | default 60 }} {{- with .Values.nodeSelector }} nodeSelector: diff --git a/charts/navi-back/templates/hpa.yaml b/charts/navi-back/templates/hpa.yaml index 09de7f099..41e1e392d 100644 --- a/charts/navi-back/templates/hpa.yaml +++ b/charts/navi-back/templates/hpa.yaml @@ -1,39 +1 @@ -{{- if .Values.hpa.enabled }} -apiVersion: {{ include "capabilities.hpa.apiVersion" $ }} -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "naviback.fullname" . }} - labels: - {{- include "naviback.labels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ include "naviback.fullname" . }} - minReplicas: {{ .Values.hpa.minReplicas }} - maxReplicas: {{ .Values.hpa.maxReplicas }} - behavior: - {{- if .Values.hpa.scaleUp }} - scaleUp: - {{- include "tplvalues.render" ( dict "value" .Values.hpa.scaleUp "context" $) | nindent 8 }} - {{- end }} - {{- if .Values.hpa.scaleDown }} - scaleDown: - {{- include "tplvalues.render" ( dict "value" .Values.hpa.scaleDown "context" $) | nindent 8 }} - {{- end }} - metrics: - {{- if .Values.hpa.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - target: - type: Utilization - averageUtilization: {{ .Values.hpa.targetCPUUtilizationPercentage }} - {{- end }} - {{- if .Values.hpa.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - targetAverageUtilization: {{ .Values.hpa.targetMemoryUtilizationPercentage }} - {{- end }} -{{- end }} +{{- template "generic-chart.hpa.tpl" . }} diff --git a/charts/navi-back/templates/ingress.yaml b/charts/navi-back/templates/ingress.yaml index d8706758e..8604b0c34 100644 --- a/charts/navi-back/templates/ingress.yaml +++ b/charts/navi-back/templates/ingress.yaml @@ -1,5 +1,5 @@ {{- if .Values.ingress.enabled -}} -{{- $fullName := include "naviback.fullname" . -}} +{{- $fullName := include "generic-chart.fullname" . -}} {{- $svcPort := .Values.service.port -}} {{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} @@ -17,7 +17,7 @@ kind: Ingress metadata: name: {{ $fullName }} labels: - {{- include "naviback.labels" . | nindent 4 }} + {{- include "generic-chart.labels" . | nindent 4 }} {{- with .Values.ingress.annotations }} annotations: {{- toYaml . | nindent 4 }} diff --git a/charts/navi-back/templates/pdb.yaml b/charts/navi-back/templates/pdb.yaml index e51715299..824f66d70 100644 --- a/charts/navi-back/templates/pdb.yaml +++ b/charts/navi-back/templates/pdb.yaml @@ -1,21 +1 @@ -{{- with .Values.pdb }} -{{- if .enabled }} ---- -apiVersion: policy/v1 -kind: PodDisruptionBudget -metadata: - name: {{ include "naviback.fullname" $ }} - labels: - {{- include "naviback.labels" $ | nindent 4 }} -spec: - {{- if .minAvailable }} - minAvailable: {{ .minAvailable }} - {{- end }} - {{- if .maxUnavailable }} - maxUnavailable: {{ .maxUnavailable }} - {{- end }} - selector: - matchLabels: - {{- include "naviback.selectorLabels" $ | nindent 6 }} -{{- end }} -{{- end }} +{{- template "generic-chart.pdb.tpl" . }} diff --git a/charts/navi-back/templates/secret.yaml b/charts/navi-back/templates/secret.yaml index f3f376287..22e2f7c0e 100644 --- a/charts/navi-back/templates/secret.yaml +++ b/charts/navi-back/templates/secret.yaml @@ -2,9 +2,9 @@ apiVersion: v1 kind: Secret metadata: - name: {{ include "naviback.fullname" . }}-secret + name: {{ include "generic-chart.fullname" . }}-secret labels: - {{- include "naviback.labels" . | nindent 4 }} + {{- include "generic-chart.labels" . | nindent 4 }} {{- if .Values.labels }} {{- toYaml .Values.labels | nindent 4 }} {{- end }} diff --git a/charts/navi-back/templates/service.yaml b/charts/navi-back/templates/service.yaml index 1b3d93aff..4947c886e 100644 --- a/charts/navi-back/templates/service.yaml +++ b/charts/navi-back/templates/service.yaml @@ -2,9 +2,9 @@ apiVersion: v1 kind: Service metadata: - name: {{ include "naviback.fullname" . }} + name: {{ include "generic-chart.fullname" . }} labels: - {{- include "naviback.labels" . | nindent 4 }} + {{- include "generic-chart.labels" . | nindent 4 }} {{- if .Values.service.labels }} {{- include "tplvalues.render" ( dict "value" .Values.service.labels "context" $) | nindent 4 }} {{- end }} @@ -12,7 +12,7 @@ metadata: navigroup: {{ .Values.navigroup | default "" | quote }} type: {{ .Values.naviback.type | default "" | quote }} {{- if .Values.dataGroup.enabled }} - dataGroupTimestamp: {{ .Values.dataGroup.timestamp | quote }} + dataGroupTimestamp: {{ .Values.dataGroup.timestamp | int | quote }} dataGroupPrefix: {{ .Values.dataGroup.prefix | quote }} {{- end }} {{- if .Values.naviback.behindSplitter }} @@ -39,16 +39,19 @@ spec: protocol: TCP name: grpc {{- end }} + {{- if .Values.service.extraPorts }} + {{- include "tplvalues.render" (dict "value" .Values.service.extraPorts "context" $) | nindent 4 }} + {{- end }} selector: - {{- include "naviback.selectorLabels" . | nindent 4 }} + {{- include "generic-chart.selectorLabels" . | nindent 4 }} {{- if .Values.service.headless.enabled }} --- apiVersion: v1 kind: Service metadata: - name: {{ include "naviback.fullname" . }}-headless + name: {{ include "generic-chart.fullname" . }}-headless labels: - {{- include "naviback.labels" . | nindent 4 }} + {{- include "generic-chart.labels" . | nindent 4 }} {{- if .Values.service.headless.labels }} {{- include "tplvalues.render" ( dict "value" .Values.service.labels "context" $) | nindent 4 }} {{- end }} @@ -56,7 +59,7 @@ metadata: navigroup: {{ .Values.navigroup | default "" | quote }} type: {{ .Values.naviback.type | default "" | quote }} {{- if .Values.dataGroup.enabled }} - dataGroupTimestamp: {{ .Values.dataGroup.timestamp | quote }} + dataGroupTimestamp: {{ .Values.dataGroup.timestamp | int | quote }} dataGroupPrefix: {{ .Values.dataGroup.prefix | quote }} {{- end }} {{- /* pretend to be behind splitter to get ignored by mfront */}} @@ -81,5 +84,5 @@ spec: name: grpc {{- end }} selector: - {{- include "naviback.selectorLabels" . | nindent 4 }} + {{- include "generic-chart.selectorLabels" . | nindent 4 }} {{- end }} diff --git a/charts/navi-back/templates/serviceaccount.yaml b/charts/navi-back/templates/serviceaccount.yaml index 2854df970..7109eec48 100644 --- a/charts/navi-back/templates/serviceaccount.yaml +++ b/charts/navi-back/templates/serviceaccount.yaml @@ -1,12 +1 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "naviback.serviceAccountName" . }} - labels: - {{- include "naviback.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} +{{- template "generic-chart.serviceaccount.tpl" . }} diff --git a/charts/navi-back/templates/vpa.yaml b/charts/navi-back/templates/vpa.yaml index b73202472..5de5ca28e 100644 --- a/charts/navi-back/templates/vpa.yaml +++ b/charts/navi-back/templates/vpa.yaml @@ -1,35 +1 @@ -{{ with .Values.vpa }} -{{- if .enabled }} ---- - -apiVersion: autoscaling.k8s.io/v1 -kind: VerticalPodAutoscaler -metadata: - name: {{ include "naviback.fullname" $ }} - labels: - {{- include "naviback.labels" $ | nindent 4 }} -spec: - targetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ include "naviback.fullname" $ }} - updatePolicy: - updateMode: {{ default "Auto" .updateMode }} - resourcePolicy: - containerPolicies: - - containerName: {{ include "naviback.containerName" $ }} - mode: Auto - {{- with .minAllowed }} - minAllowed: - {{- toYaml . | nindent 10 }} - {{- end }} - {{- with .maxAllowed }} - maxAllowed: - {{- toYaml . | nindent 10 }} - {{- end }} - {{- if $.Values.transmitter.enabled }} - - containerName: {{ include "naviback.containerName" $ }}-envoy - mode: "Off" - {{- end }} -{{- end }} -{{- end }} +{{- template "generic-chart.vpa.tpl" . }} diff --git a/charts/navi-back/values.yaml b/charts/navi-back/values.yaml index e126cc70c..baa7949a5 100644 --- a/charts/navi-back/values.yaml +++ b/charts/navi-back/values.yaml @@ -1,27 +1,54 @@ # @section Docker Registry settings -# @param dgctlDockerRegistry Docker Registry endpoint where On-Premise services' images reside. Format: `host:port`. +# @param dgctlDockerRegistry Docker Registry endpoint where On-Premise services' images reside. Format: `host:port` dgctlDockerRegistry: '' # @section Common settings -# @param replicaCount A replica count for the pod. +# @param replicaCount A replica count for the pod # @param revisionHistoryLimit Number of replica sets to keep for deployment rollbacks -# @param imagePullSecrets Kubernetes image pull secrets. -# @param nameOverride Base name to use in all the Kubernetes entities deployed by this chart. -# @param fullnameOverride Base fullname to use in all the Kubernetes entities deployed by this chart. -# @param podAnnotations Kubernetes [pod annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/). -# @param podSecurityContext Kubernetes [pod security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/). -# @param securityContext Kubernetes [security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/). -# @param nodeSelector Kubernetes [node selectors](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector). -# @param tolerations Kubernetes [tolerations](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) settings. -# @param affinity Kubernetes pod [affinity settings](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity). -# @param labels Custom labels to set to Deployment resource. -# @param priorityClassName Kubernetes [Pod Priority](https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/#priorityclass) class name. -# @param preStopDelay Delay in seconds before terminating container. -# @param terminationGracePeriodSeconds Maximum time allowed for graceful shutdown. +# @param imagePullSecrets Kubernetes image pull secrets +# @param nameOverride Base name to use in all the Kubernetes entities deployed by this chart +# @param fullnameOverride Base fullname to use in all the Kubernetes entities deployed by this chart +# @param podAnnotations Kubernetes [pod annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) +# @param podSecurityContext Kubernetes [pod security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) +# @param securityContext Kubernetes [security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) +# @param nodeSelector Kubernetes [node selectors](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector) +# @param tolerations Kubernetes [tolerations](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) settings +# @param affinity Kubernetes pod [affinity settings](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity) +# @param labels Custom labels to set to Deployment resource +# @param priorityClassName Kubernetes [Pod Priority](https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/#priorityclass) class name +# @param preStopDelay Delay in seconds before terminating container +# @param terminationGracePeriodSeconds Maximum time allowed for graceful shutdown +# @param extraVolumes Optionally specify extra list of additional volumes +# @param extraVolumeMounts Optionally specify extra list of additional volumeMounts +# @param initContainers Add additional init containers +# @param sidecars Add additional sidecar containers +# @param livenessProbe.enabled Enable livenessProbe +# @param livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe +# @param livenessProbe.periodSeconds Period seconds for livenessProbe +# @param livenessProbe.timeoutSeconds Timeout seconds for livenessProbe +# @param livenessProbe.failureThreshold Failure threshold for livenessProbe +# @param livenessProbe.successThreshold Success threshold for livenessProbe +# @param readinessProbe.enabled Enable readinessProbe +# @param readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe +# @param readinessProbe.periodSeconds Period seconds for readinessProbe +# @param readinessProbe.timeoutSeconds Timeout seconds for readinessProbe +# @param readinessProbe.failureThreshold Failure threshold for readinessProbe +# @param readinessProbe.successThreshold Success threshold for readinessProbe +# @param startupProbe.enabled Enable startupProbe +# @param startupProbe.initialDelaySeconds Initial delay seconds for startupProbe +# @param startupProbe.periodSeconds Period seconds for startupProbe +# @param startupProbe.timeoutSeconds Timeout seconds for startupProbe +# @param startupProbe.failureThreshold Failure threshold for startupProbe +# @param startupProbe.successThreshold Success threshold for startupProbe +# @param customLivenessProbe Override default liveness probe +# @param customReadinessProbe Override default readiness probe +# @param customStartupProbe Override default startup probe +# @param command Override default command +# @param args Override default args replicaCount: 1 revisionHistoryLimit: 1 @@ -38,9 +65,39 @@ labels: {} priorityClassName: '' preStopDelay: 5 terminationGracePeriodSeconds: 60 - - -# @section Deployment settings +extraVolumes: [] +extraVolumeMounts: [] +initContainers: [] +sidecars: [] +livenessProbe: + enabled: true + initialDelaySeconds: 0 + periodSeconds: 5 + timeoutSeconds: 3 + failureThreshold: 2 + successThreshold: 1 +readinessProbe: + enabled: true + initialDelaySeconds: 0 + periodSeconds: 5 + timeoutSeconds: 3 + failureThreshold: 2 + successThreshold: 1 +startupProbe: + enabled: true + initialDelaySeconds: 0 + periodSeconds: 5 + failureThreshold: 360 + timeoutSeconds: 5 + successThreshold: 1 +customLivenessProbe: {} +customReadinessProbe: {} +customStartupProbe: {} +command: [] +args: [] + + +# @section Container image settings # @param image.repository Repository # @param image.tag Tag @@ -49,30 +106,31 @@ terminationGracePeriodSeconds: 60 image: repository: 2gis-on-premise/navi-back pullPolicy: IfNotPresent - tag: 7.15.2.4 + tag: 7.23.0.5 # @section Navi-Back application settings -# @extra naviback.ecaHost DEPRECATED: Use naviback.ecaUrl. Domain name of the [Traffic Proxy service](https://docs.2gis.com/en/on-premise/traffic-proxy).
This URL should be accessible from all the pods within your Kubernetes cluster. -# @extra naviback.ecaUrl URL of the [Traffic Proxy service](https://docs.2gis.com/en/on-premise/traffic-proxy).
This URL should be accessible from all the pods within your Kubernetes cluster. -# @extra naviback.forecastHost URL of Traffic forecast service. See the [Traffic Proxy service](https://docs.2gis.com/en/on-premise/traffic-proxy).
This URL should be accessible from all the pods within your Kubernetes cluster. +# @extra naviback.ecaHost DEPRECATED: Use naviback.ecaUrl. Domain name of the [Traffic Proxy service](https://docs.2gis.com/en/on-premise/traffic-proxy).
This URL should be accessible from all the pods within your Kubernetes cluster +# @extra naviback.ecaUrl URL of the [Traffic Proxy service](https://docs.2gis.com/en/on-premise/traffic-proxy).
This URL should be accessible from all the pods within your Kubernetes cluster +# @extra naviback.forecastHost URL of Traffic forecast service. See the [Traffic Proxy service](https://docs.2gis.com/en/on-premise/traffic-proxy).
This URL should be accessible from all the pods within your Kubernetes cluster # @skip naviback.appPort -# @param naviback.dmSourcesLimit Size limit for source matrices. -# @param naviback.dmTargetsLimit Size limit for target matrices. -# @param naviback.handlersNumber Number of HTTP handlers. -# @param naviback.maxProcessTime Maximum processing time limit in minutes. -# @param naviback.responseTimelimit Maximum response time limit in minutes. -# @param naviback.requestTimeout Maximum request time limit in minutes. -# @param naviback.timeoutLimitSec Maximum downloading time can be reached after failures. -# @param naviback.timeoutIncrementSec Downloading time increment after failures. -# @param naviback.totalRetryDurationSec Downloading timeout with all failure retries. -# @param naviback.initialRetryIntervalSec Initial timeout for a failure retry. -# @param naviback.dump.result Dump results in logs. -# @param naviback.dump.query Dump queries in logs. -# @param naviback.dump.answer Dump answers in logs. -# @param naviback.logLevel Logging level, one of: Verbose, Info, Warning, Error, Fatal. -# @param naviback.indexFilename Name of index file. +# @param naviback.dmSourcesLimit Size limit for source matrices +# @param naviback.dmTargetsLimit Size limit for target matrices +# @param naviback.handlersNumber Total number of HTTP/GRPC handlers +# @param naviback.queueSize Internal queue size +# @param naviback.maxProcessTime Maximum processing time limit in minutes +# @param naviback.responseTimelimit Maximum response time limit in minutes +# @param naviback.requestTimeout Maximum request time limit in minutes +# @param naviback.timeoutLimitSec Maximum downloading time can be reached after failures +# @param naviback.timeoutIncrementSec Downloading time increment after failures +# @param naviback.totalRetryDurationSec Downloading timeout with all failure retries +# @param naviback.initialRetryIntervalSec Initial timeout for a failure retry +# @param naviback.dump.result Dump results in logs +# @param naviback.dump.query Dump queries in logs +# @param naviback.dump.answer Dump answers in logs +# @param naviback.logLevel Logging level, one of: Verbose, Info, Warning, Error, Fatal +# @param naviback.indexFilename Name of the index file on Castle # @param naviback.citiesFilename Name of the cities file on Castle # @param naviback.sentry.enabled If sending crash dumps to Sentry needed # @param naviback.sentry.address Sentry URL @@ -82,11 +140,12 @@ image: # @param naviback.sentry.debug Debugging switch # @param naviback.sentry.reportPath Local directory to dump # @param naviback.sentry.handler Handler file location -# @param naviback.castleHost URL of Navi-Castle service, ex: http://navi-castle.svc.
This URL should be accessible from all the pods within your Kubernetes cluster. -# @extra naviback.enablePassableBarriers Consider passable barriers. -# @extra naviback.grpcPort GRPC port to serve. Disabled if empty. +# @extra naviback.castleHost DEPRECATED: Use naviback.castleUrl. Domain name of Navi-Castle service.
This URL should be accessible from all the pods within your Kubernetes cluster +# @param naviback.castleUrl URL of Navi-Castle service.
This URL should be accessible from all the pods within your Kubernetes cluster +# @extra naviback.enablePassableBarriers Consider passable barriers +# @extra naviback.grpcPort GRPC port to serve. Disabled if empty # @param naviback.disableUpdates Test switch for disabling runtime background updates -# @extra naviback.indices List of dynamic indices kill switches. +# @extra naviback.indices List of dynamic indices kill switches # @skip naviback.indices.carOptions.enabled # @skip naviback.indices.carOptions.filename # @skip naviback.indices.countryCarOptions.enabled @@ -95,6 +154,7 @@ image: # @skip naviback.indices.etaCorrectionCores.enabled # @skip naviback.indices.forecastedSpeeds.enabled # @skip naviback.indices.forecastedSpeedsIndex.enabled +# @skip naviback.indices.geoImport.enabled # @skip naviback.indices.onlineSpeeds.enabled # @skip naviback.indices.onlineTaxiSpeeds.enabled # @skip naviback.indices.passZones.enabled @@ -103,6 +163,7 @@ image: # @skip naviback.indices.restrictedTransportPlatforms.enabled # @skip naviback.indices.restrictedTransportRoutes.enabled # @skip naviback.indices.smatrix.enabled +# @skip naviback.indices.snImport.enabled # @skip naviback.indices.speedCams.enabled # @skip naviback.indices.speedIndex.enabled # @skip naviback.indices.taxiReferers.enabled @@ -111,10 +172,11 @@ image: # @skip naviback.indices.tugc2gisIndex.enabled # @skip naviback.indices.tugcUsers.enabled # @skip naviback.indices.tugcUsersIndex.enabled -# @extra naviback.additionalSections Optinal JSON block to be added to config file as-is. +# @extra naviback.additionalSections Optinal JSON block to be added to config file as-is +# @skip naviback.simpleNetwork # @extra naviback.simpleNetwork.bicycle Enable simple network for bicycle routing # @extra naviback.simpleNetwork.car Enable simple network for auto routing -# @param naviback.simpleNetwork.emergency Enable simple network for emergency vehicles routing +# @extra naviback.simpleNetwork.emergency Enable simple network for emergency vehicles routing # @extra naviback.simpleNetwork.pedestrian Enable simple network for pedestrian routing # @extra naviback.simpleNetwork.taxi Enable simple network for taxi routing # @extra naviback.simpleNetwork.truck Enable simple network for truck routing @@ -127,16 +189,36 @@ image: # @extra naviback.attractor.truck Enable enhanced attractor for truck routing # @extra naviback.attractor.scooter Enable enhanced attractor for scooters routing # @param naviback.bss.enabled Enable sending information on the construction of routes to the business statistics service -# @param naviback.bss.client.serviceRemoteAddress Remote address business statistics service. Requeruired for enable sending information. -# @param naviback.bss.client.messageCountToFlush Message count to flush. -# @param naviback.bss.client.useCompression Enable compression. -# @param naviback.bss.client.packageSizeMaxBytes Package size max bytes. -# @param naviback.bss.client.pendingTransmissionMaxCount Pending transmission max count. +# @param naviback.bss.client.serviceRemoteAddress Remote address business statistics service. Requeruired for enable sending information +# @param naviback.bss.client.messageCountToFlush Message count to flush +# @param naviback.bss.client.useCompression Enable compression +# @param naviback.bss.client.packageSizeMaxBytes Package size max bytes +# @param naviback.bss.client.pendingTransmissionMaxCount Pending transmission max count +# @param naviback.bss.client.timeoutLimitMilSec Maximum request time limit in milliseconds # @extra naviback.reduceEdgesOptimizationFlag Enable optimizations for distance matrix queries processing -# @param naviback.behindSplitter Current instance is behind splitter or not -# @param naviback.overrideConfig Complete config override. For test purposes only. -# @param naviback.rtr.enabled Enable real time restrictions. -# @param naviback.rtr.url URL real time restrictions server. +# @param naviback.behindSplitter The current instance is behind splitter or not +# @param naviback.overrideConfig Complete config override. For test purposes only +# @param naviback.rtr.enabled Enable real time restrictions +# @param naviback.rtr.url URL real time restrictions server +# @param naviback.rtr.updatePeriod Update period from real time restrictions server +# @param naviback.validation.enabled Enable validation responses and requests (used for internal tests) +# @param naviback.validation.ctx.schemasFolder Path to folder with ctx JSON schemas +# @param naviback.validation.ctx.requestSchemaName Name of ctx request validation schema +# @param naviback.validation.ctx.responseSchemaName Name of ctx response validation schema +# @param naviback.validation.bss.schemasFolder Path to folder with bss JSON schemas +# @param naviback.validation.bss.requestSchemaName Name of bss request validation schema +# @param naviback.validation.bss.responseSchemaName Name of bss response validation schema +# @param naviback.validation.distanceMatrix.schemasFolder Path to folder with distance matrix JSON schemas +# @param naviback.validation.distanceMatrix.requestSchemaName Name of distance matrix request validation schema +# @param naviback.validation.distanceMatrix.responseSchemaName Name of distance matrix response validation schema +# @param naviback.validation.isochrone.schemasFolder Path to folder with isochrone JSON schemas +# @param naviback.validation.isochrone.requestSchemaName Name of isochrone request validation schema +# @param naviback.validation.isochrone.responseSchemaName Name of isochrone response validation schema +# @param naviback.tilesMetricsThreshold The value at which we send tiles metrics (used for internal tests) +# @param naviback.hierarchies.enabled If hierarchies cache available +# @param naviback.hierarchies.s3path Hierarchies cache remote location +# @param naviback.etaScheduleIndex.enabled If Schedule Index available +# @param naviback.etaScheduleIndex.url Schedule Index remote url # @skip rules naviback: @@ -144,9 +226,10 @@ naviback: dmSourcesLimit: 1000 dmTargetsLimit: 1000 handlersNumber: 1 - maxProcessTime: 600 - responseTimelimit: 60 - requestTimeout: 60 + queueSize: 128 + maxProcessTime: 20 + responseTimelimit: 120 + requestTimeout: 120 timeoutLimitSec: 1200 timeoutIncrementSec: 140 totalRetryDurationSec: 2400 @@ -160,14 +243,14 @@ naviback: citiesFilename: cities.conf.zip sentry: enabled: false - address: sentry.host + address: sentry.local project: navi-back - username: navi-back + username: navi printMessages: false debug: false reportPath: /tmp/sentry handler: /usr/sbin/2gis/mosesd/crashpad_handler - castleHost: '' + castleUrl: '' disableUpdates: false indices: carOptions: @@ -185,6 +268,8 @@ naviback: enabled: false forecastedSpeedsIndex: enabled: false + geoImport: + enabled: false onlineSpeeds: enabled: false onlineTaxiSpeeds: @@ -201,6 +286,8 @@ naviback: enabled: false smatrix: enabled: false + snImport: + enabled: false speedCams: enabled: false speedIndex: @@ -228,11 +315,38 @@ naviback: useCompression: true packageSizeMaxBytes: 1800000 pendingTransmissionMaxCount: 10 + timeoutLimitMilSec: 5000 behindSplitter: false overrideConfig: '' rtr: enabled: false - url: http://rtr.navi + url: http://rtr + updatePeriod: 60 + validation: + enabled: false + ctx: + schemasFolder: /usr/share/2gis/schemas/nsr_schemas + requestSchemaName: CTXRequestModel.json + responseSchemaName: CTXResponseModelV4.json + bss: + schemasFolder: /usr/share/2gis/schemas/bss_schemas + requestSchemaName: '' + responseSchemaName: 401.schema.json + distanceMatrix: + schemasFolder: /usr/share/2gis/schemas/nsr_schemas + requestSchemaName: DistanceMatrixRequestModel.json + responseSchemaName: DistanceMatrixResponseModel.json + isochrone: + schemasFolder: /usr/share/2gis/schemas/nsr_schemas + requestSchemaName: IsochroneApiRequestModel.json + responseSchemaName: IsochroneApiResponseModel.json + tilesMetricsThreshold: 0 + hierarchies: + enabled: false + s3path: '' + etaScheduleIndex: + enabled: false + url: '' rules: [] @@ -242,40 +356,25 @@ rules: [] # @param envoy.image.repository Repository # @param envoy.image.tag Tag # @param envoy.image.pullPolicy Pull Policy +# @param envoy.resources [nullable] Container resources requirements structure +# @param envoy.resources.requests.cpu [nullable] CPU request, recommended value `100m` +# @param envoy.resources.requests.memory [nullable] Memory request, recommended value `100Mi` +# @param envoy.resources.limits.cpu [nullable] CPU limit, recommended value `100m` +# @param envoy.resources.limits.memory [nullable] Memory limit, recommended value `100Mi` envoy: image: repository: 2gis-on-premise/envoy pullPolicy: IfNotPresent tag: v1.27.0 - - -# @section Frozen data settings. For test purposes only. - -# @param frozenData.enabled If use frozen data is enabled. -# @param frozenData.image.repository Repository -# @param frozenData.image.tag Tag -# @param frozenData.image.pullPolicy Pull Policy -# @param frozenData.resources [nullable] Container resources requirements structure. -# @param frozenData.resources.requests.cpu [nullable] CPU request, recommended value `100m`. -# @param frozenData.resources.requests.memory [nullable] Memory request, recommended value `100Mi`. -# @param frozenData.resources.limits.cpu [nullable] CPU limit, recommended value `100m`. -# @param frozenData.resources.limits.memory [nullable] Memory limit, recommended value `100Mi`. - -frozenData: - enabled: false - image: - repository: 2gis-on-premise/frozen-data - pullPolicy: Always - tag: '' resources: {} # @section Service account settings -# @param serviceAccount.create Specifies whether a service account should be created. -# @param serviceAccount.annotations Annotations to add to the service account. -# @param serviceAccount.name The name of the service account to use. If not set and create is true, a name is generated using the fullname template. +# @param serviceAccount.create Specifies whether a service account should be created +# @param serviceAccount.annotations Annotations to add to the service account +# @param serviceAccount.name The name of the service account to use. If not set and create is true, a name is generated using the fullname template serviceAccount: create: false @@ -285,12 +384,13 @@ serviceAccount: # @section Service settings -# @param service.type Kubernetes [service type](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types). -# @param service.clusterIP Controls Service cluster IP allocation. Cannot be changed after resource creation. -# @param service.port Service port. -# @param service.grpcPort Service GRPC port if `naviback.grpcPort` enabled. -# @param service.annotations Kubernetes [service annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/). -# @param service.labels Kubernetes [service labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/). +# @param service.type Kubernetes [service type](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) +# @param service.clusterIP Controls Service cluster IP allocation. Cannot be changed after resource creation +# @param service.port Service port +# @param service.grpcPort Service GRPC port if `naviback.grpcPort` enabled +# @param service.annotations Kubernetes [service annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) +# @param service.labels Kubernetes [service labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) +# @param service.extraPorts Extra ports to expose in the service (normally used with the `sidecar` value) # @param service.headless.enabled Enable creating a secondary headless service # @param service.headless.annotations Annotations for secondary headless service @@ -301,6 +401,7 @@ service: grpcPort: 50051 annotations: {} labels: + extraPorts: [] headless: enabled: false annotations: {} @@ -308,16 +409,16 @@ service: # @section Kubernetes [Ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/) settings -# @param ingress.enabled If Ingress is enabled for the service. -# @param ingress.className Name of the Ingress controller class. -# @param ingress.hosts[0].host Hostname for the Ingress service. -# @param ingress.hosts[0].paths[0].path Path of the host for the Ingress service. -# @param ingress.hosts[0].paths[0].pathType Type of the path for the Ingress service. +# @param ingress.className Name of the Ingress controller class +# @param ingress.enabled If Ingress is enabled for the service +# @param ingress.hosts[0].host Hostname for the Ingress service +# @param ingress.hosts[0].paths[0].path Path of the host for the Ingress service +# @param ingress.hosts[0].paths[0].pathType Type of the path for the Ingress service # @param ingress.tls TLS configuration ingress: - enabled: false className: nginx + enabled: false hosts: - host: navi-back.example.com paths: @@ -331,24 +432,24 @@ ingress: # @section Limits -# @param resources [nullable] Container resources requirements structure. -# @param resources.requests.cpu [nullable] CPU request, recommended value `1000m`. -# @param resources.requests.memory [nullable] Memory request, recommended value `2Gi`. -# @param resources.limits.cpu [nullable] CPU limit, recommended value `3000m`. -# @param resources.limits.memory [nullable] Memory limit, recommended value `8Gi`. +# @param resources [nullable] Container resources requirements structure +# @param resources.requests.cpu [nullable] CPU request, recommended value `1000m` +# @param resources.requests.memory [nullable] Memory request, recommended value `2Gi` +# @param resources.limits.cpu [nullable] CPU limit, recommended value `3000m` +# @param resources.limits.memory [nullable] Memory limit, recommended value `8Gi` resources: {} # @section Kubernetes [Horizontal Pod Autoscaling](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) settings -# @param hpa.enabled If HPA is enabled for the service. -# @param hpa.minReplicas Lower limit for the number of replicas to which the autoscaler can scale down. -# @param hpa.maxReplicas Upper limit for the number of replicas to which the autoscaler can scale up. -# @param hpa.scaleDownStabilizationWindowSeconds Scale-down window. -# @param hpa.scaleUpStabilizationWindowSeconds Scale-up window. -# @param hpa.targetCPUUtilizationPercentage Target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified the default autoscaling policy will be used. -# @param hpa.targetMemoryUtilizationPercentage Target average memory utilization (represented as a percentage of requested memory) over all the pods; if not specified the default autoscaling policy will be used. +# @param hpa.enabled If HPA is enabled for the service +# @param hpa.minReplicas Lower limit for the number of replicas to which the autoscaler can scale down +# @param hpa.maxReplicas Upper limit for the number of replicas to which the autoscaler can scale up +# @param hpa.scaleDownStabilizationWindowSeconds Scale-down window +# @param hpa.scaleUpStabilizationWindowSeconds Scale-up window +# @param hpa.targetCPUUtilizationPercentage Target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified the default autoscaling policy will be used +# @param hpa.targetMemoryUtilizationPercentage Target average memory utilization (represented as a percentage of requested memory) over all the pods; if not specified the default autoscaling policy will be used hpa: enabled: false @@ -362,12 +463,12 @@ hpa: # @section Kubernetes [Vertical Pod Autoscaling](https://github.com/kubernetes/autoscaler/blob/master/vertical-pod-autoscaler/README.md) settings -# @param vpa.enabled If VPA is enabled for the service. -# @param vpa.updateMode VPA [update mode](https://github.com/kubernetes/autoscaler/tree/master/vertical-pod-autoscaler#quick-start). -# @extra vpa.minAllowed.cpu Lower limit for the number of CPUs to which the autoscaler can scale down. -# @extra vpa.minAllowed.memory Lower limit for the RAM size to which the autoscaler can scale down. -# @extra vpa.maxAllowed.cpu Upper limit for the number of CPUs to which the autoscaler can scale up. -# @extra vpa.maxAllowed.memory Upper limit for the RAM size to which the autoscaler can scale up. +# @param vpa.enabled If VPA is enabled for the service +# @param vpa.updateMode VPA [update mode](https://github.com/kubernetes/autoscaler/tree/master/vertical-pod-autoscaler#quick-start) +# @extra vpa.minAllowed.cpu Lower limit for the number of CPUs to which the autoscaler can scale down +# @extra vpa.minAllowed.memory Lower limit for the RAM size to which the autoscaler can scale down +# @extra vpa.maxAllowed.cpu Upper limit for the number of CPUs to which the autoscaler can scale up +# @extra vpa.maxAllowed.memory Upper limit for the RAM size to which the autoscaler can scale up vpa: enabled: false @@ -376,9 +477,9 @@ vpa: # @section Kubernetes [Pod Disruption Budget](https://kubernetes.io/docs/concepts/workloads/pods/disruptions/#pod-disruption-budgets) settings -# @param pdb.enabled If PDB is enabled for the service. -# @param pdb.minAvailable How many pods must be available after the eviction. -# @param pdb.maxUnavailable How many pods can be unavailable after the eviction. +# @param pdb.enabled If PDB is enabled for the service +# @param pdb.minAvailable How many pods must be available after the eviction +# @param pdb.maxUnavailable How many pods can be unavailable after the eviction pdb: enabled: false @@ -388,24 +489,26 @@ pdb: # @section Kafka settings for interacting with Distance Matrix Async Service -# @param kafka.enabled If the Kafka is enabled. -# @param kafka.groupId Navi-Back service group identifier. -# @extra kafka.properties Properties as supported by librdkafka. Refer to inline comments for details. +# @param kafka.enabled If the Kafka is enabled +# @param kafka.groupId Navi-Back service group identifier +# @param kafka.handlersNumber Number of Kafka handlers +# @extra kafka.properties Properties as supported by librdkafka. Refer to inline comments for details # @skip kafka.properties.bootstrap.servers # @skip kafka.properties.security.protocol -# @param kafka.fileProperties As kafka.properties, but kept in a file, which passed to application as a filename. Refer to inline comments for details. +# @param kafka.fileProperties As kafka.properties, but kept in a file, which passed to application as a filename. Refer to inline comments for details # @extra kafka.distanceMatrix **Settings for interacting with Distance Matrix Async service.** -# @param kafka.distanceMatrix.taskTopic Name of the topic for receiving new tasks from Distance Matrix Async API. -# @param kafka.distanceMatrix.cancelTopic Name of the topic for canceling or receiving information about finished tasks. -# @param kafka.distanceMatrix.statusTopic Name of the topic for receiving task status information. -# @param kafka.distanceMatrix.updateTaskStatusPeriodSec Update period for task statuses. -# @param kafka.distanceMatrix.messageExpiredPeriodSec Update period for task cancellations. -# @param kafka.distanceMatrix.requestDownloadTimeoutSec Timeout for downloading request data. -# @param kafka.distanceMatrix.responseUploadTimeoutSec Timeout for uploading response data. +# @param kafka.distanceMatrix.taskTopic Name of the topic for receiving new tasks from Distance Matrix Async API +# @param kafka.distanceMatrix.cancelTopic Name of the topic for canceling or receiving information about finished tasks +# @param kafka.distanceMatrix.statusTopic Name of the topic for receiving task status information +# @param kafka.distanceMatrix.updateTaskStatusPeriodSec Update period for task statuses +# @param kafka.distanceMatrix.messageExpiredPeriodSec Update period for task cancellations +# @param kafka.distanceMatrix.requestDownloadTimeoutSec Timeout for downloading request data +# @param kafka.distanceMatrix.responseUploadTimeoutSec Timeout for uploading response data kafka: enabled: false groupId: navi_back + handlersNumber: 2 properties: bootstrap.servers: kafka.host:9092 security.protocol: PLAINTEXT @@ -455,11 +558,12 @@ kafka: # @section S3-compatible storage settings for interacting with Distance Matrix Async Service -# @param s3.enabled if S3 storage is enabled. -# @param s3.host S3 endpoint, ex: async-matrix-s3.host. -# @param s3.bucket S3 bucket name. -# @param s3.accessKey S3 access key for accessing the bucket. -# @param s3.secretKey S3 secret key for accessing the bucket. +# @param s3.enabled if S3 storage is enabled +# @param s3.host S3 endpoint, ex: async-matrix-s3.host +# @param s3.bucket S3 bucket name +# @param s3.accessKey S3 access key for accessing the bucket +# @param s3.secretKey S3 secret key for accessing the bucket +# @param s3.suffix String to append to file names in replies s3: enabled: false @@ -467,6 +571,7 @@ s3: bucket: '' accessKey: '' secretKey: '' + suffix: '' # @section Settings for attractor connection. Leave with defaults, FOR FUTURE RELEASE. @@ -475,13 +580,20 @@ s3: # @param transmitter.host attractor service # @param transmitter.port attractor port # @param transmitter.responseTimeoutMs response waiting timeout +# @param transmitter.retry.enabled Enable retry failed requests +# @param transmitter.retry.retryOn Status [codes for retry](https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/router_filter#x-envoy-retry-grpc-on) +# @param transmitter.retry.numRetries Specifies the allowed number of retries transmitter: enabled: false type: grpc-async-stream host: http://navi-attractor.host port: 50051 - responseTimeoutMs: 100 + responseTimeoutMs: 2000 + retry: + enabled: false + retryOn: internal,unavailable + numRetries: 5 # @section Back-end and attractor group properties. Leave with defaults, FOR FUTURE RELEASE. @@ -497,11 +609,9 @@ dataGroup: # @section License settings # @param license.url Address of the License service v2. Ex: https://license.svc -# @param license.notSupported Excludes the configuration block if true, for old versions only. license: url: '' - notSupported: false # @section Metrics aggregator container. Leave with defaults, FOR FUTURE RELEASE. @@ -509,12 +619,12 @@ license: # @param metrics.image.repository Repository # @param metrics.image.tag Tag # @param metrics.image.pullPolicy Pull Policy -# @param metrics.port Port of container. -# @param metrics.resources [nullable] Container resources requirements structure. -# @param metrics.resources.requests.cpu [nullable] CPU request, recommended value `10m`. -# @extra metrics.resources.requests.memory [nullable] Memory request, recommended value `10Mi`. -# @extra metrics.resources.limits.cpu [nullable] CPU limit, recommended value `100m`. -# @extra metrics.resources.limits.memory [nullable] Memory limit, recommended value `10Mi`. +# @param metrics.port Port of container +# @param metrics.resources [nullable] Container resources requirements structure +# @param metrics.resources.requests.cpu [nullable] CPU request, recommended value `10m` +# @extra metrics.resources.requests.memory [nullable] Memory request, recommended value `10Mi` +# @extra metrics.resources.limits.cpu [nullable] CPU limit, recommended value `100m` +# @extra metrics.resources.limits.memory [nullable] Memory limit, recommended value `10Mi` metrics: enabled: false