-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fc54e6a
commit bc50fab
Showing
2 changed files
with
162 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,169 +1,175 @@ | ||
apiVersion: radix.equinor.com/v1 | ||
kind: RadixApplication | ||
metadata: | ||
name: webviz | ||
name: webviz | ||
spec: | ||
environments: | ||
- name: prod | ||
build: | ||
from: main | ||
- name: review | ||
build: | ||
from: review | ||
environments: | ||
- name: prod | ||
build: | ||
from: main | ||
- name: review | ||
build: | ||
from: review | ||
|
||
components: | ||
- name: frontend | ||
dockerFileName: frontend-prod.Dockerfile | ||
publicPort: http | ||
ports: | ||
- name: http | ||
port: 8080 | ||
components: | ||
- name: frontend | ||
dockerFileName: frontend-prod.Dockerfile | ||
publicPort: http | ||
ports: | ||
- name: http | ||
port: 8080 | ||
ingressConfiguration: | ||
- websocketfriendly | ||
|
||
- name: backend-primary | ||
dockerFileName: backend.Dockerfile | ||
ports: | ||
- name: http | ||
port: 5000 | ||
secretRefs: | ||
azureKeyVaults: | ||
- name: webviz | ||
items: | ||
- name: WEBVIZ-CLIENT-SECRET | ||
envVar: WEBVIZ_CLIENT_SECRET | ||
- name: WEBVIZ-SMDA-RESOURCE-SCOPE | ||
envVar: WEBVIZ_SMDA_RESOURCE_SCOPE | ||
- name: WEBVIZ-SMDA-SUBSCRIPTION-KEY | ||
envVar: WEBVIZ_SMDA_SUBSCRIPTION_KEY | ||
variables: | ||
UVICORN_PORT: 5000 | ||
UVICORN_ENTRYPOINT: src.backend.primary.main:app | ||
environmentConfig: | ||
- environment: prod | ||
- name: backend-primary | ||
dockerFileName: backend.Dockerfile | ||
ports: | ||
- name: http | ||
port: 5000 | ||
ingressConfiguration: | ||
- websocketfriendly | ||
secretRefs: | ||
azureKeyVaults: | ||
- name: webviz | ||
items: | ||
- name: WEBVIZ-INSIGHTS-CONNECTIONSTRING-PROD | ||
envVar: APPLICATIONINSIGHTS_CONNECTION_STRING | ||
azureKeyVaults: | ||
- name: webviz | ||
items: | ||
- name: WEBVIZ-CLIENT-SECRET | ||
envVar: WEBVIZ_CLIENT_SECRET | ||
- name: WEBVIZ-SMDA-RESOURCE-SCOPE | ||
envVar: WEBVIZ_SMDA_RESOURCE_SCOPE | ||
- name: WEBVIZ-SMDA-SUBSCRIPTION-KEY | ||
envVar: WEBVIZ_SMDA_SUBSCRIPTION_KEY | ||
variables: | ||
OTEL_RESOURCE_ATTRIBUTES: service.name=primary-backend, service.namespace=prod, service.version=tbd0.1.2 | ||
resources: | ||
requests: | ||
memory: 8Gi | ||
cpu: 1000m | ||
limits: | ||
# Memory limit=request and cpu limit omitted on purpose | ||
memory: 8Gi | ||
horizontalScaling: | ||
minReplicas: 2 | ||
maxReplicas: 4 | ||
resources: | ||
memory: | ||
averageUtilization: 60 | ||
cpu: | ||
averageUtilization: 80 | ||
- environment: review | ||
secretRefs: | ||
azureKeyVaults: | ||
- name: webviz | ||
items: | ||
- name: WEBVIZ-INSIGHTS-CONNECTIONSTRING-REVIEW | ||
envVar: APPLICATIONINSIGHTS_CONNECTION_STRING | ||
variables: | ||
OTEL_RESOURCE_ATTRIBUTES: service.name=primary-backend, service.namespace=review, service.version=tbd0.1.2 | ||
resources: | ||
requests: | ||
memory: 4Gi | ||
cpu: 500m | ||
limits: | ||
memory: 4Gi | ||
horizontalScaling: | ||
minReplicas: 1 | ||
maxReplicas: 3 | ||
resources: | ||
memory: | ||
averageUtilization: 60 | ||
cpu: | ||
averageUtilization: 80 | ||
|
||
- name: redis-user-session | ||
image: bitnami/redis:6.2.10@sha256:bd42fcdab5959ce2b21b6ea8410d4b3ee87ecb2e320260326ec731ecfcffbd0e | ||
ports: | ||
- name: http | ||
port: 6379 | ||
variables: | ||
ALLOW_EMPTY_PASSWORD: yes | ||
UVICORN_PORT: 5000 | ||
UVICORN_ENTRYPOINT: src.backend.primary.main:app | ||
environmentConfig: | ||
- environment: prod | ||
secretRefs: | ||
azureKeyVaults: | ||
- name: webviz | ||
items: | ||
- name: WEBVIZ-INSIGHTS-CONNECTIONSTRING-PROD | ||
envVar: APPLICATIONINSIGHTS_CONNECTION_STRING | ||
variables: | ||
OTEL_RESOURCE_ATTRIBUTES: service.name=primary-backend, service.namespace=prod, service.version=tbd0.1.2 | ||
resources: | ||
requests: | ||
memory: 8Gi | ||
cpu: 1000m | ||
limits: | ||
# Memory limit=request and cpu limit omitted on purpose | ||
memory: 8Gi | ||
horizontalScaling: | ||
minReplicas: 2 | ||
maxReplicas: 4 | ||
resources: | ||
memory: | ||
averageUtilization: 60 | ||
cpu: | ||
averageUtilization: 80 | ||
- environment: review | ||
secretRefs: | ||
azureKeyVaults: | ||
- name: webviz | ||
items: | ||
- name: WEBVIZ-INSIGHTS-CONNECTIONSTRING-REVIEW | ||
envVar: APPLICATIONINSIGHTS_CONNECTION_STRING | ||
variables: | ||
OTEL_RESOURCE_ATTRIBUTES: service.name=primary-backend, service.namespace=review, service.version=tbd0.1.2 | ||
resources: | ||
requests: | ||
memory: 4Gi | ||
cpu: 500m | ||
limits: | ||
memory: 4Gi | ||
horizontalScaling: | ||
minReplicas: 1 | ||
maxReplicas: 3 | ||
resources: | ||
memory: | ||
averageUtilization: 60 | ||
cpu: | ||
averageUtilization: 80 | ||
|
||
- name: redis-cache | ||
image: bitnami/redis:6.2.10@sha256:bd42fcdab5959ce2b21b6ea8410d4b3ee87ecb2e320260326ec731ecfcffbd0e | ||
ports: | ||
- name: http | ||
port: 6379 | ||
variables: | ||
ALLOW_EMPTY_PASSWORD: yes | ||
# https://redis.io/docs/management/config/#configuring-redis-as-a-cache | ||
# maxmemory for redis must be aligned with component's requested memory, here 1gb vs 2gb | ||
REDIS_EXTRA_FLAGS: --maxmemory 1gb --maxmemory-policy allkeys-lru --save '' --appendonly no --loglevel verbose | ||
resources: | ||
requests: | ||
memory: 2Gi | ||
cpu: 200m | ||
limits: | ||
memory: 2Gi | ||
- name: redis-user-session | ||
image: bitnami/redis:6.2.10@sha256:bd42fcdab5959ce2b21b6ea8410d4b3ee87ecb2e320260326ec731ecfcffbd0e | ||
ports: | ||
- name: http | ||
port: 6379 | ||
variables: | ||
ALLOW_EMPTY_PASSWORD: yes | ||
|
||
jobs: | ||
- name: backend-user-session | ||
dockerFileName: backend.Dockerfile | ||
schedulerPort: 8000 | ||
ports: | ||
- name: http | ||
port: 8000 | ||
secretRefs: | ||
azureKeyVaults: | ||
- name: webviz | ||
items: | ||
- name: WEBVIZ-CLIENT-SECRET | ||
envVar: WEBVIZ_CLIENT_SECRET | ||
- name: WEBVIZ-SMDA-RESOURCE-SCOPE | ||
envVar: WEBVIZ_SMDA_RESOURCE_SCOPE | ||
- name: WEBVIZ-SMDA-SUBSCRIPTION-KEY | ||
envVar: WEBVIZ_SMDA_SUBSCRIPTION_KEY | ||
variables: | ||
UVICORN_PORT: 8000 | ||
UVICORN_ENTRYPOINT: src.backend.user_session.main:app | ||
environmentConfig: | ||
# As of October 2023 in radix, these settings need to be duplicated for both environments. | ||
- environment: prod | ||
secretRefs: | ||
azureKeyVaults: | ||
- name: webviz | ||
items: | ||
- name: WEBVIZ-INSIGHTS-CONNECTIONSTRING-PROD | ||
envVar: APPLICATIONINSIGHTS_CONNECTION_STRING | ||
- name: redis-cache | ||
image: bitnami/redis:6.2.10@sha256:bd42fcdab5959ce2b21b6ea8410d4b3ee87ecb2e320260326ec731ecfcffbd0e | ||
ports: | ||
- name: http | ||
port: 6379 | ||
variables: | ||
OTEL_RESOURCE_ATTRIBUTES: service.name=user-session, service.namespace=prod, service.version=tbd0.1.2 | ||
volumeMounts: | ||
- name: webvizcache | ||
path: /tmp/webvizcache/ | ||
blobfuse2: | ||
container: cache | ||
uid: 1234 | ||
- environment: review | ||
ALLOW_EMPTY_PASSWORD: yes | ||
# https://redis.io/docs/management/config/#configuring-redis-as-a-cache | ||
# maxmemory for redis must be aligned with component's requested memory, here 1gb vs 2gb | ||
REDIS_EXTRA_FLAGS: --maxmemory 1gb --maxmemory-policy allkeys-lru --save '' --appendonly no --loglevel verbose | ||
resources: | ||
requests: | ||
memory: 2Gi | ||
cpu: 200m | ||
limits: | ||
memory: 2Gi | ||
|
||
jobs: | ||
- name: backend-user-session | ||
dockerFileName: backend.Dockerfile | ||
schedulerPort: 8000 | ||
ports: | ||
- name: http | ||
port: 8000 | ||
ingressConfiguration: | ||
- websocketfriendly | ||
secretRefs: | ||
azureKeyVaults: | ||
- name: webviz | ||
items: | ||
- name: WEBVIZ-INSIGHTS-CONNECTIONSTRING-REVIEW | ||
envVar: APPLICATIONINSIGHTS_CONNECTION_STRING | ||
azureKeyVaults: | ||
- name: webviz | ||
items: | ||
- name: WEBVIZ-CLIENT-SECRET | ||
envVar: WEBVIZ_CLIENT_SECRET | ||
- name: WEBVIZ-SMDA-RESOURCE-SCOPE | ||
envVar: WEBVIZ_SMDA_RESOURCE_SCOPE | ||
- name: WEBVIZ-SMDA-SUBSCRIPTION-KEY | ||
envVar: WEBVIZ_SMDA_SUBSCRIPTION_KEY | ||
variables: | ||
OTEL_RESOURCE_ATTRIBUTES: service.name=user-session, service.namespace=review, service.version=tbd0.1.2 | ||
volumeMounts: | ||
- name: webvizcache | ||
path: /tmp/webvizcache/ | ||
blobfuse2: | ||
container: cache | ||
uid: 1234 | ||
UVICORN_PORT: 8000 | ||
UVICORN_ENTRYPOINT: src.backend.user_session.main:app | ||
environmentConfig: | ||
# As of October 2023 in radix, these settings need to be duplicated for both environments. | ||
- environment: prod | ||
secretRefs: | ||
azureKeyVaults: | ||
- name: webviz | ||
items: | ||
- name: WEBVIZ-INSIGHTS-CONNECTIONSTRING-PROD | ||
envVar: APPLICATIONINSIGHTS_CONNECTION_STRING | ||
variables: | ||
OTEL_RESOURCE_ATTRIBUTES: service.name=user-session, service.namespace=prod, service.version=tbd0.1.2 | ||
volumeMounts: | ||
- name: webvizcache | ||
path: /tmp/webvizcache/ | ||
blobfuse2: | ||
container: cache | ||
uid: 1234 | ||
- environment: review | ||
secretRefs: | ||
azureKeyVaults: | ||
- name: webviz | ||
items: | ||
- name: WEBVIZ-INSIGHTS-CONNECTIONSTRING-REVIEW | ||
envVar: APPLICATIONINSIGHTS_CONNECTION_STRING | ||
variables: | ||
OTEL_RESOURCE_ATTRIBUTES: service.name=user-session, service.namespace=review, service.version=tbd0.1.2 | ||
volumeMounts: | ||
- name: webvizcache | ||
path: /tmp/webvizcache/ | ||
blobfuse2: | ||
container: cache | ||
uid: 1234 | ||
|
||
dnsAppAlias: | ||
environment: prod | ||
component: frontend | ||
dnsAppAlias: | ||
environment: prod | ||
component: frontend |