Skip to content

Commit

Permalink
Add support for regions.customValues for use in helm templates
Browse files Browse the repository at this point in the history
This feature was introduced in onyxia-api in PR 298 (  InseeFrLab/onyxia-api#298).
Values from backend (regions.json -> services.customValues) are available to use in helm templates as region.customValues
  • Loading branch information
johnksv committed Dec 16, 2023
1 parent 46fb3b3 commit 35748a8
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions web/src/core/adapters/onyxiaApi/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export function createOnyxiaApi(params: {
id: string;
services: {
allowedURIPattern: string;
customValues?: object;
expose: {
domain: string;
ingressClassName: string;
Expand Down Expand Up @@ -319,6 +320,7 @@ export function createOnyxiaApi(params: {
region.packageRepositoryInjection,
"certificateAuthorityInjection":
region.certificateAuthorityInjection,
"customValues": region.services.customValues,
"kubernetes": (() => {
const { k8sPublicEndpoint } = region.services;
return k8sPublicEndpoint?.URL === undefined
Expand Down
1 change: 1 addition & 0 deletions web/src/core/adapters/onyxiaApi/mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export const onyxiaApi: OnyxiaApi = {
"ingress": true,
"route": undefined,
"istio": undefined,
"customValues": undefined,
"initScriptUrl":
"https://InseeFrLab.github.io/onyxia/onyxia-init.sh",
"s3": undefined,
Expand Down
1 change: 1 addition & 0 deletions web/src/core/ports/OnyxiaApi/DeploymentRegion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export type DeploymentRegion = {
ingressClassName: string | undefined;
ingress: boolean | undefined;
route: boolean | undefined;
customValues: object | undefined;
istio:
| {
enabled: boolean;
Expand Down
1 change: 1 addition & 0 deletions web/src/core/ports/OnyxiaApi/XOnyxia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export type XOnyxiaContext = {
defaultIpProtection: boolean | undefined;
defaultNetworkPolicy: boolean | undefined;
allowedURIPattern: string;
customValues: object | undefined;
kafka:
| {
url: string;
Expand Down
1 change: 1 addition & 0 deletions web/src/core/usecases/launcher/thunks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ export const thunks = {
"defaultNetworkPolicy": region.defaultNetworkPolicy,
"allowedURIPattern":
region.allowedURIPatternForUserDefinedInitScript,
"customValues": region.customValues,
"kafka": region.kafka,
"from": region.from,
"tolerations": region.tolerations,
Expand Down

0 comments on commit 35748a8

Please sign in to comment.