Skip to content

Commit

Permalink
Refactor config settings of the leo
Browse files Browse the repository at this point in the history
  • Loading branch information
mjasion committed Aug 18, 2023
1 parent 639dc80 commit 48569da
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 27 deletions.
6 changes: 6 additions & 0 deletions charts/studio/templates/configmap-studio-backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@ data:
{{- with .Values.studioBackend.envVars}}
{{- toYaml . | nindent 2 }}
{{- end }}

LEO_SERVICE_HOST: "{{ .Release.Name }}-leo"
LEO_SERVICE_PORT: "{{ .Values.studioLeo.service.port }}"
LEO_ENCODING: "utf-8"
LEO_API_PATH_PREFIX: "{{- if and .Values.global.basePath (not (eq .Values.global.basePath "/")) }}{{ include "studio.basePath" . }}/{{- end }}leo"

2 changes: 1 addition & 1 deletion charts/studio/templates/configmap-studio-leo.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{.Release.Name}}-studio-leo
name: {{.Release.Name}}-leo
data:
{{- with .Values.studioLeo.envVars}}
{{- toYaml . | nindent 2 }}
Expand Down
7 changes: 0 additions & 7 deletions charts/studio/templates/configmap-studio.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,3 @@ data:
DVCX_ROOT_DIR: {{ $dvcx.rootDir | default "/tmp" | quote }}
DVCX_CH_HOST: {{ $dvcxClickhouse.host | default "" | quote }}
DVCX_CH_DATABASE: {{ $dvcxClickhouse.database | default "" | quote }}

LEO_SERVICE_HOST: {{ .Release.Name }}-studio-leo
LEO_SERVICE_PORT: {{ .Values.studioLeo.service.port }}
LEO_HOST: "{{ .Release.Name }}-studio-leo:{{ .Values.studioLeo.service.port }}"
LEO_ENCODING: "utf-8"
LEO_API_PATH_PREFIX: "{{- if and .Values.global.basePath (not (eq .Values.global.basePath "/")) }}/{{ include "studio.basePath" . }}{{- end }}/leo"
LEO_ORIGIN: "http://{{.Release.Name}}-studio-leo"
4 changes: 2 additions & 2 deletions charts/studio/templates/deployment-studio-leo.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-studio-leo
name: {{ .Release.Name }}-leo
labels:
{{- include "studio-leo.labels" . | nindent 4 }}
spec:
Expand Down Expand Up @@ -63,7 +63,7 @@ spec:
- secretRef:
name: studio
- configMapRef:
name: {{ .Release.Name }}-studio-leo
name: {{ .Release.Name }}-leo
{{- if .Values.global.envFromSecret }}
- secretRef:
name: {{ .Values.global.envFromSecret }}
Expand Down
44 changes: 27 additions & 17 deletions charts/studio/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -533,49 +533,56 @@ studioBeat:

affinity: {}

# -- Studio Leo settings group
studioLeo:
# -- Studio: Additional environment variables for leo pods
# -- Leo image settings
image:
# -- Leo image repository
repository: docker.iterative.ai/leo-server
# -- Leo image pull policy
pullPolicy: IfNotPresent
# -- Leo image tag
tag: "v0.0.13"

# -- Additional environment variables for leo pods
envVars: {}
# Example:
# envVars:
# DEBUG: "True"

# -- Studio: The name of an existing Secret that contains sensitive environment variables
# -- The name of an existing Secret that contains sensitive environment variables
# passed to leo pods.
envFromSecret: ""

# -- Leo replica count
replicaCount: 1

image:
repository: docker.iterative.ai/leo-server
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: "v0.0.13"

# -- Leo service configuration
service:
# -- Leo service type
type: ClusterIP
# -- Leo service port
port: 8181

# -- Leo resources configuration
resources:
# -- Leo resource requests
requests:
cpu: 100m
memory: 512Mi
# -- Leo resource limits
limits:
cpu: 500m
memory: 1Gi

autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 1
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80

# -- Additional annotations for leo pods
podAnnotations: {}

# -- Leo pod security context configuration
podSecurityContext: {}
# fsGroup: 2000

# -- Leo security context configuration
securityContext: {}
# capabilities:
# drop:
Expand All @@ -584,10 +591,13 @@ studioLeo:
# runAsNonRoot: true
# runAsUser: 1000

# -- Leo node selector configuration
nodeSelector: {}

# -- Leo tolerations configuration
tolerations: []

# -- Leo affinity configuration
affinity: {}

# -- Studio worker settings group
Expand Down Expand Up @@ -725,7 +735,7 @@ studioDvcxWorker:

# -- DVCx worker pod security context configuration
podSecurityContext: {}
# fsGroup: 2000
# fsGroup: 2000

# -- DVCx worker pod security context configuration
securityContext: {}
Expand All @@ -734,7 +744,7 @@ studioDvcxWorker:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000
# runAsUser: 1000

# -- DVCx worker pod node selector configuration
nodeSelector: {}
Expand Down

0 comments on commit 48569da

Please sign in to comment.