Skip to content

Commit

Permalink
simplified bff
Browse files Browse the repository at this point in the history
  • Loading branch information
andricDu committed Aug 29, 2023
1 parent 8541ff7 commit 85f7e73
Show file tree
Hide file tree
Showing 5 changed files with 377 additions and 234 deletions.
2 changes: 1 addition & 1 deletion bff-cli-service/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.2.1
version: 1.0.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
90 changes: 90 additions & 0 deletions bff-cli-service/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ spec:
{{- end }}
{{- end }}
env:
###################### START OF APP CONFIG #############################
- name: port
value: {{ .Values.appConfig.port | quote }}
- name: CONFIG_CENTER_ENABLED
Expand All @@ -66,6 +67,95 @@ spec:
value: {{ .Values.appConfig.env | quote }}
- name: srv_namespace
value: {{ .Values.appConfig.srv_namespace | quote }}

# logging
- name: log_level
value: {{ .Values.appConfig.log_level | quote }}
- name: namespace
value: {{ .Values.appConfig.namespace | quote }}
- name: OPEN_TELEMETRY_ENABLED
value: {{ .Values.appConfig.OPEN_TELEMETRY_ENABLED | quote }}

# labels and vm
- name: CLI_PUBLIC_KEY_PATH
value: {{ .Values.appConfig.CLI_PUBLIC_KEY_PATH | quote }}
- name: GREEN_ZONE_LABEL
value: {{ .Values.appConfig.GREEN_ZONE_LABEL | quote }}
- name: CORE_ZONE_LABEL
value: {{ .Values.appConfig.CORE_ZONE_LABEL | quote }}


# deprecated
- name: ATLAS_API
value: {{ .Values.appConfig.ATLAS_API | quote }}
- name: ATLAS_ENTITY_TYPE
value: {{ .Values.appConfig.ATLAS_ENTITY_TYPE | quote }}
- name: HPC_SERVICE
value: {{ .Values.appConfig.HPC_SERVICE | quote }}
- name: KG_SERVICE
value: {{ .Values.appConfig.KG_SERVICE | quote }}

# redis
{{- if not .Values.appConfig.tenant_id }}
- name: REDIS_HOST
value: {{ .Values.appConfig.REDIS_HOST | quote }}
{{- else }}
- name: REDIS_HOST
value: "redis-master.{{ .Values.appConfig.tenant_id }}-redis"
{{- end }}
- name: REDIS_PORT
value: {{ .Values.appConfig.REDIS_PORT | quote }}
- name: REDIS_DB
value: {{ .Values.appConfig.REDIS_DB | quote }}

# jupyter
- name: JUPYTER_IP_LOWER
value: {{ .Values.appConfig.JUPYTER_IP_LOWER | quote }}
- name: JUPYTER_IP_UPPER
value: {{ .Values.appConfig.JUPYTER_IP_UPPER | quote }}

# Microservices connections
#if tenant id is not set
{{- if not .Values.appConfig.tenant_id }}
- name: AUTH_SERVICE
value: "http://auth.utility:5061"
- name: DATASET_SERVICE
value: "http://dataset.utility:5081"
- name: METADATA_SERVICE
value: "http://metadata.utility:5066"
- name: PROJECT_SERVICE
value: "http://project.utility:5064"
- name: UPLOAD_SERVICE_CORE
value: "http://upload.core:5065"
- name: UPLOAD_SERVICE_GREENROOM
value: "http://upload.greenroom:5065"
- name: DOWNLOAD_SERVICE_CORE
value: "http://download.core:5065"
- name: DOWNLOAD_SERVICE_GREENROOM
value: "http://download.greenroom:5065"
- name: WORKSPACE_SERVICE
value: "http://workspace.utility:5068"
{{- else }}
- name: AUTH_SERVICE
value: "http://auth.{{ .Values.appConfig.tenant_id }}-utility:5061"
- name: DATASET_SERVICE
value: "http://dataset.{{ .Values.appConfig.tenant_id }}-utility:5081"
- name: METADATA_SERVICE
value: "http://metadata.{{ .Values.appConfig.tenant_id }}-utility:5066"
- name: PROJECT_SERVICE
value: "http://project.{{ .Values.appConfig.tenant_id }}-utility:5064"
- name: UPLOAD_SERVICE_CORE
value: "http://upload{{ .Values.appConfig.tenant_id }}-.core:5065"
- name: UPLOAD_SERVICE_GREENROOM
value: "http://upload.{{ .Values.appConfig.tenant_id }}-greenroom:5065"
- name: DOWNLOAD_SERVICE_CORE
value: "http://download.{{ .Values.appConfig.tenant_id }}-core:5065"
- name: DOWNLOAD_SERVICE_GREENROOM
value: "http://download.{{ .Values.appConfig.tenant_id }}-greenroom:5065"
- name: WORKSPACE_SERVICE
value: "http://workspace.{{ .Values.appConfig.tenant_id }}-utility:5068"
{{- end}}
###################### END OF APP CONFIG #############################
{{- if .Values.extraEnv }}
{{- range $key, $value := .Values.extraEnv }}
- name: {{ $key }}
Expand Down
51 changes: 47 additions & 4 deletions bff-cli-service/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,27 @@ appConfig:
config_center_base_url: http://common.utility:5062/
srv_namespace: service_bff-cli

tenant_id: ""

log_level: info
namespace: utility
OPEN_TELEMETRY_ENABLED: "True"

CLI_PUBLIC_KEY_PATH: "/var/run/secrets/guacamole/jwt-key.pub"
GREEN_ZONE_LABEL: "Greenroom"
CORE_ZONE_LABEL: "Core"

REDIS_HOST: "redis-master.redis"
REDIS_DB: "0"
REDIS_PORT: "6379"
HPC_SERVICE: ""
KG_SERVICE: ""
ATLAS_API: "http://atlas.utility:21000"
ATLAS_ENTITY_TYPE: "metadata_items"

JUPYTER_IP_LOWER: "15.0.0.0"
JUPYTER_IP_UPPER: "15.0.255.255"

serviceAccount:
# Specifies whether a service account should be created
create: false
Expand All @@ -31,7 +52,7 @@ container:

service:
type: ClusterIP
port: 80
port: 5080

podAnnotations: {}
deploymentAnnotations: {}
Expand All @@ -42,10 +63,22 @@ securityContext: {}

imagePullSecrets: []

command:
- "/bin/bash"
args:
- "-c"
- "./gunicorn_starter.sh"

ingress:
enabled: false

resources: {}
resources:
limits:
cpu: "1"
memory: 500Mi
requests:
cpu: "10m"
memory: 10Mi

autoscaling:
enabled: false
Expand All @@ -60,10 +93,20 @@ extraEnv: {}

extraEnvYaml: {}

readinessProbe: []
readinessProbe:
failureThreshold: 3
initialDelaySeconds: 5
periodSeconds: 10
successThreshold: 1
tcpSocket:
port: 5080

extraVolumeMounts: []

extraVolumes: []

updateStrategy: []
updateStrategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 33%
type: RollingUpdate
Binary file added docs/bff-cli-service-1.0.0.tgz
Binary file not shown.
Loading

0 comments on commit 85f7e73

Please sign in to comment.