From 766a4ac009fc77329e0c8c61a0ba8e904edf1a22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=BE=D0=BB=D0=BE=D1=87=D0=BD=D0=B8=D0=BA=D0=BE?= =?UTF-8?q?=D0=B2=20=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9?= Date: Thu, 8 Aug 2024 15:22:43 +0700 Subject: [PATCH 1/6] =?UTF-8?q?=D0=BE=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D0=BB?= =?UTF-8?q?=D0=B8=20PRO=20API=20=D0=B4=D0=BE=20=D0=B2=D0=B5=D1=80=D1=81?= =?UTF-8?q?=D0=B8=D0=B8=201.35.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- charts/pro-api/Chart.yaml | 2 +- charts/pro-api/README.md | 30 ++--- charts/pro-api/templates/_helpers.tpl | 10 -- charts/pro-api/templates/deployment.yaml | 21 ++-- .../templates/permissions-api-deployment.yaml | 9 +- .../templates/user-asset-importer.yaml | 112 ------------------ charts/pro-api/values.yaml | 26 ++-- 7 files changed, 49 insertions(+), 161 deletions(-) delete mode 100755 charts/pro-api/templates/user-asset-importer.yaml diff --git a/charts/pro-api/Chart.yaml b/charts/pro-api/Chart.yaml index f56c386d6..2c3c1f1dc 100644 --- a/charts/pro-api/Chart.yaml +++ b/charts/pro-api/Chart.yaml @@ -5,7 +5,7 @@ description: Geo API for getting geo data type: application version: 1.26.0 -appVersion: 1.22.0 +appVersion: 1.35.0 maintainers: - name: 2gis diff --git a/charts/pro-api/README.md b/charts/pro-api/README.md index 0fb1d7330..f33f81fb8 100644 --- a/charts/pro-api/README.md +++ b/charts/pro-api/README.md @@ -75,7 +75,7 @@ | Name | Description | Value | | ------------------ | ----------- | ------------------------- | | `image.repository` | Repository | `2gis-on-premise/pro-api` | -| `image.tag` | Tag | `1.22.0` | +| `image.tag` | Tag | `1.35.0` | | `image.pullPolicy` | Pull Policy | `IfNotPresent` | ### 2GIS PRO Storage configuration @@ -105,15 +105,16 @@ ### Auth configuration -| Name | Description | Value | -| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | -| `auth.type` | Authentication type: 'none' - disabled, 'openid10' - [OpenId 1.0 / OAuth 2.0 authentication protocol](https://openid.net/specs/openid-connect-core-1_0.html), 'urbi' - urbi authentication protocol | `none` | -| `auth.url` | API URL of authentication service. Example: `http(s)://keycloak.ingress.host` | `""` | -| `auth.userInfoEndpoint` | The [UserInfo endpoint](https://openid.net/specs/openid-connect-core-1_0.html#UserInfo). Example: `realms/URBI_Pro/protocol/openid-connect/userinfo` | `""` | -| `auth.apiKey` | Secret API Key to perform authorized service actions, random string. Must be set if type not 'none'. Example: `4230b288-301e-4ec6-82c6-db6a8a72c2af` | `""` | -| `auth.permissionsApiKey` | Secret Permissions API Key to perform authorized service actions, random string. Must be set if type not 'none'. Example: `c7d74870-ec28-4543-b408-b49bfed84399` | `""` | -| `auth.turnOffCertValidation` | Turn off certificate validation for auth.url | `false` | -| `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` | `[]` | +| Name | Description | Value | +| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | +| `auth.type` | Authentication type: 'none' - disabled, 'openid10' - [OpenId 1.0 / OAuth 2.0 authentication protocol](https://openid.net/specs/openid-connect-core-1_0.html), 'urbi' - urbi authentication protocol | `none` | +| `auth.url` | API URL of authentication service. Example: `http(s)://keycloak.ingress.host` | `""` | +| `auth.userInfoEndpoint` | The [UserInfo endpoint](https://openid.net/specs/openid-connect-core-1_0.html#UserInfo). Example: `realms/URBI_Pro/protocol/openid-connect/userinfo` | `""` | +| `auth.wellKnownConfigEndpoint` | The [Well-Known Config endpoint](https://openid.net/specs/openid-connect-discovery-1_0.html). Example: `realms/URBI_Pro/.well-known/openid-configuration` | `""` | +| `auth.apiKey` | Secret API Key to perform authorized service actions, random string. Must be set if type not 'none'. Example: `4230b288-301e-4ec6-82c6-db6a8a72c2af` | `""` | +| `auth.permissionsApiKey` | Secret Permissions API Key to perform authorized service actions, random string. Must be set if type not 'none'. Example: `c7d74870-ec28-4543-b408-b49bfed84399` | `""` | +| `auth.turnOffCertValidation` | Turn off certificate validation for auth.url | `false` | +| `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` | `[]` | ### PostgreSQL settings @@ -202,10 +203,9 @@ ### 2GIS PRO API Job settings -| Name | Description | Value | -| -------------------------- | -------------------------- | --------------------- | -| `appAssetImporterName` | Data Import job name. | `asset-importer` | -| `appUserAssetImporterName` | User Data Import job name. | `user-asset-importer` | +| Name | Description | Value | +| ---------------------- | --------------------- | ---------------- | +| `appAssetImporterName` | Data Import job name. | `asset-importer` | ### 2GIS PRO Permissions API configuration @@ -218,7 +218,7 @@ | Name | Description | Value | | ------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ | | `assetImporter.repository` | Docker Repository Image. | `2gis-on-premise/pro-importer` | -| `assetImporter.tag` | Docker image tag. | `1.22.0` | +| `assetImporter.tag` | Docker image tag. | `1.35.0` | | `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` | diff --git a/charts/pro-api/templates/_helpers.tpl b/charts/pro-api/templates/_helpers.tpl index d114e20db..38121023e 100644 --- a/charts/pro-api/templates/_helpers.tpl +++ b/charts/pro-api/templates/_helpers.tpl @@ -33,15 +33,6 @@ {{- end -}} {{- end -}} -{{- define "pro-api.user-asset-importer-name" -}} -{{- $name := default .Values.appUserAssetImporterName -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} - {{- define "pro-api.asset-preparer-name" -}} {{- $name := default .Values.appAssetPreparerName -}} {{- if contains $name .Release.Name -}} @@ -51,7 +42,6 @@ {{- end -}} {{- end -}} - {{- define "pro-api.service-account-name" -}} {{- if empty .Values.api.serviceAccountOverride }} {{- $name := default .Values.api.serviceAccount -}} diff --git a/charts/pro-api/templates/deployment.yaml b/charts/pro-api/templates/deployment.yaml index 54df5b651..e6582ad47 100644 --- a/charts/pro-api/templates/deployment.yaml +++ b/charts/pro-api/templates/deployment.yaml @@ -70,13 +70,16 @@ spec: - name: http containerPort: 8080 protocol: TCP + - name: management + containerPort: 8090 + protocol: TCP volumeMounts: - mountPath: "{{ .Values.api.tempPath }}" name: temp-volume livenessProbe: httpGet: path: /health/live - port: http + port: management failureThreshold: 5 initialDelaySeconds: 5 periodSeconds: 15 @@ -85,7 +88,7 @@ spec: readinessProbe: httpGet: path: /health/ready - port: http + port: management failureThreshold: 3 initialDelaySeconds: 5 periodSeconds: 5 @@ -94,7 +97,7 @@ spec: startupProbe: httpGet: path: /health/live - port: http + port: management failureThreshold: 20 initialDelaySeconds: 5 periodSeconds: 5 @@ -112,10 +115,8 @@ spec: value: "{{ .Values.backgroundJobs.enableUserAssetsImporter }}" - name: Import__EnableAssetsStreaming value: "{{ .Values.backgroundJobs.enableAssetsStreaming }}" - - name: Import__CommonAssetsJobName + - name: Import__AssetImporterJobName value: {{ include "pro-api.asset-importer-name" . }} - - name: Import__UserAssetsJobName - value: {{ include "pro-api.user-asset-importer-name" . }} - name: Import__ExternalLinksProxyUrl value: "{{ .Values.assetImporter.externalLinksProxyUrl }}" - name: Import__ExternalLinksAllowedHosts @@ -220,7 +221,7 @@ spec: - name: Kafka__ImportTasksTopicSettings__ReaderGroupId value: {{ $.Values.kafka.importTasksTopic.readerGroupId }} - name: Kafka__AssetDataTopicSettings__Name - value: {{ $.Values.kafka.assetDataTopic.name }} + value: {{ required "A valid .Values.kafka.assetDataTopic.name entry required" $.Values.kafka.assetDataTopic.name }} - name: Kafka__EventsTopicSettings__Name value: {{ required "A valid .Values.kafka.eventsTopic.name entry required" $.Values.kafka.eventsTopic.name }} - name: Kafka__EventsTopicSettings__ReaderGroupId @@ -231,6 +232,8 @@ spec: value: "{{ .Values.auth.url }}" - name: Auth__UserInfoEndpoint value: "{{ .Values.auth.userInfoEndpoint }}" + - name: Auth__WellKnownConfigEndpoint + value: "{{ .Values.auth.wellKnownConfigEndpoint }}" - name: Auth__AutoRegisterUsers value: "{{ .Values.auth.autoRegisterUsers }}" - name: Auth__TurnOffCertValidation @@ -297,3 +300,7 @@ spec: value: "{{ .Values.api.localCache.trackStatistics }}" - name: LicensingService__BaseUri value: {{ required "A valid .Values.license.url entry required" $.Values.license.url }} + {{- range $i, $s := .Values.api.openApi.servers }} + - name: OpenApi__Servers__{{$i}} + value: "{{ $s }}" + {{- end }} diff --git a/charts/pro-api/templates/permissions-api-deployment.yaml b/charts/pro-api/templates/permissions-api-deployment.yaml index 27e399e2f..b8b743827 100644 --- a/charts/pro-api/templates/permissions-api-deployment.yaml +++ b/charts/pro-api/templates/permissions-api-deployment.yaml @@ -66,13 +66,16 @@ spec: - name: http containerPort: 8081 protocol: TCP + - name: management + containerPort: 8091 + protocol: TCP volumeMounts: - mountPath: "{{ .Values.api.tempPath }}" name: temp-volume livenessProbe: httpGet: path: /health/live - port: http + port: management failureThreshold: 5 initialDelaySeconds: 5 periodSeconds: 15 @@ -81,7 +84,7 @@ spec: readinessProbe: httpGet: path: /health/ready - port: http + port: management failureThreshold: 3 initialDelaySeconds: 15 periodSeconds: 5 @@ -90,7 +93,7 @@ spec: startupProbe: httpGet: path: /health/live - port: http + port: management failureThreshold: 3 initialDelaySeconds: 15 periodSeconds: 5 diff --git a/charts/pro-api/templates/user-asset-importer.yaml b/charts/pro-api/templates/user-asset-importer.yaml deleted file mode 100755 index a861ab889..000000000 --- a/charts/pro-api/templates/user-asset-importer.yaml +++ /dev/null @@ -1,112 +0,0 @@ -{{ if .Values.userAssetImporter.enabled }} -apiVersion: batch/v1 -kind: CronJob -metadata: - name: {{ include "pro-api.user-asset-importer-name" . }} -spec: - concurrencyPolicy: Forbid - schedule: "{{ .Values.assetImporter.schedule }}" - successfulJobsHistoryLimit: {{ .Values.assetImporter.successfulJobsHistoryLimit }} - suspend: true # джоба используется как шаблон для запуска обычных джоб - jobTemplate: - spec: - backoffLimit: {{ .Values.assetImporter.backoffLimit }} - template: - spec: - {{- with .Values.assetImporter.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 12 }} - {{- end }} - restartPolicy: Never - serviceAccountName: {{ include "pro-api.service-account-name" . }} - volumes: - - name: temp-volume - emptyDir: {} - containers: - - name: {{ include "pro-api.user-asset-importer-name" . }} - image: {{ required "A valid .Values.dgctlDockerRegistry entry required" $.Values.dgctlDockerRegistry }}/{{ .Values.assetImporter.repository }}:{{ .Values.assetImporter.tag }} - imagePullPolicy: IfNotPresent - resources: - {{- toYaml .Values.assetImporter.resources | nindent 16 }} - volumeMounts: - - mountPath: "{{ .Values.api.tempPath }}" - name: temp-volume - env: - - name: JOB_NAME - value: {{ include "pro-api.user-asset-importer-name" . }} - - name: TEMP_PATH - value: "{{ .Values.api.tempPath }}" - - name: ENV - value: "{{ .Values.api.env }}" - - name: MODE - value: "Schedule" - - name: ASSET_TYPE - value: "user" - - name: MAX_PARALLEL_JOBS - value: "{{ .Values.assetImporter.maxParallelJobs }}" - - name: S3Settings__Url - value: {{ required "A valid .Values.dgctlStorage.host entry required" $.Values.dgctlStorage.host }} - - name: S3Settings__Secure - value: "{{ .Values.dgctlStorage.secure }}" - - name: S3Settings__Region - value: {{ .Values.dgctlStorage.region }} - - name: S3Settings__DisablePayloadSigning - value: "{{ .Values.dgctlStorage.disablePayloadSigning }}" - - name: S3Settings__AssetDataBucket - value: {{ required "A valid .Values.s3.assetsDataBucket entry required" $.Values.s3.assetsDataBucket }} - - name: S3Settings__UserAssetDataBucket - value: "{{ .Values.s3.userAssetsDataBucket }}" - - name: S3Settings__LayerDataBucket - value: "{{ .Values.s3.layerDataBucket }}" - - name: S3Settings__SnapshotBucket - value: {{ .Values.s3.snapshotBucket }} - - name: S3Settings__AccessKey - valueFrom: - secretKeyRef: - key: s3AccessKey - name: {{ include "pro-api.name" . }}-secret - - name: S3Settings__SecretKey - valueFrom: - secretKeyRef: - key: s3SecretKey - name: {{ include "pro-api.name" . }}-secret - - name: ES_HOST - value: "{{ .Values.elastic.host }}" - {{- if .Values.elastic.credentials }} - - name: ES_CREDENTIALS - valueFrom: - secretKeyRef: - key: esCredentials - name: {{ include "pro-api.name" . }}-secret - {{ end }} - - name: ES_INDEX_PREFIX - value: "{{ .Values.elastic.indexPrefix }}" - - name: API_URL - value: http://{{ include "pro-api.name" . }} - - name: IMAGE_PROXY_URL - value: "{{ .Values.assetImporter.imageProxyUrl }}" - {{ if .Values.auth.apiKey }} - - name: API_TOKEN - valueFrom: - secretKeyRef: - key: apiKey - name: {{ include "pro-api.name" . }}-secret - {{ end }} - - name: Common__Logging__Format - value: "{{ .Values.api.logging.format }}" - - name: Common__Logging__Targets - value: "{{ .Values.api.logging.targets }}" - - name: Common__SuppressImportFailure - value: "true" - - name: Navi__Url - value: {{ .Values.navi.url }} - - name: Navi__Key - valueFrom: - secretKeyRef: - key: routingApi2gisKey - name: {{ include "pro-api.name" . }}-secret - - name: TileGen__Url - value: "{{ .Values.tileGen.url }}" - - name: TileGen__UserDataTileSet - value: "{{ .Values.tileGen.userDataTileSet }}" -{{ end }} diff --git a/charts/pro-api/values.yaml b/charts/pro-api/values.yaml index 9174c7c89..839e14676 100644 --- a/charts/pro-api/values.yaml +++ b/charts/pro-api/values.yaml @@ -1,4 +1,4 @@ -# @section Docker Registry settings +# @section Docker Registry settings # @param dgctlDockerRegistry Docker Registry endpoint where On-Premise services' images reside. Format: `host:port`. @@ -121,14 +121,14 @@ vpa: image: repository: 2gis-on-premise/pro-api - tag: 1.22.0 + tag: 1.35.0 pullPolicy: IfNotPresent # @skip permissionsApiImage permissionsApiImage: repository: 2gis-on-premise/pro-permissions-api - tag: 1.22.0 + tag: 1.35.0 pullPolicy: IfNotPresent # @section 2GIS PRO Storage configuration @@ -148,7 +148,7 @@ s3: # @section 2GIS PRO API configuration -# @param api.serviceAccount Kubernetes service account +# @param api.serviceAccount Kubernetes service account # @param api.serviceAccountOverride The name of an existing custom service account. If specified, the services in the chart will use this existing service account. If not specified, a new service account will be created and used with the name from the variable `api.serviceAccount`. # @param api.tempPath Path to directory used for temp data # @param api.allowAnyOrigin Cors policy: allow any origin to perform requests to pro-api service @@ -167,6 +167,8 @@ s3: # @skip Local cache settings # @skip api.localCache.enabled # @skip api.localCache.trackStatistics +# @skip Open API settings +# @skip api.openApi.servers api: serviceAccount: runner @@ -187,12 +189,15 @@ api: localCache: enabled: true trackStatistics: false + openApi: + servers: [] # @section Auth configuration # @param auth.type Authentication type: 'none' - disabled, 'openid10' - [OpenId 1.0 / OAuth 2.0 authentication protocol](https://openid.net/specs/openid-connect-core-1_0.html), 'urbi' - urbi authentication protocol # @param auth.url API URL of authentication service. Example: `http(s)://keycloak.ingress.host` # @param auth.userInfoEndpoint The [UserInfo endpoint](https://openid.net/specs/openid-connect-core-1_0.html#UserInfo). Example: `realms/URBI_Pro/protocol/openid-connect/userinfo` +# @param auth.wellKnownConfigEndpoint The [Well-Known Config endpoint](https://openid.net/specs/openid-connect-discovery-1_0.html). Example: `realms/URBI_Pro/.well-known/openid-configuration` # @param auth.apiKey Secret API Key to perform authorized service actions, random string. Must be set if type not 'none'. Example: `4230b288-301e-4ec6-82c6-db6a8a72c2af` # @param auth.permissionsApiKey Secret Permissions API Key to perform authorized service actions, random string. Must be set if type not 'none'. Example: `c7d74870-ec28-4543-b408-b49bfed84399` # @param auth.turnOffCertValidation Turn off certificate validation for auth.url @@ -203,6 +208,7 @@ auth: type: none url: '' userInfoEndpoint: '' + wellKnownConfigEndpoint: '' apiKey: '' permissionsApiKey: '' autoRegisterUsers: true @@ -349,11 +355,9 @@ tileGen: # @section 2GIS PRO API Job settings # @param appAssetImporterName Data Import job name. -# @param appUserAssetImporterName User Data Import job name. # @skip appAssetPreparerName appAssetImporterName: asset-importer -appUserAssetImporterName: user-asset-importer appAssetPreparerName: asset-preparer # @skip permissionsPodSettings @@ -377,7 +381,7 @@ permissionsPodSettings: memory: 256M limits: cpu: 1 - memory: 512M + memory: 1G # @section 2GIS PRO Permissions API configuration # @skip permissionsApi.host @@ -414,7 +418,7 @@ permissionsApi: assetImporter: repository: 2gis-on-premise/pro-importer - tag: 1.22.0 + tag: 1.35.0 schedule: 0 18 * * * backoffLimit: 2 successfulJobsHistoryLimit: 3 @@ -437,15 +441,11 @@ assetImporter: externalLinksAllowedHosts: '' esMetricsEnabled: false -# @skip userAssetImporter -userAssetImporter: - enabled: true - # @skip assetPreparer assetPreparer: repository: 2gis-on-premise/pro-importer - tag: 1.22.0 + tag: 1.35.0 schedule: 0 16 * * 6 backoffLimit: 2 successfulJobsHistoryLimit: 1 From a6767e28008a5fa89ffc12ec757a3cca837b5f09 Mon Sep 17 00:00:00 2001 From: aveldin Date: Thu, 22 Aug 2024 13:34:55 +0700 Subject: [PATCH 2/6] add new version PRO UI --- charts/pro-api/Chart.yaml | 2 +- charts/pro-ui/Chart.yaml | 4 +- charts/pro-ui/templates/NOTES.txt | 6 +- charts/pro-ui/templates/_env.tpl | 3 +- charts/pro-ui/templates/_helpers.tpl | 4 +- charts/pro-ui/templates/ui/deployment.yaml | 42 ++-- charts/pro-ui/templates/ui/hpa.yaml | 2 +- charts/pro-ui/templates/ui/ingress.yaml | 14 +- charts/pro-ui/templates/ui/service.yaml | 8 +- charts/pro-ui/values.yaml | 239 +++++++++++---------- 10 files changed, 162 insertions(+), 162 deletions(-) diff --git a/charts/pro-api/Chart.yaml b/charts/pro-api/Chart.yaml index 2c3c1f1dc..dd6dafd5a 100644 --- a/charts/pro-api/Chart.yaml +++ b/charts/pro-api/Chart.yaml @@ -4,7 +4,7 @@ description: Geo API for getting geo data type: application -version: 1.26.0 +version: 1.35.0 appVersion: 1.35.0 maintainers: diff --git a/charts/pro-ui/Chart.yaml b/charts/pro-ui/Chart.yaml index f7a54e8a1..eb7e58534 100644 --- a/charts/pro-ui/Chart.yaml +++ b/charts/pro-ui/Chart.yaml @@ -3,8 +3,8 @@ name: pro-ui type: application description: A Helm chart for Kubernetes to deploy 2GIS Pro UI service -version: 1.26.0 -appVersion: 2.15.1 +version: 2.0.0 +appVersion: 2.27.0 maintainers: - name: 2gis diff --git a/charts/pro-ui/templates/NOTES.txt b/charts/pro-ui/templates/NOTES.txt index 760de33f6..16aebb51f 100644 --- a/charts/pro-ui/templates/NOTES.txt +++ b/charts/pro-ui/templates/NOTES.txt @@ -1,9 +1,9 @@ Pro UI service is released as "{{ .Release.Name }}" at "{{ .Release.Namespace }}" namespace. -{{- if .Values.ui.ingress.enabled }} +{{- if .Values.ingress.enabled }} You can check service using curl -{{- range $host := .Values.ui.ingress.hosts }} - http{{ if $.Values.ui.ingress.tls }}s{{ end }}://{{ $host.host }}/ +{{- range $host := .Values.ingress.hosts }} + http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}/ {{- end }} {{- else }} You should publish the service in your preferred way (ingress, balancer, etc). diff --git a/charts/pro-ui/templates/_env.tpl b/charts/pro-ui/templates/_env.tpl index 177cd6ff5..065e8096b 100644 --- a/charts/pro-ui/templates/_env.tpl +++ b/charts/pro-ui/templates/_env.tpl @@ -1,4 +1,3 @@ - {{- define "pro.env.ui" -}} - name: NETWORK_TIMEOUT value: "{{ required "A valid .Values.ui.api.timeout" .Values.ui.api.timeout }}" @@ -74,7 +73,7 @@ - name: HOME value: "/tmp" - name: SERVER_PORT - value: "{{ .Values.ui.containerPort }}" + value: "{{ .Values.containerPort }}" - name: MAPBOX_STYLE_TOKEN value: "{{ .Values.ui.mapbox.styleToken }}" - name: FEATURE_EXTERNAL_STYLE_MANAGER_IS_ENABLED diff --git a/charts/pro-ui/templates/_helpers.tpl b/charts/pro-ui/templates/_helpers.tpl index dd4de2916..125a2e1b3 100644 --- a/charts/pro-ui/templates/_helpers.tpl +++ b/charts/pro-ui/templates/_helpers.tpl @@ -34,8 +34,8 @@ app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end -}} {{- define "pro.ui.service.annotations" -}} -{{- if .Values.ui.service.annotations }} -{{- include "pro.ui.tplvalues.render" (dict "value" .Values.ui.service.annotations "context" . ) }} +{{- if .Values.service.annotations }} +{{- include "pro.ui.tplvalues.render" (dict "value" .Values.service.annotations "context" . ) }} {{ end }} {{- end -}} diff --git a/charts/pro-ui/templates/ui/deployment.yaml b/charts/pro-ui/templates/ui/deployment.yaml index 16e719ea1..5bd1b1ae4 100644 --- a/charts/pro-ui/templates/ui/deployment.yaml +++ b/charts/pro-ui/templates/ui/deployment.yaml @@ -2,60 +2,60 @@ apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "pro.ui.name" . }} - {{- with .Values.ui.annotations }} + {{- with .Values.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} labels: {{- include "pro.ui.labels" . | nindent 4 }} - {{- with .Values.ui.labels }} + {{- with .Values.labels }} {{- toYaml . | nindent 4 }} {{- end }} spec: - replicas: {{ .Values.ui.replicas }} - revisionHistoryLimit: {{ .Values.ui.revisionHistoryLimit }} - {{- if .Values.ui.strategy }} + replicas: {{ .Values.replicas }} + revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} + {{- if .Values.strategy }} strategy: - {{- toYaml .Values.ui.strategy | nindent 4 }} + {{- toYaml .Values.strategy | nindent 4 }} {{- end }} selector: matchLabels: {{- include "pro.ui.selectorLabels" . | nindent 6 }} template: metadata: - {{- with .Values.ui.podAnnotations }} + {{- with .Values.podAnnotations }} annotations: {{- include "pro.ui.tplvalues.render" (dict "value" . "context" $ ) | nindent 8 }} {{- end }} labels: {{- include "pro.ui.labels" . | nindent 8 }} - {{- with .Values.ui.podLabels }} + {{- with .Values.podLabels }} {{- include "pro.ui.tplvalues.render" (dict "value" . "context" $ ) | nindent 8 }} {{- end }} spec: containers: - name: pro-ui - image: {{ required "A valid .Values.dgctlDockerRegistry entry required" .Values.dgctlDockerRegistry }}/{{ .Values.ui.image.repository }}:{{ .Values.ui.image.tag }} + image: {{ required "A valid .Values.dgctlDockerRegistry entry required" .Values.dgctlDockerRegistry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }} imagePullPolicy: {{ .Values.imagePullPolicy }} ports: - name: http - containerPort: {{ .Values.ui.containerPort }} - {{- if .Values.ui.readinessProbe.enabled }} + containerPort: {{ .Values.containerPort }} + {{- if .Values.readinessProbe.enabled }} readinessProbe: httpGet: path: {{ .Values.ui.healthcheckPath }} port: http - {{- $otherProbeParams := (omit .Values.ui.readinessProbe "enabled") }} + {{- $otherProbeParams := (omit .Values.readinessProbe "enabled") }} {{- with $otherProbeParams }} {{- include "pro.ui.tplvalues.render" (dict "value" . "context" $) | nindent 12 }} {{- end }} {{- end }} - {{- if .Values.ui.livenessProbe.enabled }} + {{- if .Values.livenessProbe.enabled }} livenessProbe: httpGet: path: {{ .Values.ui.healthcheckPath }} port: http - {{- $otherProbeParams := (omit .Values.ui.livenessProbe "enabled") }} + {{- $otherProbeParams := (omit .Values.livenessProbe "enabled") }} {{- with $otherProbeParams }} {{- include "pro.ui.tplvalues.render" (dict "value" . "context" $) | nindent 12 }} {{- end }} @@ -64,20 +64,20 @@ spec: preStop: exec: command: ["/bin/sh", "-c", "sleep 5"] - {{- if .Values.ui.resources }} - resources: {{- toYaml .Values.ui.resources | nindent 12 }} + {{- if .Values.resources }} + resources: {{- toYaml .Values.resources | nindent 12 }} {{- end }} env: {{- include "pro.env.ui" . | nindent 12 }} - {{- with .Values.ui.nodeSelector }} + {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.ui.affinity }} + {{- with .Values.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.ui.tolerations }} + {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} @@ -85,6 +85,6 @@ spec: imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} - {{- if .Values.ui.terminationGracePeriodSeconds }} - terminationGracePeriodSeconds: {{ .Values.ui.terminationGracePeriodSeconds }} + {{- if .Values.terminationGracePeriodSeconds }} + terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }} {{- end }} diff --git a/charts/pro-ui/templates/ui/hpa.yaml b/charts/pro-ui/templates/ui/hpa.yaml index 6f84ed928..dc559f0f0 100644 --- a/charts/pro-ui/templates/ui/hpa.yaml +++ b/charts/pro-ui/templates/ui/hpa.yaml @@ -1,4 +1,4 @@ -{{- with .Values.ui.hpa -}} +{{- with .Values.hpa -}} {{- if .enabled -}} apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler diff --git a/charts/pro-ui/templates/ui/ingress.yaml b/charts/pro-ui/templates/ui/ingress.yaml index d7f88e3e6..45b547dc9 100644 --- a/charts/pro-ui/templates/ui/ingress.yaml +++ b/charts/pro-ui/templates/ui/ingress.yaml @@ -1,19 +1,19 @@ -{{- if .Values.ui.ingress.enabled -}} +{{- if .Values.ingress.enabled -}} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ include "pro.ui.name" . }} labels: {{- include "pro.ui.labels" . | nindent 4 }} - {{- with .Values.ui.ingress.annotations }} + {{- with .Values.ingress.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: - ingressClassName: {{ .Values.ui.ingress.className }} - {{- if .Values.ui.ingress.tls }} + ingressClassName: {{ .Values.ingress.className }} + {{- if .Values.ingress.tls }} tls: - {{- range .Values.ui.ingress.tls }} + {{- range .Values.ingress.tls }} - hosts: {{- range .hosts }} - {{ . | quote }} @@ -22,7 +22,7 @@ spec: {{- end }} {{- end }} rules: - {{- range .Values.ui.ingress.hosts }} + {{- range .Values.ingress.hosts }} - host: {{ .host | quote }} http: paths: @@ -33,7 +33,7 @@ spec: service: name: {{ include "pro.ui.name" $ }} port: - number: {{ $.Values.ui.service.port }} + number: {{ $.Values.service.port }} {{- end }} {{- end }} {{- end }} diff --git a/charts/pro-ui/templates/ui/service.yaml b/charts/pro-ui/templates/ui/service.yaml index b523cd3bd..777acd377 100644 --- a/charts/pro-ui/templates/ui/service.yaml +++ b/charts/pro-ui/templates/ui/service.yaml @@ -6,15 +6,15 @@ metadata: {{- include "pro.ui.service.annotations" . | nindent 4 }} labels: {{- include "pro.ui.labels" . | nindent 4 }} - {{- with .Values.ui.service.labels }} + {{- with .Values.service.labels }} {{- toYaml . | nindent 4 }} {{- end }} spec: - type: {{ .Values.ui.service.type }} + type: {{ .Values.service.type }} ports: - name: http - port: {{ .Values.ui.service.port }} - targetPort: {{ .Values.ui.service.targetPort }} + port: {{ .Values.service.port }} + targetPort: {{ .Values.service.targetPort }} protocol: TCP appProtocol: http selector: diff --git a/charts/pro-ui/values.yaml b/charts/pro-ui/values.yaml index 782b49659..cd6afd1df 100644 --- a/charts/pro-ui/values.yaml +++ b/charts/pro-ui/values.yaml @@ -9,60 +9,72 @@ dgctlDockerRegistry: '' imagePullPolicy: IfNotPresent imagePullSecrets: [] -ui: - # @section Common settings - - # @param ui.replicas A replica count for the pod. - # @param ui.revisionHistoryLimit Revision history limit (used for [rolling back](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) a deployment). - # @param ui.terminationGracePeriodSeconds Seconds pod needs to [terminate](https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods) gracefully - # @param ui.nodeSelector Kubernetes [node selectors](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector). - # @param ui.affinity Kubernetes pod [affinity settings](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity). - # @param ui.tolerations Kubernetes [tolerations](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) settings. - # @param ui.podAnnotations Kubernetes [pod annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/). - # @param ui.podLabels Kubernetes [pod labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/). - # @param ui.annotations Kubernetes [annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/). - # @param ui.labels Kubernetes [labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/). - # @param ui.readinessProbe.enabled Enable [readinessProbe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes) on PRO UI containers - # @param ui.livenessProbe.enabled Enable [livenessProbe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes) on PRO UI containers - # @param ui.healthcheckPath Application http path for health check - # @param ui.containerPort Port on which application listen connection in container - - replicas: 1 - revisionHistoryLimit: 3 - terminationGracePeriodSeconds: 60 - nodeSelector: {} - affinity: {} - tolerations: [] - podAnnotations: {} - podLabels: {} - annotations: {} - labels: {} - readinessProbe: - enabled: true - livenessProbe: - enabled: false - healthcheckPath: /api/healthcheck/app - containerPort: 3000 - - # @section Deployment settings - - # @param ui.image.repository Repository - # @param ui.image.tag Tag - image: - repository: 2gis-on-premise/pro-ui - tag: 2.15.1 - - # @section UI service settings +# @section Strategy settings + +# @param strategy.type Type of Kubernetes deployment. Can be `Recreate` or `RollingUpdate`. +# @param strategy.rollingUpdate.maxUnavailable Maximum number of pods that can be created over the desired number of pods when doing [rolling update](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#rolling-update-deployment). +# @param strategy.rollingUpdate.maxSurge Maximum number of pods that can be unavailable during the [rolling update](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#rolling-update-deployment) process. + +strategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 0 + maxSurge: 1 + +# @section Deployment settings + +# @param image.repository Repository +# @param image.tag Tag +image: + repository: 2gis-on-premise/pro-ui + tag: 2.15.1 + +# @section Common deployment settings + +# @param replicas A replica count for the pod. +# @param revisionHistoryLimit Revision history limit (used for [rolling back](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) a deployment). +# @param terminationGracePeriodSeconds Seconds pod needs to [terminate](https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods) gracefully +# @param nodeSelector Kubernetes [node selectors](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector). +# @param affinity Kubernetes pod [affinity settings](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity). +# @param tolerations Kubernetes [tolerations](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) settings. +# @param podAnnotations Kubernetes [pod annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/). +# @param podLabels Kubernetes [pod labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/). +# @param annotations Kubernetes [annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/). +# @param labels Kubernetes [labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/). +# @param readinessProbe.enabled Enable [readinessProbe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes) on PRO UI containers +# @param livenessProbe.enabled Enable [livenessProbe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes) on PRO UI containers +# @param containerPort Port on which application listen connection in container + +replicas: 1 +revisionHistoryLimit: 3 +terminationGracePeriodSeconds: 60 +nodeSelector: {} +affinity: {} +tolerations: [] +podAnnotations: {} +podLabels: {} +annotations: {} +labels: {} +readinessProbe: + enabled: true +livenessProbe: + enabled: false +containerPort: 3000 + +# @section UI service settings +ui: # @skip ui.logLevel # @skip ui.isOnPremise + # @param ui.healthcheckPath Application http path for health check # @param ui.appTheme Branding inside the app. Possible values: `"2gis"` or `"urbi"`. # @param ui.appLocale Language in the app. Possible values: `"ar_AE"`, `"en_AE"` or `"ru_RU"`. # @param ui.appInitialMapCenter Default map coordinates, it contains of two numbers in an array: [lng, lat] (e.g., [55.27, 25.2] stands for Dubai, [37.64, 55.74] — for Moscow). - # @param ui.supportDocumentationLink Product online documentation link. Ex.: 'https://docs.urbi.ae/en/pro/start' or 'https://docs.2gis.com/ru/pro/start' + # @param ui.supportDocumentationLink Product online documentation link. Ex.: 'https://docs.urbi.ae/en/pro/start', 'https://docs.2gis.com/ru/pro/start' # @param ui.immersiveModels A string value for config to enabling 3D-models. Possible values: [{"id":4,"name":"Ground","mapOptions":{"center":[53.287567,23.564967],"styleZoom":19.2,"pitch":45,"rotation":0},"objects":[{"buildingIds":[],"coords":[53.284762,23.569323],"scale":90,"rotateX":0.5,"rotateY":0,"moveX":0,"moveY":0,"moveZ":0,"models":[{"path":"/static/models/adnoc/ground.glb","name":"Ground","displayName":"Ground"}]}]}] # @param ui.publicS3Url Optional URL of public S3 where style data will be placed. Example: https://s3.domain.example.com/ + healthcheckPath: /api/healthcheck/app logLevel: error isOnPremise: true appTheme: urbi @@ -172,83 +184,71 @@ ui: configUrl: '' s3Bucket: '' - # @section Strategy settings - - # @param ui.strategy.type Type of Kubernetes deployment. Can be `Recreate` or `RollingUpdate`. - # @param ui.strategy.rollingUpdate.maxUnavailable Maximum number of pods that can be created over the desired number of pods when doing [rolling update](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#rolling-update-deployment). - # @param ui.strategy.rollingUpdate.maxSurge Maximum number of pods that can be unavailable during the [rolling update](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#rolling-update-deployment) process. - - strategy: - type: RollingUpdate - rollingUpdate: - maxUnavailable: 0 - maxSurge: 1 +# @section Service settings - # @section Service settings +# @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.port Service port. +# @param service.targetPort Service target port. - # @param ui.service.annotations Kubernetes [service annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/). - # @param ui.service.labels Kubernetes [service labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/). - # @param ui.service.type Kubernetes [service type](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types). - # @param ui.service.port Service port. - # @param ui.service.targetPort Service target port. - - service: - annotations: {} - labels: {} - type: ClusterIP - port: 3000 - targetPort: http - - # @section Kubernetes [Ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/) settings - - # @param ui.ingress.enabled If Ingress is enabled for the service. - # @param ui.ingress.className Name of the Ingress controller class. - # @param ui.ingress.hosts[0].host Hostname for the Ingress service. - # @param ui.ingress.hosts[0].paths[0].path Path of the host for the Ingress service. - # @param ui.ingress.hosts[0].paths[0].pathType Type of the path for the Ingress service. - # @param ui.ingress.tls TLS configuration - - ingress: - enabled: false - className: nginx - hosts: +service: + annotations: {} + labels: {} + type: ClusterIP + port: 3000 + targetPort: http + +# @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.tls TLS configuration + +ingress: + enabled: false + className: nginx + hosts: - host: pro-ui.example.com paths: - - path: / - pathType: Prefix - tls: [] - # - hosts: - # - pro-ui.example.com - # secretName: secret.tls - - # @section Limits - - # @param ui.resources.requests.cpu A CPU request. - # @param ui.resources.requests.memory A memory request. - # @param ui.resources.limits.cpu A CPU limit. - # @param ui.resources.limits.memory A memory limit. - - resources: - requests: - cpu: 300m - memory: 256Mi - limits: - cpu: 1 - memory: 384Mi - - # @section Autoscaling configuration - - # @param ui.hpa.enabled Enable hpa for PRO UI - # @param ui.hpa.minReplicas Minimum number of PRO UI replicas - # @param ui.hpa.maxReplicas Maximum number of PRO UI replicas - # @param ui.hpa.targetCPU Target CPU utilization percentage - # @param ui.hpa.targetMemory Target Memory utilization percentage - hpa: - enabled: false - minReplicas: 2 - maxReplicas: 5 - targetCPU: 100 - targetMemory: '' + - path: / + pathType: Prefix + tls: [] + # - hosts: + # - pro-ui.example.com + # secretName: secret.tls + +# @section Limits + +# @param resources.requests.cpu A CPU request. +# @param resources.requests.memory A memory request. +# @param resources.limits.cpu A CPU limit. +# @param resources.limits.memory A memory limit. + +resources: + requests: + cpu: 300m + memory: 256Mi + limits: + cpu: 1 + memory: 384Mi + +# @section Autoscaling configuration + +# @param hpa.enabled Enable hpa for PRO UI +# @param hpa.minReplicas Minimum number of PRO UI replicas +# @param hpa.maxReplicas Maximum number of PRO UI replicas +# @param hpa.targetCPU Target CPU utilization percentage +# @param hpa.targetMemory Target Memory utilization percentage +hpa: + enabled: false + minReplicas: 2 + maxReplicas: 5 + targetCPU: 100 + targetMemory: '' # @section Artifacts Storage settings @@ -292,7 +292,7 @@ stylesImporter: name: styles-importer image: repository: 2gis-on-premise/pro-importer - tag: 1.22.0 + tag: 1.35.0 backoffLimit: 2 successfulJobsHistoryLimit: 3 nodeSelector: {} @@ -305,3 +305,4 @@ stylesImporter: memory: 8Gi maxParallelJobs: 1 startOnDeploy: false + From 6135f8a2e24e51b00d91ac5f84137a46f103aaa6 Mon Sep 17 00:00:00 2001 From: aveldin Date: Thu, 22 Aug 2024 13:36:31 +0700 Subject: [PATCH 3/6] add new version PRO UI --- charts/pro-ui/README.md | 160 ++++++++++++++++++++-------------------- 1 file changed, 80 insertions(+), 80 deletions(-) diff --git a/charts/pro-ui/README.md b/charts/pro-ui/README.md index 89f81ec07..d34fb7651 100644 --- a/charts/pro-ui/README.md +++ b/charts/pro-ui/README.md @@ -16,55 +16,63 @@ Use this Helm chart to deploy 2GIS Pro UI service, which is a part of 2GIS's [On | `imagePullPolicy` | Pull Policy | `IfNotPresent` | | `imagePullSecrets` | Kubernetes image pull secrets. | `[]` | -### Common settings - -| Name | Description | Value | -| ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- | -| `ui.replicas` | A replica count for the pod. | `1` | -| `ui.revisionHistoryLimit` | Revision history limit (used for [rolling back](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) a deployment). | `3` | -| `ui.terminationGracePeriodSeconds` | Seconds pod needs to [terminate](https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods) gracefully | `60` | -| `ui.nodeSelector` | Kubernetes [node selectors](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector). | `{}` | -| `ui.affinity` | Kubernetes pod [affinity settings](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity). | `{}` | -| `ui.tolerations` | Kubernetes [tolerations](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) settings. | `[]` | -| `ui.podAnnotations` | Kubernetes [pod annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/). | `{}` | -| `ui.podLabels` | Kubernetes [pod labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/). | `{}` | -| `ui.annotations` | Kubernetes [annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/). | `{}` | -| `ui.labels` | Kubernetes [labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/). | `{}` | -| `ui.readinessProbe.enabled` | Enable [readinessProbe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes) on PRO UI containers | `true` | -| `ui.livenessProbe.enabled` | Enable [livenessProbe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes) on PRO UI containers | `false` | -| `ui.healthcheckPath` | Application http path for health check | `/api/healthcheck/app` | -| `ui.containerPort` | Port on which application listen connection in container | `3000` | +### Strategy settings + +| Name | Description | Value | +| --------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- | +| `strategy.type` | Type of Kubernetes deployment. Can be `Recreate` or `RollingUpdate`. | `RollingUpdate` | +| `strategy.rollingUpdate.maxUnavailable` | Maximum number of pods that can be created over the desired number of pods when doing [rolling update](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#rolling-update-deployment). | `0` | +| `strategy.rollingUpdate.maxSurge` | Maximum number of pods that can be unavailable during the [rolling update](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#rolling-update-deployment) process. | `1` | ### Deployment settings -| Name | Description | Value | -| --------------------- | ----------- | ------------------------ | -| `ui.image.repository` | Repository | `2gis-on-premise/pro-ui` | -| `ui.image.tag` | Tag | `2.15.1` | +| Name | Description | Value | +| ------------------ | ----------- | ------------------------ | +| `image.repository` | Repository | `2gis-on-premise/pro-ui` | +| `image.tag` | Tag | `2.15.1` | + +### Common deployment settings + +| Name | Description | Value | +| ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | +| `replicas` | A replica count for the pod. | `1` | +| `revisionHistoryLimit` | Revision history limit (used for [rolling back](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) a deployment). | `3` | +| `terminationGracePeriodSeconds` | Seconds pod needs to [terminate](https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods) gracefully | `60` | +| `nodeSelector` | Kubernetes [node selectors](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector). | `{}` | +| `affinity` | Kubernetes pod [affinity settings](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity). | `{}` | +| `tolerations` | Kubernetes [tolerations](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) settings. | `[]` | +| `podAnnotations` | Kubernetes [pod annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/). | `{}` | +| `podLabels` | Kubernetes [pod labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/). | `{}` | +| `annotations` | Kubernetes [annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/). | `{}` | +| `labels` | Kubernetes [labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/). | `{}` | +| `readinessProbe.enabled` | Enable [readinessProbe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes) on PRO UI containers | `true` | +| `livenessProbe.enabled` | Enable [livenessProbe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes) on PRO UI containers | `false` | +| `containerPort` | Port on which application listen connection in container | `3000` | ### UI service settings -| Name | Description | Value | -| ----------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- | -| `ui.appTheme` | Branding inside the app. Possible values: `"2gis"` or `"urbi"`. | `urbi` | -| `ui.appLocale` | Language in the app. Possible values: `"ar_AE"`, `"en_AE"` or `"ru_RU"`. | `en_AE` | -| `ui.appInitialMapCenter` | Default map coordinates, it contains of two numbers in an array: [lng, lat] (e.g., [55.27, 25.2] stands for Dubai, [37.64, 55.74] — for Moscow). | `[46.71, 24.72]` | -| `ui.supportDocumentationLink` | Product online documentation link. Ex.: 'https://docs.urbi.ae/en/pro/start' or 'https://docs.2gis.com/ru/pro/start' | `""` | -| `ui.immersiveModels` | A string value for config to enabling 3D-models. Possible values: [{"id":4,"name":"Ground","mapOptions":{"center":[53.287567,23.564967],"styleZoom":19.2,"pitch":45,"rotation":0},"objects":[{"buildingIds":[],"coords":[53.284762,23.569323],"scale":90,"rotateX":0.5,"rotateY":0,"moveX":0,"moveY":0,"moveZ":0,"models":[{"path":"/static/models/adnoc/ground.glb","name":"Ground","displayName":"Ground"}]}]}] | `""` | -| `ui.publicS3Url` | Optional URL of public S3 where style data will be placed. Example: https://s3.domain.example.com/ | `""` | -| `ui.auth.sso` | Flag to turn on/off the authorization. Possible values: `"true"` or `"false"`. | `false` | -| `ui.auth.secure` | Flag to turn on/off the https for auth. Possible values: `"true"` or `"false"`. | `true` | -| `ui.auth.safeHosts` | a string with regExp, which checks incoming authCodeUrl | `.*` | -| `ui.auth.codeUrl` | an URL, which is used to exchange code to token: host/api/auth/code | `""` | -| `ui.auth.clientId` | a client_id from keycloack | `""` | -| `ui.auth.clientSecret` | a client_secret from keycloack | `""` | -| `ui.auth.oAuthProvider` | a provider name. Possible values: "keycloak" | "ugc" | "openid" | `keycloak` | -| `ui.auth.oAuthScopes` | scopes for openid connect. Possible values: | `""` | -| `ui.auth.identityProviderUrl` | a provider base URL | `""` | -| `ui.auth.oAuthApiUrl` | an oAuth provider base URL | `""` | -| `ui.auth.userDataApiUrl` | an user data provider URL | `""` | -| `ui.auth.turnOffCertValidation` | Flag to turn off certificate validation. Possible values: `"true"` or `"false"`. | `false` | -| `ui.auth.openIdWellKnownUrlListUrl` | URL to OpenID Connect Discovery data | `""` | +| Name | Description | Value | +| ----------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- | +| `ui.healthcheckPath` | Application http path for health check | `/api/healthcheck/app` | +| `ui.appTheme` | Branding inside the app. Possible values: `"2gis"` or `"urbi"`. | `urbi` | +| `ui.appLocale` | Language in the app. Possible values: `"ar_AE"`, `"en_AE"` or `"ru_RU"`. | `en_AE` | +| `ui.appInitialMapCenter` | Default map coordinates, it contains of two numbers in an array: [lng, lat] (e.g., [55.27, 25.2] stands for Dubai, [37.64, 55.74] — for Moscow). | `[46.71, 24.72]` | +| `ui.supportDocumentationLink` | Product online documentation link. Ex.: 'https://docs.urbi.ae/en/pro/start', 'https://docs.2gis.com/ru/pro/start' | `""` | +| `ui.immersiveModels` | A string value for config to enabling 3D-models. Possible values: [{"id":4,"name":"Ground","mapOptions":{"center":[53.287567,23.564967],"styleZoom":19.2,"pitch":45,"rotation":0},"objects":[{"buildingIds":[],"coords":[53.284762,23.569323],"scale":90,"rotateX":0.5,"rotateY":0,"moveX":0,"moveY":0,"moveZ":0,"models":[{"path":"/static/models/adnoc/ground.glb","name":"Ground","displayName":"Ground"}]}]}] | `""` | +| `ui.publicS3Url` | Optional URL of public S3 where style data will be placed. Example: https://s3.domain.example.com/ | `""` | +| `ui.auth.sso` | Flag to turn on/off the authorization. Possible values: `"true"` or `"false"`. | `false` | +| `ui.auth.secure` | Flag to turn on/off the https for auth. Possible values: `"true"` or `"false"`. | `true` | +| `ui.auth.safeHosts` | a string with regExp, which checks incoming authCodeUrl | `.*` | +| `ui.auth.codeUrl` | an URL, which is used to exchange code to token: host/api/auth/code | `""` | +| `ui.auth.clientId` | a client_id from keycloack | `""` | +| `ui.auth.clientSecret` | a client_secret from keycloack | `""` | +| `ui.auth.oAuthProvider` | a provider name. Possible values: "keycloak" | "ugc" | "openid" | `keycloak` | +| `ui.auth.oAuthScopes` | scopes for openid connect. Possible values: | `""` | +| `ui.auth.identityProviderUrl` | a provider base URL | `""` | +| `ui.auth.oAuthApiUrl` | an oAuth provider base URL | `""` | +| `ui.auth.userDataApiUrl` | an user data provider URL | `""` | +| `ui.auth.turnOffCertValidation` | Flag to turn off certificate validation. Possible values: `"true"` or `"false"`. | `false` | +| `ui.auth.openIdWellKnownUrlListUrl` | URL to OpenID Connect Discovery data | `""` | ### 2GIS Pro API settings @@ -112,53 +120,45 @@ Use this Helm chart to deploy 2GIS Pro UI service, which is a part of 2GIS's [On | `ui.whiteLabel.configUrl` | Optional URL for whitelabel config file | `""` | | `ui.whiteLabel.s3Bucket` | Optional S3 bucket name for whitelabel files. Bucket must be public. If set with ui.publicS3Url all relative URL in config will be replaced to ui.publicS3Url + ui.whiteLabel.s3Bucket + originalURL | `""` | -### Strategy settings - -| Name | Description | Value | -| ------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- | -| `ui.strategy.type` | Type of Kubernetes deployment. Can be `Recreate` or `RollingUpdate`. | `RollingUpdate` | -| `ui.strategy.rollingUpdate.maxUnavailable` | Maximum number of pods that can be created over the desired number of pods when doing [rolling update](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#rolling-update-deployment). | `0` | -| `ui.strategy.rollingUpdate.maxSurge` | Maximum number of pods that can be unavailable during the [rolling update](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#rolling-update-deployment) process. | `1` | - ### Service settings -| Name | Description | Value | -| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ----------- | -| `ui.service.annotations` | Kubernetes [service annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/). | `{}` | -| `ui.service.labels` | Kubernetes [service labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/). | `{}` | -| `ui.service.type` | Kubernetes [service type](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types). | `ClusterIP` | -| `ui.service.port` | Service port. | `3000` | -| `ui.service.targetPort` | Service target port. | `http` | +| Name | Description | Value | +| --------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ----------- | +| `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/). | `{}` | +| `service.type` | Kubernetes [service type](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types). | `ClusterIP` | +| `service.port` | Service port. | `3000` | +| `service.targetPort` | Service target port. | `http` | ### Kubernetes [Ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/) settings -| Name | Description | Value | -| --------------------------------------- | ----------------------------------------- | -------------------- | -| `ui.ingress.enabled` | If Ingress is enabled for the service. | `false` | -| `ui.ingress.className` | Name of the Ingress controller class. | `nginx` | -| `ui.ingress.hosts[0].host` | Hostname for the Ingress service. | `pro-ui.example.com` | -| `ui.ingress.hosts[0].paths[0].path` | Path of the host for the Ingress service. | `/` | -| `ui.ingress.hosts[0].paths[0].pathType` | Type of the path for the Ingress service. | `Prefix` | -| `ui.ingress.tls` | TLS configuration | `[]` | +| 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. | `pro-ui.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 | -| ------------------------------ | ----------------- | ------- | -| `ui.resources.requests.cpu` | A CPU request. | `300m` | -| `ui.resources.requests.memory` | A memory request. | `256Mi` | -| `ui.resources.limits.cpu` | A CPU limit. | `1` | -| `ui.resources.limits.memory` | A memory limit. | `384Mi` | +| Name | Description | Value | +| --------------------------- | ----------------- | ------- | +| `resources.requests.cpu` | A CPU request. | `300m` | +| `resources.requests.memory` | A memory request. | `256Mi` | +| `resources.limits.cpu` | A CPU limit. | `1` | +| `resources.limits.memory` | A memory limit. | `384Mi` | ### Autoscaling configuration -| Name | Description | Value | -| --------------------- | ------------------------------------ | ------- | -| `ui.hpa.enabled` | Enable hpa for PRO UI | `false` | -| `ui.hpa.minReplicas` | Minimum number of PRO UI replicas | `2` | -| `ui.hpa.maxReplicas` | Maximum number of PRO UI replicas | `5` | -| `ui.hpa.targetCPU` | Target CPU utilization percentage | `100` | -| `ui.hpa.targetMemory` | Target Memory utilization percentage | `""` | +| Name | Description | Value | +| ------------------ | ------------------------------------ | ------- | +| `hpa.enabled` | Enable hpa for PRO UI | `false` | +| `hpa.minReplicas` | Minimum number of PRO UI replicas | `2` | +| `hpa.maxReplicas` | Maximum number of PRO UI replicas | `5` | +| `hpa.targetCPU` | Target CPU utilization percentage | `100` | +| `hpa.targetMemory` | Target Memory utilization percentage | `""` | ### Artifacts Storage settings @@ -179,7 +179,7 @@ Use this Helm chart to deploy 2GIS Pro UI service, which is a part of 2GIS's [On | ------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ | | `stylesImporter.name` | Styles Import job name. | `styles-importer` | | `stylesImporter.image.repository` | Docker Repository Image. | `2gis-on-premise/pro-importer` | -| `stylesImporter.image.tag` | Docker image tag. | `1.22.0` | +| `stylesImporter.image.tag` | Docker image tag. | `1.35.0` | | `stylesImporter.backoffLimit` | The number of [retries](https://kubernetes.io/docs/concepts/workloads/controllers/job/#pod-backoff-failure-policy) before considering a Job as failed. | `2` | | `stylesImporter.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` | | `stylesImporter.nodeSelector` | Kubernetes [node selectors](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector). | `{}` | From 8fcf24093823681144fef4d9ed96451388925a5c Mon Sep 17 00:00:00 2001 From: aveldin Date: Thu, 22 Aug 2024 13:40:37 +0700 Subject: [PATCH 4/6] =?UTF-8?q?=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B8=20?= =?UTF-8?q?=D0=BF=D0=BE=20=D0=BB=D0=B8=D0=BD=D1=82=D0=B5=D1=80=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- charts/pro-ui/values.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/charts/pro-ui/values.yaml b/charts/pro-ui/values.yaml index cd6afd1df..9b7d3a423 100644 --- a/charts/pro-ui/values.yaml +++ b/charts/pro-ui/values.yaml @@ -305,4 +305,3 @@ stylesImporter: memory: 8Gi maxParallelJobs: 1 startOnDeploy: false - From 775e28cb10f19de42d0a28b4cb384e767b1cafd3 Mon Sep 17 00:00:00 2001 From: aveldin Date: Thu, 22 Aug 2024 13:40:37 +0700 Subject: [PATCH 5/6] =?UTF-8?q?=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B8=20?= =?UTF-8?q?=D0=BF=D0=BE=20=D0=BB=D0=B8=D0=BD=D1=82=D0=B5=D1=80=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- charts/pro-api/values.yaml | 4 ++-- charts/pro-ui/README.md | 2 +- charts/pro-ui/values.yaml | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/charts/pro-api/values.yaml b/charts/pro-api/values.yaml index 839e14676..b4ff4318c 100644 --- a/charts/pro-api/values.yaml +++ b/charts/pro-api/values.yaml @@ -148,7 +148,7 @@ s3: # @section 2GIS PRO API configuration -# @param api.serviceAccount Kubernetes service account +# @param api.serviceAccount Kubernetes service account # @param api.serviceAccountOverride The name of an existing custom service account. If specified, the services in the chart will use this existing service account. If not specified, a new service account will be created and used with the name from the variable `api.serviceAccount`. # @param api.tempPath Path to directory used for temp data # @param api.allowAnyOrigin Cors policy: allow any origin to perform requests to pro-api service @@ -378,7 +378,7 @@ permissionsPodSettings: resources: requests: cpu: 300m - memory: 256M + memory: 512M limits: cpu: 1 memory: 1G diff --git a/charts/pro-ui/README.md b/charts/pro-ui/README.md index d34fb7651..47b3c7a8c 100644 --- a/charts/pro-ui/README.md +++ b/charts/pro-ui/README.md @@ -29,7 +29,7 @@ Use this Helm chart to deploy 2GIS Pro UI service, which is a part of 2GIS's [On | Name | Description | Value | | ------------------ | ----------- | ------------------------ | | `image.repository` | Repository | `2gis-on-premise/pro-ui` | -| `image.tag` | Tag | `2.15.1` | +| `image.tag` | Tag | `2.27.0` | ### Common deployment settings diff --git a/charts/pro-ui/values.yaml b/charts/pro-ui/values.yaml index cd6afd1df..86f09b295 100644 --- a/charts/pro-ui/values.yaml +++ b/charts/pro-ui/values.yaml @@ -27,7 +27,7 @@ strategy: # @param image.tag Tag image: repository: 2gis-on-premise/pro-ui - tag: 2.15.1 + tag: 2.27.0 # @section Common deployment settings @@ -305,4 +305,3 @@ stylesImporter: memory: 8Gi maxParallelJobs: 1 startOnDeploy: false - From cb25d462c83bed7dbb17ef6f8f1d287d617108bc Mon Sep 17 00:00:00 2001 From: aveldin Date: Wed, 28 Aug 2024 10:07:47 +0300 Subject: [PATCH 6/6] =?UTF-8?q?=D0=9F=D1=80=D0=B0=D0=B2=D0=BA=D0=B8=20Brea?= =?UTF-8?q?king-Changes.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Breaking-Changes.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Breaking-Changes.md b/Breaking-Changes.md index ea9465ac0..d62beda9f 100644 --- a/Breaking-Changes.md +++ b/Breaking-Changes.md @@ -1,5 +1,29 @@ # 2GIS On-Premise Breaking-Changes +## [1.27.0] + +### PRO +- ui.strategy renamed to strategy +- ui.image renamed to image +- ui.replicas renamed to replicas +- ui.revisionHistoryLimit renamed to revisionHistoryLimit +- ui.terminationGracePeriodSeconds renamed to terminationGracePeriodSeconds +- ui.nodeSelector renamed to nodeSelector +- ui.affinity renamed to affinity +- ui.tolerations renamed to tolerations +- ui.podAnnotations renamed to podAnnotations +- ui.podLabels renamed to podLabels +- ui.annotations renamed to annotations +- ui.labels renamed to labels +- ui.readinessProbe renamed to readinessProbe +- ui.livenessProbe renamed to livenessProbe +- ui.containerPort renamed to containerPort +- ui.service renamed to service +- ui.ingress renamed to ingress +- ui.resources renamed to resources +- ui.hpa renamed to hpa + + ## [1.26.0] ### citylens