Skip to content

Commit

Permalink
chart/navi-async-matrix syncup
Browse files Browse the repository at this point in the history
  • Loading branch information
uk-navi-ci committed Oct 10, 2024
1 parent 869da39 commit cab4378
Show file tree
Hide file tree
Showing 6 changed files with 176 additions and 59 deletions.
99 changes: 62 additions & 37 deletions charts/navi-async-matrix/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ See the [documentation](https://docs.2gis.com/en/on-premise/navigation/distance-
| Name | Description | Value |
| ------------------ | ----------- | ----------------------------------- |
| `image.repository` | Repository | `2gis-on-premise/navi-async-matrix` |
| `image.tag` | Tag | `1.11.2` |
| `image.tag` | Tag | `1.12.1` |
| `image.pullPolicy` | Pull Policy | `IfNotPresent` |

### Service account settings
Expand Down Expand Up @@ -139,68 +139,93 @@ See the [documentation](https://docs.2gis.com/en/on-premise/navigation/distance-

### Distance Matrix Async API settings

| Name | Description | Value |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ------ |
| `dm.port` | Distance Matrix Async API HTTP port. | `8000` |
| `dm.configType` | Configuration type. Must always be `env`. | `env` |
| `dm.logLevel` | Logging level, one of: DEBUG, INFO, WARNING, ERROR, CRITICAL. | `INFO` |
| `dm.workerCount` | Number of Distance Matrix Async workers. | `4` |
| `dm.citiesUrl` | URL of the information about cities provided by the Navi-Castle service, ex: http://navi-castle.svc/cities.conf. **Required** | `""` |
| `dm.citiesUpdatePeriod` | Period (in seconds) between requesting data from `citiesUrl`. | `3600` |
| Name | Description | Value |
| ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ------ |
| `dm.port` | Distance Matrix Async API HTTP port. | `8000` |
| `dm.configType` | Configuration type. Must always be `env`. | `env` |
| `dm.logLevel` | Logging level, one of: DEBUG, INFO, WARNING, ERROR, CRITICAL. | `INFO` |
| `dm.workerCount` | Number of Distance Matrix Async workers. | `4` |
| `dm.citiesUrl` | URL of the information about cities provided by the Navi-Castle service, ex: http://navi-castle.svc/cities.conf. **Required** | `""` |
| `dm.citiesUpdatePeriod` | Period (in seconds) between requesting data from `citiesUrl`. | `3600` |
| `dm.taskSplitSize` | Minimum size of matrix to get split in archiver job. | `5000` |
| `dm.compositeTaskTimeoutSec` | Timeout for executing split tasks. | `3600` |

### Database settings

| Name | Description | Value |
| ----------------- | ------------------------------------------- | ------------- |
| `db.host` | PostgreSQL hostname or IP. **Required** | `""` |
| `db.host` | PostgreSQL host. | `""` |
| `db.port` | PostgreSQL port. | `5432` |
| `db.name` | PostgreSQL database name. **Required** | `""` |
| `db.user` | PostgreSQL username. **Required** | `""` |
| `db.password` | PostgreSQL password. **Required** | `""` |
| `db.schema` | PostgreSQL schema. | `public` |
| `db.name` | PostgreSQL database name. | `""` |
| `db.user` | PostgreSQL username. | `""` |
| `db.password` | PostgreSQL password. | `""` |
| `db.schema` | PostgreSQL scheme. | `public` |
| `db.tls.enabled` | If tls connection to postgresql is enabled. | `false` |
| `db.tls.rootCert` | Root certificate file. | `""` |
| `db.tls.cert` | Certificate of postgresql server. | `""` |
| `db.tls.key` | Key of postgresql server. | `""` |
| `db.tls.mode` | Level of protection. | `verify-full` |

### Multi-DC settings

| Name | Description | Value |
| -------------------------------------- | ----------------------------------------------------------------------------------- | --------------- |
| `multiDc.enabled` | If multi-DC functionality enabled | `false` |
| `multiDc.location` | Primary DC identifier. | `default` |
| `multiDc.redirectHeader` | HTTP header to tell requests original from redirected. Set empty to skip the check. | `""` |
| `multiDc.secondaryTopics.statusTopic` | Name of `statusTopic` in secondary DC. | `status_topic` |
| `multiDc.secondaryTopics.cancelTopic` | Name of `cancelTopic` in secondary DC. | `cancel_topic` |
| `multiDc.secondaryTopics.archiveTopic` | Name of `archiveTopic` in secondary DC. | `archive_topic` |

### Kafka settings

| Name | Description | Value |
| --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------- |
| `kafka.groupId` | Distance Matrix Async API group identifier. | `navi_async_matrix` |
| `kafka.statusTopic` | Name of the topic for sending new tasks to. | `status_topic` |
| `kafka.cancelTopic` | Name of the topic for canceling or receiving information about finished tasks. | `cancel_topic` |
| `kafka.properties` | Properties as supported by kafka-python. Refer to inline comments for details. | |
| `kafka.sensitiveProperties` | As kafka.properties, but kept in Secrets. Refer to inlines 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.consumerOverrides.properties` | Consumer specific properties as simple key-value pairs. | `{}` |
| `kafka.consumerOverrides.sensitiveProperties` | Consumer specific properties mounted as secrets. | `{}` |
| `kafka.consumerOverrides.fileProperties` | Consumer specific properties mounted as regular files. | `{}` |
| `kafka.producerOverrides.properties` | Consumer specific properties as simple key-value pairs. | `{}` |
| `kafka.producerOverrides.sensitiveProperties` | Consumer specific properties mounted as secrets. | `{}` |
| `kafka.producerOverrides.fileProperties` | Consumer specific properties mounted as regular files. | `{}` |
| `kafka.taskTopicRules` | **Information about the topics that Distance Matrix Async API will use to send the requests.** | |
| `kafka.taskTopicRules[].topic` | Name of the topic. | |
| `kafka.taskTopicRules[].default` | If this topic is used for projects by default. | |
| `kafka.taskTopicRules[].projects` | List of projects to use this topic for, e.g., `['moscow']`. | |
| Name | Description | Value |
| --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | -------------------- |
| `kafka.groupId` | Distance Matrix Async API group identifier. | `navi_async_matrix` |
| `kafka.statusTopic` | Name of the topic for sending new tasks to. | `status_topic` |
| `kafka.cancelTopic` | Name of the topic for canceling or receiving information about finished tasks. | `cancel_topic` |
| `kafka.archiveTopic` | Name of the topic for archiving tasks. | `archive_topic` |
| `kafka.attractTopic` | Name of the topic for for attract tasks results | `""` |
| `kafka.oneToManyTopic` | Name of the topic for oneToMany tasks results | `""` |
| `kafka.vrpStatusTopic` | Name of the topic for VRP service integration | `""` |
| `kafka.properties` | Properties as supported by kafka-python. Refer to inline comments for details. | |
| `kafka.sensitiveProperties` | As kafka.properties, but kept in Secrets. Refer to inlines 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.consumerOverrides.properties` | Consumer specific properties as simple key-value pairs. | `{}` |
| `kafka.consumerOverrides.sensitiveProperties` | Consumer specific properties mounted as secrets. | `{}` |
| `kafka.consumerOverrides.fileProperties` | Consumer specific properties mounted as regular files. | `{}` |
| `kafka.producerOverrides.properties` | Consumer specific properties as simple key-value pairs. | `{}` |
| `kafka.producerOverrides.sensitiveProperties` | Consumer specific properties mounted as secrets. | `{}` |
| `kafka.producerOverrides.fileProperties` | Consumer specific properties mounted as regular files. | `{}` |
| `kafka.taskTopicRules` | **Information about the topics that Distance Matrix Async API will use to send the requests.** | |
| `kafka.taskTopicRules[].topic` | Name of the topic. | |
| `kafka.taskTopicRules[].default` | If this topic is used for projects by default. | |
| `kafka.taskTopicRules[].type` | Routing type for tasks in the topic (`car`, `truck`), defaults to `car` | |
| `kafka.taskTopicRules[].projects` | List of projects to use this topic for, e.g., `['dammam']`. | |
| `kafka.attractTopicRules` | ** Rules to map request type to topic for attract tasks ** | |
| `kafka.attractTopicRules[0].topic` | Name of the topic. | `attract_task_topic` |
| `kafka.attractTopicRules[0].default` | If this topic is used for projects by default. | `true` |
| `kafka.attractTopicRules[0].type` | Routing type for tasks in the topic (`car`, `truck`), defaults to `car` | `car` |
| `kafka.attractTopicRules[0].projects` | List of projects to use this topic for, e.g., `['moscow']`. | |

### S3-compatible storage settings

| Name | Description | Value |
| ----------------- | ---------------------------------------------------------------------------------------------- | ----- |
| `s3.host` | S3 endpoint URL, ex: http://async-matrix-s3.host. **Required** | `""` |
| `s3.bucket` | S3 bucket name. **Required** | `""` |
| `s3.region` | S3 region. | `""` |
| `s3.accessKey` | S3 access key for accessing the bucket. **Required** | `""` |
| `s3.secretKey` | S3 secret key for accessing the bucket. **Required** | `""` |
| `s3.publicNetloc` | Announce proxy URL for S3 results instead of s3.url if not empty. Must start with `http(s)://` | `""` |
| `s3.publicNetloc` | Announce proxy URL for S3 results instead of s3.url if not empty. Must start with `http(s)://` | `nil` |

### API keys service

| Name | Description | Value |
| ------------ | --------------------------------------------------------------------------- | ----- |
| `keys.url` | API keys service URL, ex: http://keys-api.svc/service/v1/keys. **Required** | `""` |
| `keys.token` | API token to authorize at the service. **Required** | `""` |
| Name | Description | Value |
| ----------------- | ------------------------------------------------------------------------------ | ----- |
| `keys.url` | API keys service URL, ex: http://keys-api.svc/service/v1/keys. **Required** | `""` |
| `keys.token` | API token to authorize at the service. Required if truck car routing in use. | `""` |
| `keys.truckToken` | Truck API token to authorize at the service. Required if truck routing in use. | `""` |

### customCAs **Custom Certificate Authority**

Expand Down
1 change: 0 additions & 1 deletion charts/navi-async-matrix/templates/configmap-ca.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

{{- if .Values.customCAs.bundle }}
apiVersion: v1
kind: ConfigMap
Expand Down
4 changes: 4 additions & 0 deletions charts/navi-async-matrix/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ data:
"name": "S3_BUCKET",
"value": {{ .Values.s3.bucket | mustToJson }}
},
{
"name": "S3_REGION_NAME",
"value": {{ .Values.s3.region | mustToJson }}
},
{
"name": "S3_ACCESS_KEY",
"value": {{ .Values.s3.accessKey | mustToJson }}
Expand Down
3 changes: 3 additions & 0 deletions charts/navi-async-matrix/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ data:
| b64enc | quote }}
s3key: {{ required "A valid .Values.s3.secretKey entry required" .Values.s3.secretKey | b64enc | quote }}
dmApiKey: {{ .Values.keys.token | b64enc | quote }}
{{- if .Values.keys.truckToken }}
dmApiTruckKey: {{ .Values.keys.truckToken | b64enc | quote }}
{{- end }}
{{- if (
(or .Values.kafka.sensitiveProperties .Values.kafka.fileProperties) |
or (or .Values.kafka.consumerOverrides.sensitiveProperties .Values.kafka.consumerOverrides.fileProperties) |
Expand Down
Loading

0 comments on commit cab4378

Please sign in to comment.