Skip to content

Commit

Permalink
[CITYLENS-470] Add b2b auth
Browse files Browse the repository at this point in the history
  • Loading branch information
xalvaine committed Jan 14, 2025
1 parent a875915 commit 01f8d43
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 9 deletions.
19 changes: 11 additions & 8 deletions charts/citylens-routes-ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,17 @@

### Environment

| Name | Description | Value |
| ----------------------------- | --------------------------------------------------- | ----- |
| `env.CATALOG_API_URL` | Catalog API base URL **Required** | `""` |
| `env.MAPGL_API_URL` | Map API base URL **Required** | `""` |
| `env.MAPGL_COPYRIGHT_VARIANT` | Copyright variant, can be '2gis', 'urbi' or empty | `""` |
| `env.MAPGL_KEY` | API key for mapgl **Required** | `""` |
| `env.MAPGL_STYLE_ID` | Map style ID | `""` |
| `env.ROUTES_API_URL` | Backend (citylens-routes-api) base URL **Required** | `""` |
| Name | Description | Value |
| ------------------------------------ | ---------------------------------------------------------- | ----- |
| `env.CATALOG_API_URL` | Catalog API base URL **Required** | `""` |
| `env.MAPGL_API_URL` | Map API base URL **Required** | `""` |
| `env.MAPGL_COPYRIGHT_VARIANT` | Copyright variant, can be '2gis', 'urbi' or empty | `""` |
| `env.MAPGL_KEY` | API key for mapgl **Required** | `""` |
| `env.MAPGL_STYLE_ID` | Map style ID | `""` |
| `env.PLATFORM_MANAGER_API_URL` | Platform manager API base URL **Required** | `""` |
| `env.PLATFORM_MANAGER_CLIENT_ID` | OpenID client identifier for Platform manager **Required** | `""` |
| `env.PLATFORM_MANAGER_CLIENT_SECRET` | OpenID client identifier for Platform manager **Required** | `""` |
| `env.ROUTES_API_URL` | Backend (citylens-routes-api) base URL **Required** | `""` |

### Common deployment settings

Expand Down
9 changes: 9 additions & 0 deletions charts/citylens-routes-ui/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,22 @@ spec:
value: {{ .Values.env.MAPGL_COPYRIGHT_VARIANT | quote }}
- name: MAPGL_STYLE_ID
value: {{ .Values.env.MAPGL_STYLE_ID | quote }}
- name: PLATFORM_MANAGER_API_URL
value: {{ .Values.env.PLATFORM_MANAGER_API_URL | quote }}
- name: PLATFORM_MANAGER_CLIENT_ID
value: {{ .Values.env.PLATFORM_MANAGER_CLIENT_ID | quote }}
- name: ROUTES_API_URL
value: {{ required "A valid .Values.env.ROUTES_API_URL entry required" .Values.env.ROUTES_API_URL | quote }}
- name: MAPGL_KEY
valueFrom:
secretKeyRef:
key: MAPGL_KEY
name: {{ include "citylens-ui.name" . }}-secret
- name: PLATFORM_MANAGER_CLIENT_SECRET
valueFrom:
secretKeyRef:
key: PLATFORM_MANAGER_CLIENT_SECRET
name: {{ include "citylens-ui.name" . }}-secret
{{- if .Values.readinessProbe.enabled }}
readinessProbe:
httpGet:
Expand Down
1 change: 1 addition & 0 deletions charts/citylens-routes-ui/templates/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ metadata:
type: Opaque
data:
MAPGL_KEY: {{ required "Valid .Values.env.MAPGL_KEY required!" .Values.env.MAPGL_KEY | b64enc }}
PLATFORM_MANAGER_CLIENT_SECRET: {{ required "Valid .Values.env.PLATFORM_MANAGER_CLIENT_SECRET required!" .Values.env.PLATFORM_MANAGER_CLIENT_SECRET | b64enc }}
8 changes: 7 additions & 1 deletion charts/citylens-routes-ui/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ strategy:
# @param image.tag Tag
image:
repository: 2gis-on-premise/citylens-routes-ui
tag: latest
tag: 0.0.15

# @section Environment

Expand All @@ -34,13 +34,19 @@ image:
# @param env.MAPGL_COPYRIGHT_VARIANT Copyright variant, can be '2gis', 'urbi' or empty
# @param env.MAPGL_KEY API key for mapgl **Required**
# @param env.MAPGL_STYLE_ID Map style ID
# @param env.PLATFORM_MANAGER_API_URL Platform manager API base URL **Required**
# @param env.PLATFORM_MANAGER_CLIENT_ID OpenID client identifier for Platform manager **Required**
# @param env.PLATFORM_MANAGER_CLIENT_SECRET OpenID client identifier for Platform manager **Required**
# @param env.ROUTES_API_URL Backend (citylens-routes-api) base URL **Required**
env:
CATALOG_API_URL: ''
MAPGL_API_URL: ''
MAPGL_COPYRIGHT_VARIANT: ''
MAPGL_KEY: ''
MAPGL_STYLE_ID: ''
PLATFORM_MANAGER_API_URL: ''
PLATFORM_MANAGER_CLIENT_ID: ''
PLATFORM_MANAGER_CLIENT_SECRET: ''
ROUTES_API_URL: ''

# @section Common deployment settings
Expand Down

0 comments on commit 01f8d43

Please sign in to comment.