Skip to content

Commit

Permalink
ci: PLATE-803: Add support for an empty LABEL_STUDIO_HOST env variable (
Browse files Browse the repository at this point in the history
  • Loading branch information
farioas authored Jan 31, 2024
1 parent f6f5fba commit c7f5c2c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions heartex/label-studio/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
*

### Fixes
## 1.4.0
### Fixes
* Add support for an empty LABEL_STUDIO_HOST variable.

## 1.3.0
### Improvements
* Update postgresql to 13.12.0.
Expand Down
2 changes: 1 addition & 1 deletion heartex/label-studio/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ home: https://labelstud.io/
type: application
icon: https://raw.githubusercontent.com/heartexlabs/label-studio/master/images/logo.png
# Chart version
version: 1.3.4
version: 1.4.0
# Label Studio release version
appVersion: "1.11.0"
kubeVersion: ">= 1.14.0-0"
Expand Down
6 changes: 3 additions & 3 deletions heartex/label-studio/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{{- if .Values.ci }}
{{- if not .Values.global.extraEnvironmentVars.LABEL_STUDIO_HOST }}
{{- if not (hasKey .Values.global.extraEnvironmentVars "LABEL_STUDIO_HOST") }}
LABEL_STUDIO_HOST=http{{ if $.Values.app.ingress.tls }}s{{ end }}://{{ .Values.app.ingress.host }}{{ default "" .Values.app.contextPath }}
{{- else }}
LABEL_STUDIO_HOST={{ .Values.global.extraEnvironmentVars.LABEL_STUDIO_HOST }}
{{- end }}
{{- else }}
Get the application URL by running these commands:
{{- if .Values.app.ingress.enabled }}
{{- if not .Values.global.extraEnvironmentVars.LABEL_STUDIO_HOST }}
{{- if not (hasKey .Values.global.extraEnvironmentVars "LABEL_STUDIO_HOST") }}
Please visit http{{ if $.Values.app.ingress.tls }}s{{ end }}://{{ .Values.app.ingress.host }}{{ default "" .Values.app.ingress.path }} to use Label Studio
{{- else }}
Please visit {{ .Values.global.extraEnvironmentVars.LABEL_STUDIO_HOST }} to use Label Studio
Expand All @@ -32,7 +32,7 @@ After running these commands, please visit http://127.0.0.1:8080 to use Label St
{{- end }}
{{ include "ls.deprecations" . }}
{{ include "ls.checkConfig" . }}
{{- if and (not .Values.app.ingress.enabled) (not .Values.global.extraEnvironmentVars.LABEL_STUDIO_HOST) -}}
{{- if and (not .Values.app.ingress.enabled) (not (hasKey .Values.global.extraEnvironmentVars "LABEL_STUDIO_HOST")) -}}
WARNING:
If `.Values.app.ingress.enabled` set to `false`, please define `.Values.global.extraEnvironmentVars.LABEL_STUDIO_HOST` instead.
It should include http/https scheme and a hostname or IP, e.g.: http://host.com or http://127.0.0.1:8080
Expand Down
2 changes: 1 addition & 1 deletion heartex/label-studio/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ Set's common environment variables
value: redis{{ if .Values.redis.tls.enabled }}s{{ end }}://{{ .Release.Name }}-redis-headless.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}:6379/1
{{- end }}
{{- end }}
{{- if not .Values.global.extraEnvironmentVars.LABEL_STUDIO_HOST }}
{{- if not (hasKey .Values.global.extraEnvironmentVars "LABEL_STUDIO_HOST") }}
{{- if .Values.app.ingress.enabled }}
- name: LABEL_STUDIO_HOST
value: http{{ if .Values.app.ingress.tls }}s{{ end }}://{{ .Values.app.ingress.host }}{{ default "" .Values.app.contextPath }}
Expand Down

0 comments on commit c7f5c2c

Please sign in to comment.