Skip to content

Commit

Permalink
BSS to Stat in catalog-api
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelgopanenko committed Sep 22, 2023
1 parent 4ca5d50 commit 1664407
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 65 deletions.
44 changes: 22 additions & 22 deletions charts/catalog-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,28 +158,28 @@ See the [documentation](https://docs.2gis.com/en/on-premise/search) to learn abo
| `license.url` | URL of the License service. Ex: http(s)://license.svc **Required** | `""` |
| `license.requestTimeout` | Timeout for requests to the License service | `1s` |

### BSS settings

| Name | Description | Value |
| ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| `bss.enabled` | If BSS is enabled | `false` |
| `bss.url` | URL of the BSS service. Ex: http(s)://bss.svc | `""` |
| `bss.buffer.lifetime` | Lifetime of BSS buffer | `5s` |
| `bss.buffer.retryCount` | The maximum number of attempts to send Stat messages | `2` |
| `bss.buffer.sendTimeout` | Timeout between sending BSS messages | `2s` |
| `bss.buffer.sendLimit` | The maximum number of messages in the buffer before they are sent to the BSS | `256` |
| `bss.client.connectingTimeout` | The time period within which the TCP connecting process must be completed | `500ms` |
| `bss.client.idleTimeout` | The time after which an idle connection will be automatically closed | `250ms` |
| `bss.client.minConnections` | The minimum number of parallel connections that a pool should keep alive ("hot") | `1` |
| `bss.client.maxConnections` | The maximum number of parallel connections that a connection pool to a single host endpoint is allowed to establish. Must be greater than zero | `2` |
| `bss.client.maxOpenRequests` | The maximum number of open requests accepted into the pool across all materializations of any of its client flows | `4` |
| `bss.client.maxRetries` | The maximum number of times failed requests are attempted again, (if the request can be safely retried) before giving up and returning an error | `4` |
| `bss.client.maxConnectionLifetime` | The maximum duration for a connection to be kept alive | `5m` |
| `bss.client.baseConnectionBackoff` | The minimum duration to backoff new connection attempts after the previous connection attempt failed | `500ms` |
| `bss.client.maxConnectionBackoff` | Maximum backoff duration between failed connection attempts | `10s` |
| `bss.client.responseTimeout` | The time period after the response was dispatched | `250ms` |
| `bss.dispatcher.fixedPoolSize` | Fixed number of threads used | `1` |
| `bss.dispatcher.throughput` | Throughput defines the maximum number of messages to be processed per actor before the thread jumps to the next actor | `4` |
### Statistic settings

| Name | Description | Value |
| ----------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| `stat.enabled` | If statistic is enabled | `false` |
| `stat.url` | URL of the statistic service. Ex: http(s)://stat.svc | `""` |
| `stat.buffer.lifetime` | Lifetime of Statistic buffer | `5s` |
| `stat.buffer.retryCount` | The maximum number of attempts to send Stat messages | `2` |
| `stat.buffer.sendTimeout` | Timeout between sending statistic messages | `2s` |
| `stat.buffer.sendLimit` | The maximum number of messages in the buffer before they are sent to the Statistic | `256` |
| `stat.client.connectingTimeout` | The time period within which the TCP connecting process must be completed | `500ms` |
| `stat.client.idleTimeout` | The time after which an idle connection will be automatically closed | `250ms` |
| `stat.client.minConnections` | The minimum number of parallel connections that a pool should keep alive ("hot") | `1` |
| `stat.client.maxConnections` | The maximum number of parallel connections that a connection pool to a single host endpoint is allowed to establish. Must be greater than zero | `2` |
| `stat.client.maxOpenRequests` | The maximum number of open requests accepted into the pool across all materializations of any of its client flows | `4` |
| `stat.client.maxRetries` | The maximum number of times failed requests are attempted again, (if the request can be safely retried) before giving up and returning an error | `4` |
| `stat.client.maxConnectionLifetime` | The maximum duration for a connection to be kept alive | `5m` |
| `stat.client.baseConnectionBackoff` | The minimum duration to backoff new connection attempts after the previous connection attempt failed | `500ms` |
| `stat.client.maxConnectionBackoff` | Maximum backoff duration between failed connection attempts | `10s` |
| `stat.client.responseTimeout` | The time period after the response was dispatched | `250ms` |
| `stat.dispatcher.fixedPoolSize` | Fixed number of threads used | `1` |
| `stat.dispatcher.throughput` | Throughput defines the maximum number of messages to be processed per actor before the thread jumps to the next actor | `4` |

### Kubernetes Importer job settings

Expand Down
2 changes: 1 addition & 1 deletion charts/catalog-api/templates/api/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ spec:
{{- include "catalog.env.search" . | nindent 12 }}
{{- include "catalog.env.keys" . | nindent 12 }}
{{- include "catalog.env.license" . | nindent 12 }}
{{- include "catalog.env.bss" . | nindent 12 }}
{{- include "catalog.env.stat" . | nindent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
40 changes: 20 additions & 20 deletions charts/catalog-api/templates/helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -140,45 +140,45 @@ onprem
value: "{{ .Values.license.requestTimeout }}"
{{- end }}

{{- define "catalog.env.bss" -}}
{{- define "catalog.env.stat" -}}
- name: CATALOG_BSS_ENABLED
value: "{{ .Values.bss.enabled }}"
value: "{{ .Values.stat.enabled }}"
- name: CATALOG_BSS_ENDPOINT
value: "{{ .Values.bss.url }}"
value: "{{ .Values.stat.url }}"
- name: CATALOG_BSS_BUFFER_LIFETIME
value: "{{ .Values.bss.buffer.lifetime }}"
value: "{{ .Values.stat.buffer.lifetime }}"
- name: CATALOG_BSS_BUFFER_RETRY_COUNT
value: "{{ .Values.bss.buffer.retryCount }}"
value: "{{ .Values.stat.buffer.retryCount }}"
- name: CATALOG_BSS_BUFFER_SEND_TIMEOUT
value: "{{ .Values.bss.buffer.sendTimeout }}"
value: "{{ .Values.stat.buffer.sendTimeout }}"
- name: CATALOG_BSS_BUFFER_SEND_LIMIT
value: "{{ .Values.bss.buffer.sendLimit }}"
value: "{{ .Values.stat.buffer.sendLimit }}"
- name: CATALOG_BSS_CONNECTING_TIMEOUT
value: "{{ .Values.bss.client.connectingTimeout }}"
value: "{{ .Values.stat.client.connectingTimeout }}"
- name: CATALOG_BSS_IDLE_TIMEOUT
value: "{{ .Values.bss.client.Idle_timeout }}"
value: "{{ .Values.stat.client.Idle_timeout }}"
- name: CATALOG_BSS_MIN_CONNECTIONS
value: "{{ .Values.bss.client.minConnections }}"
value: "{{ .Values.stat.client.minConnections }}"
- name: CATALOG_BSS_MAX_CONNECTIONS
value: "{{ .Values.bss.client.maxConnections }}"
value: "{{ .Values.stat.client.maxConnections }}"
- name: CATALOG_BSS_MAX_OPEN_REQUESTS
value: "{{ .Values.bss.client.maxOpenRequests }}"
value: "{{ .Values.stat.client.maxOpenRequests }}"
- name: CATALOG_BSS_OPEN_REQUESTS
value: "{{ .Values.bss.client.maxOpenRequests }}"
value: "{{ .Values.stat.client.maxOpenRequests }}"
- name: CATALOG_BSS_MAX_RETRIES
value: "{{ .Values.bss.client.maxRetries }}"
value: "{{ .Values.stat.client.maxRetries }}"
- name: CATALOG_BSS_CONNECTION_LIFETIME
value: "{{ .Values.bss.client.maxConnectionLifetime }}"
value: "{{ .Values.stat.client.maxConnectionLifetime }}"
- name: CATALOG_BSS_BASE_CONNECTION_BACKOFF
value: "{{ .Values.bss.client.baseConnectionBackoff }}"
value: "{{ .Values.stat.client.baseConnectionBackoff }}"
- name: CATALOG_BSS_MAX_CONNECTION_BACKOFF
value: "{{ .Values.bss.client.maxConnectionBackoff }}"
value: "{{ .Values.stat.client.maxConnectionBackoff }}"
- name: CATALOG_BSS_RESPONSE_TIMEOUT
value: "{{ .Values.bss.client.responseTimeout }}"
value: "{{ .Values.stat.client.responseTimeout }}"
- name: CATALOG_BSS_DISPATCHER_FIXED_POOL_SIZE
value: "{{ .Values.bss.dispatcher.fixedPoolSize }}"
value: "{{ .Values.stat.dispatcher.fixedPoolSize }}"
- name: CATALOG_BSS_DISPATCHER_THROUGHPUT
value: "{{ .Values.bss.dispatcherThroughput }}"
value: "{{ .Values.stat.dispatcherThroughput }}"
{{- end }}

{{- define "catalog.env.importer" -}}
Expand Down
44 changes: 22 additions & 22 deletions charts/catalog-api/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -205,28 +205,28 @@ license:
url: ''
requestTimeout: 1s

# @section BSS settings

# @param bss.enabled If BSS is enabled
# @param bss.url URL of the BSS service. Ex: http(s)://bss.svc
# @param bss.buffer.lifetime Lifetime of BSS buffer
# @param bss.buffer.retryCount The maximum number of attempts to send Stat messages
# @param bss.buffer.sendTimeout Timeout between sending BSS messages
# @param bss.buffer.sendLimit The maximum number of messages in the buffer before they are sent to the BSS
# @param bss.client.connectingTimeout The time period within which the TCP connecting process must be completed
# @param bss.client.idleTimeout The time after which an idle connection will be automatically closed
# @param bss.client.minConnections The minimum number of parallel connections that a pool should keep alive ("hot")
# @param bss.client.maxConnections The maximum number of parallel connections that a connection pool to a single host endpoint is allowed to establish. Must be greater than zero
# @param bss.client.maxOpenRequests The maximum number of open requests accepted into the pool across all materializations of any of its client flows
# @param bss.client.maxRetries The maximum number of times failed requests are attempted again, (if the request can be safely retried) before giving up and returning an error
# @param bss.client.maxConnectionLifetime The maximum duration for a connection to be kept alive
# @param bss.client.baseConnectionBackoff The minimum duration to backoff new connection attempts after the previous connection attempt failed
# @param bss.client.maxConnectionBackoff Maximum backoff duration between failed connection attempts
# @param bss.client.responseTimeout The time period after the response was dispatched
# @param bss.dispatcher.fixedPoolSize Fixed number of threads used
# @param bss.dispatcher.throughput Throughput defines the maximum number of messages to be processed per actor before the thread jumps to the next actor

bss:
# @section Statistic settings

# @param stat.enabled If statistic is enabled
# @param stat.url URL of the statistic service. Ex: http(s)://stat.svc
# @param stat.buffer.lifetime Lifetime of Statistic buffer
# @param stat.buffer.retryCount The maximum number of attempts to send Stat messages
# @param stat.buffer.sendTimeout Timeout between sending statistic messages
# @param stat.buffer.sendLimit The maximum number of messages in the buffer before they are sent to the Statistic
# @param stat.client.connectingTimeout The time period within which the TCP connecting process must be completed
# @param stat.client.idleTimeout The time after which an idle connection will be automatically closed
# @param stat.client.minConnections The minimum number of parallel connections that a pool should keep alive ("hot")
# @param stat.client.maxConnections The maximum number of parallel connections that a connection pool to a single host endpoint is allowed to establish. Must be greater than zero
# @param stat.client.maxOpenRequests The maximum number of open requests accepted into the pool across all materializations of any of its client flows
# @param stat.client.maxRetries The maximum number of times failed requests are attempted again, (if the request can be safely retried) before giving up and returning an error
# @param stat.client.maxConnectionLifetime The maximum duration for a connection to be kept alive
# @param stat.client.baseConnectionBackoff The minimum duration to backoff new connection attempts after the previous connection attempt failed
# @param stat.client.maxConnectionBackoff Maximum backoff duration between failed connection attempts
# @param stat.client.responseTimeout The time period after the response was dispatched
# @param stat.dispatcher.fixedPoolSize Fixed number of threads used
# @param stat.dispatcher.throughput Throughput defines the maximum number of messages to be processed per actor before the thread jumps to the next actor

stat:
enabled: false
url: ''
buffer:
Expand Down

0 comments on commit 1664407

Please sign in to comment.