Skip to content

Commit

Permalink
Merge pull request #35 from manics/update
Browse files Browse the repository at this point in the history
Fix omero.web configs, workaround whitenoise prefix bug, ingress hosts is optional
  • Loading branch information
manics authored Nov 19, 2022
2 parents 5b15425 + 7805504 commit b00ee01
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 21 deletions.
2 changes: 1 addition & 1 deletion omero-web/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v1
appVersion: 5.14.0
description: OMERO.web
name: omero-web
version: 0.4.0
version: 0.4.1
icon: https://www.openmicroscopy.org/img/logos/omero-logomark.svg
2 changes: 1 addition & 1 deletion omero-web/requirements.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dependencies:
- name: redis
version: 17.3.7
version: 17.3.11
repository: https://charts.bitnami.com/bitnami
condition: redis.enabled
13 changes: 5 additions & 8 deletions omero-web/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,15 @@ data:
# Override https://github.com/ome/omero-web-docker/blob/master/standalone/01-default-webapps.omero
{{- if .Values.config.defaultWebapps }}
01-default-webapps.omero: |
config append -- omero.web.middleware '{"index": 0, "class": "whitenoise.middleware.WhiteNoiseMiddleware"}'
config append -- omero.web.apps '"omero_iviewer"'
config set -- omero.web.viewer.view omero_iviewer.views.index
config append -- omero.web.open_with '["omero_iviewer", "omero_iviewer_index", {"supported_objects":["images", "dataset", "well"], "script_url": "omero_iviewer/openwith.js", "label": "OMERO.iviewer"}]'
config append -- omero.web.apps '"omero_parade"'
config append -- omero.web.ui.center_plugins '["Parade", "omero_parade/init.js.html", "omero_parade"]'
{{ .Values.config.defaultWebapps | nindent 4 }}
{{- end }}

web.omero: |
config append -- omero.web.django_additional_settings '["LOGGING", {"version": 1, "disable_existing_loggers": false, "formatters": {"standard": {"format": "%(asctime)s %(levelname)5.5s [%(name)40.40s] (proc.%(process)5.5d) %(funcName)s():%(lineno)d %(message)s"}}, "handlers": {"console": {"level": "DEBUG", "class": "logging.StreamHandler", "formatter": "standard"}}, "loggers": {"": {"handlers": ["console"], "level": "DEBUG", "propagate": true}}}]'
# Workaround bug when prefix set https://github.com/evansd/whitenoise/issues/271
config append -- omero.web.django_additional_settings '["WHITENOISE_STATIC_PREFIX", "/static"]'
config set -- omero.web.secure true
config set -- omero.web.server_list '{{ .Values.serverList | toJson }}'
Expand Down
8 changes: 5 additions & 3 deletions omero-web/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ spec:
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ . | quote }}
http:
{{- range $host := .Values.ingress.hosts | default (list "") }}
- http:
paths:
- path: {{ $ingressPath }}
pathType: Prefix
Expand All @@ -38,5 +37,8 @@ spec:
name: {{ $fullName }}
port:
name: http
{{- if $host }}
host: {{ $host | quote }}
{{- end }}
{{- end }}
{{- end }}
6 changes: 3 additions & 3 deletions omero-web/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ nameOverride: ""
fullnameOverride: ""

prefix: /
serverList: '[["omero-server", 4064, "omero"]]'
serverList:
- ["omero-server", 4064, "omero"]
config:
# Set to a multiline string (|) to override the default webapps config
# https://github.com/ome/omero-web-docker/blob/5.14.0-1/standalone/01-default-webapps.omero
Expand All @@ -38,8 +39,7 @@ ingress:
{}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- chart-example.local
hosts: []
tls: []
# - secretName: chart-example-tls
# hosts:
Expand Down
9 changes: 4 additions & 5 deletions test-omero-web.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
prefix: /
serverList:
# Change the first element to match the OMERO.server service name if needed,
# E.g. xxx-omero-server
# run `kubectl get svc`
- [omero-server, 4064, omero-server]
# Change the first element to match the OMERO.server service name if needed,
# run `kubectl get svc`
# serverList:
# - [omero-server-svc-hostname, 4064, omero-server]
config:
set:
append:
Expand Down

0 comments on commit b00ee01

Please sign in to comment.