Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PRO-6552] upgrade pro-api and pro-ui versions, deliver dashboards #532

Merged
merged 11 commits into from
Nov 28, 2024
10 changes: 5 additions & 5 deletions charts/pro-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
| ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------- |
| `api.appName` | Name of the service | `pro-api` |
| `api.image.repository` | Repository | `2gis-on-premise/pro-api` |
| `api.image.tag` | Tag | `1.41.0` |
| `api.image.tag` | Tag | `1.50.1` |
| `api.image.pullPolicy` | Pull Policy | `IfNotPresent` |
| `api.ingress.enabled` | If Ingress is enabled for the service. | `false` |
| `api.ingress.className` | Name of the Ingress controller class. | `nginx` |
Expand Down Expand Up @@ -68,14 +68,14 @@
| `api.settings.auth.shareKeys` | Secret keys for creating and validating shared links. Must contain at least 32 characters. All keys are used for validation. The last one is used for creation. Example: `m7nShlX1a8+IqE9ZcDqRCVjlhEud850ucT0av9bS+tcMTwIwUOUqpNikM+G8teDR` | `[]` |
| `api.settings.backgroundJobs.enableUserAssetsImporter` | If user data importer job is enabled for the service. | `true` |
| `api.settings.backgroundJobs.enableAssetsStreaming` | If the streaming data processing job is enabled for the service. | `false` |
| `api.settings.layerGeneration.isochroneLayerMaxPointsCount` | If layer contains more points, isochrone is not avalible | `500` |
| `api.settings.layerGeneration.isochroneLayerMaxPointsCount` | If layer contains more points, isochrone is not avalible. | `500` |

### Permissions API configuration & settings

| Name | Description | Value |
| ------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- |
| `permissions.image.repository` | Repository | `2gis-on-premise/pro-permissions-api` |
| `permissions.image.tag` | Tag | `1.41.0` |
| `permissions.image.tag` | Tag | `1.50.1` |
| `permissions.image.pullPolicy` | Pull Policy | `IfNotPresent` |
| `permissions.ingress.enabled` | If Ingress is enabled for the service | `false` |
| `permissions.ingress.className` | Name of the Ingress controller class | `nginx` |
Expand Down Expand Up @@ -104,7 +104,7 @@
| `permissions.service.labels` | Kubernetes [service labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/). | `{}` |
| `permissions.service.type` | Kubernetes [service type](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types). | `ClusterIP` |
| `permissions.service.port` | PRO API service port. | `80` |
| `permissions.settings.enabled` | Set to `true` if authorization is used | `false` |
| `permissions.settings.enabled` | If permissionsApi is enabled for the service. | `false` |
| `permissions.settings.auth.apiKey` | Secret Permissions API Key to perform authorized service actions, random string. Must be set if type not 'none'. Example: `c7d74870-ec28-4543-b408-b49bfed84399` | `""` |

### asset importer settings
Expand All @@ -113,7 +113,7 @@
| -------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| `assetImporter.appName` | Data Import job name. | `asset-importer` |
| `assetImporter.repository` | Docker Repository Image. | `2gis-on-premise/pro-importer` |
| `assetImporter.tag` | Docker image tag. | `1.41.0` |
| `assetImporter.tag` | Docker image tag. | `1.50.1` |
| `assetImporter.schedule` | Import job schedule. | `0 18 * * *` |
| `assetImporter.backoffLimit` | The number of [retries](https://kubernetes.io/docs/concepts/workloads/controllers/job/#pod-backoff-failure-policy) before considering a Job as failed. | `2` |
| `assetImporter.successfulJobsHistoryLimit` | How many completed and failed jobs should be kept. See [docs](https://kubernetes.io/docs/tasks/job/automated-tasks-with-cron-jobs/#jobs-history-limits). | `3` |
Expand Down
18 changes: 18 additions & 0 deletions charts/pro-api/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
{{ include "pro-api.name" . }}-permissions
{{- end -}}

{{- define "pro-api.tasks-name" -}}
{{ include "pro-api.name" . }}-tasks
{{- end -}}

{{- define "pro-api.permissions-url" -}}
{{- if .Values.permissions.settings.host -}}
{{- .Values.permissions.settings.host -}}
Expand Down Expand Up @@ -69,6 +73,11 @@ app.kubernetes.io/name: {{ include "pro-api.permissions-name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}-permissions
{{- end -}}

{{- define "pro-api.tasksSelectorLabels" -}}
app.kubernetes.io/name: {{ include "pro-api.tasks-name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}-tasks
{{- end -}}

{{- define "pro-api.labels" -}}
helm.sh/chart: {{ include "pro-api.chart" . }}
{{ include "pro-api.selectorLabels" . }}
Expand All @@ -86,3 +95,12 @@ app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}

{{- define "pro-api.tasksLabels" -}}
helm.sh/chart: {{ include "pro-api.chart" . }}
{{ include "pro-api.tasksSelectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}
1 change: 1 addition & 0 deletions charts/pro-api/templates/asset-preparer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ spec:
jobTemplate:
spec:
backoffLimit: {{ .Values.assetPreparer.backoffLimit }}
activeDeadlineSeconds: 172800
template:
spec:
{{- with .Values.assetPreparer.nodeSelector }}
Expand Down
17 changes: 8 additions & 9 deletions charts/pro-api/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,13 @@ spec:
- name: http
containerPort: 8080
protocol: TCP
- name: management
containerPort: 8090
protocol: TCP
volumeMounts:
- mountPath: "{{ .Values.api.settings.tempPath }}"
name: temp-volume
livenessProbe:
httpGet:
path: /health/live
port: management
port: http
failureThreshold: 5
initialDelaySeconds: 5
periodSeconds: 15
Expand All @@ -88,7 +85,7 @@ spec:
readinessProbe:
httpGet:
path: /health/ready
port: management
port: http
failureThreshold: 3
initialDelaySeconds: 5
periodSeconds: 5
Expand All @@ -97,7 +94,7 @@ spec:
startupProbe:
httpGet:
path: /health/live
port: management
port: http
failureThreshold: 20
initialDelaySeconds: 5
periodSeconds: 5
Expand Down Expand Up @@ -158,13 +155,13 @@ spec:
value: "{{ .Values.api.settings.env }}"
- name: Common__FilterByZoneCodes
value: "{{ .Values.api.settings.filterByZoneCodes }}"
- name: DB_CONNECTION_STRING
- name: Postgres__ConnectionString
value: {{ required "A valid .Values.postgres.connectionString entry required" $.Values.postgres.connectionString }}
{{ if .Values.postgres.connectionStringReadonly }}
- name: DB_CONNECTION_STRING_READONLY
- name: Postgres__ConnectionStringReadonly
value: "{{ .Values.postgres.connectionStringReadonly }}"
{{ end }}
- name: DB_CONNECTION_PWD
- name: Postgres__Password
valueFrom:
secretKeyRef:
key: dbConnectionPwd
Expand Down Expand Up @@ -308,3 +305,5 @@ spec:
- name: OpenApi__Servers__{{$i}}
value: "{{ $s }}"
{{- end }}
- name: TasksApi__Url
value: http://{{ include "pro-api.tasks-name" . }}
15 changes: 6 additions & 9 deletions charts/pro-api/templates/permissions-api-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,13 @@ spec:
- name: http
containerPort: 8081
protocol: TCP
- name: management
containerPort: 8091
protocol: TCP
volumeMounts:
- mountPath: "{{ .Values.api.settings.tempPath }}"
name: temp-volume
livenessProbe:
httpGet:
path: /health/live
port: management
port: http
failureThreshold: 5
initialDelaySeconds: 5
periodSeconds: 15
Expand All @@ -84,7 +81,7 @@ spec:
readinessProbe:
httpGet:
path: /health/ready
port: management
port: http
failureThreshold: 3
initialDelaySeconds: 15
periodSeconds: 5
Expand All @@ -93,7 +90,7 @@ spec:
startupProbe:
httpGet:
path: /health/live
port: management
port: http
failureThreshold: 3
initialDelaySeconds: 15
periodSeconds: 5
Expand All @@ -112,11 +109,11 @@ spec:
value: "{{ .Values.api.settings.allowAnyOrigin }}"
- name: ENV
value: "{{ .Values.api.settings.env }}"
- name: DB_CONNECTION_STRING
- name: Postgres__ConnectionString
value: {{ required "A valid .Values.postgres.connectionString entry required" $.Values.postgres.connectionString }}
- name: DB_CONNECTION_STRING_READONLY
- name: Postgres__ConnectionStringReadonly
value: "{{ .Values.postgres.connectionStringReadonly }}"
- name: DB_CONNECTION_PWD
- name: Postgres__Password
valueFrom:
secretKeyRef:
key: dbConnectionPwd
Expand Down
Loading