From cb159245206fd479f356f3430fbc70b699090123 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sandstr=C3=B6m?= Date: Thu, 23 Nov 2023 16:54:04 +0100 Subject: [PATCH 1/6] SS-721 - minio is setting persistent volume as none by default (#108) * Changed the order of creation in project template * Disabled json formatter in pre-commit --- .pre-commit-config.yaml | 1 + fixtures/projects_templates.json | 18 +++++++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bb2dd936..14ede5bf 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,6 +18,7 @@ repos: - id: end-of-file-fixer exclude: static/vendor/ - id: pretty-format-json + exclude: ^fixtures/ args: [--autofix] diff --git a/fixtures/projects_templates.json b/fixtures/projects_templates.json index 2a9e46da..2d63f269 100644 --- a/fixtures/projects_templates.json +++ b/fixtures/projects_templates.json @@ -64,15 +64,6 @@ "slug": "default", "template": { "apps": { - "project-minio": { - "app:volumeK8s": [ - "project-vol" - ], - "credentials.access_key": "accesskey", - "credentials.secret_key": "secretkey123", - "permission": "project", - "slug": "minio" - }, "project-netpolicy": { "slug": "netpolicy" }, @@ -85,6 +76,15 @@ "volume.accessModes": "ReadWriteMany", "volume.size": "1Gi", "volume.storageClass": "microk8s-hostpath" + }, + "project-minio": { + "app:volumeK8s": [ + "project-vol" + ], + "credentials.access_key": "accesskey", + "credentials.secret_key": "secretkey123", + "permission": "project", + "slug": "minio" } }, "environments": { From c7b718819cacee5a57aa17a31d7a5459c380cbfe Mon Sep 17 00:00:00 2001 From: Arnold Kochari Date: Mon, 27 Nov 2023 14:42:28 +0100 Subject: [PATCH 2/6] Bugfix/shiny dash app port (#109) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Viktor Sandström --- charts/apps/dash/chart/templates/deployment.yaml | 2 +- charts/apps/dash/chart/templates/service.yaml | 2 +- charts/apps/shiny/chart/templates/deployment.yaml | 2 +- charts/apps/shiny/chart/templates/service.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/apps/dash/chart/templates/deployment.yaml b/charts/apps/dash/chart/templates/deployment.yaml index bfa6e56b..7926f7a4 100644 --- a/charts/apps/dash/chart/templates/deployment.yaml +++ b/charts/apps/dash/chart/templates/deployment.yaml @@ -39,7 +39,7 @@ spec: image: {{ .Values.appconfig.image }} imagePullPolicy: IfNotPresent ports: - - containerPort: {{ .Values.service.targetport }} + - containerPort: {{ .Values.appconfig.port }} securityContext: {{- toYaml .Values.securityContext | nindent 10 }} resources: diff --git a/charts/apps/dash/chart/templates/service.yaml b/charts/apps/dash/chart/templates/service.yaml index 74ed7489..dd52aac7 100644 --- a/charts/apps/dash/chart/templates/service.yaml +++ b/charts/apps/dash/chart/templates/service.yaml @@ -9,6 +9,6 @@ spec: ports: - protocol: TCP port: {{ .Values.service.port }} - targetPort: {{ .Values.service.targetport }} + targetPort: {{ .Values.appconfig.port }} selector: release: {{ $.Release.Name }} diff --git a/charts/apps/shiny/chart/templates/deployment.yaml b/charts/apps/shiny/chart/templates/deployment.yaml index 3cce0974..883ccb02 100644 --- a/charts/apps/shiny/chart/templates/deployment.yaml +++ b/charts/apps/shiny/chart/templates/deployment.yaml @@ -43,6 +43,6 @@ spec: resources: {{- toYaml .Values.flavor | nindent 10 }} ports: - - containerPort: {{ .Values.service.targetport }} + - containerPort: {{ .Values.appconfig.port }} terminationGracePeriodSeconds: 30 dnsPolicy: ClusterFirst diff --git a/charts/apps/shiny/chart/templates/service.yaml b/charts/apps/shiny/chart/templates/service.yaml index 65267006..9954d72e 100644 --- a/charts/apps/shiny/chart/templates/service.yaml +++ b/charts/apps/shiny/chart/templates/service.yaml @@ -9,6 +9,6 @@ spec: ports: - protocol: TCP port: {{ .Values.service.port }} - targetPort: {{ .Values.service.targetport }} + targetPort: {{ .Values.appconfig.port }} selector: release: {{ $.Release.Name }} From c90e3a7f34a66f7ea894bbd1f693635573e4600b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sandstr=C3=B6m?= Date: Mon, 27 Nov 2023 17:30:42 +0100 Subject: [PATCH 3/6] Bugfix/shiny proxy configmap not dynamic (#110) * Enabled dynamic configmap for Shinyproxy --- charts/apps/shinyproxy/chart/templates/deployment.yaml | 3 +-- charts/apps/shinyproxy/chart/values.yaml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/charts/apps/shinyproxy/chart/templates/deployment.yaml b/charts/apps/shinyproxy/chart/templates/deployment.yaml index cb20d27e..db6f2784 100644 --- a/charts/apps/shinyproxy/chart/templates/deployment.yaml +++ b/charts/apps/shinyproxy/chart/templates/deployment.yaml @@ -44,8 +44,7 @@ spec: - containerPort: {{ .Values.appconfig.proxyport }} volumeMounts: - name: application-conf-{{ .Release.Name }} - mountPath: /opt/shinyproxy/application.yml - subPath: application.yml + mountPath: /opt/shinyproxy/config imagePullPolicy: IfNotPresent securityContext: {{- toYaml .Values.securityContext | nindent 10 }} diff --git a/charts/apps/shinyproxy/chart/values.yaml b/charts/apps/shinyproxy/chart/values.yaml index e0684fe5..c1cb5124 100644 --- a/charts/apps/shinyproxy/chart/values.yaml +++ b/charts/apps/shinyproxy/chart/values.yaml @@ -5,7 +5,7 @@ project: slug: project-slug appconfig: - proxyimage: ghcr.io/scilifelabdatacentre/serve-shinyproxy:231030-1144 + proxyimage: ghcr.io/scilifelabdatacentre/serve-shinyproxy:231124-2126 proxyport: 8080 port: 3838 image: From 15fd15aca7113bee487924066c0b9b0ca2e9bea5 Mon Sep 17 00:00:00 2001 From: Arnold Kochari Date: Tue, 28 Nov 2023 12:45:08 +0100 Subject: [PATCH 4/6] SS-705 minor adjustments in project dashboard (#112) --- fixtures/apps_fixtures.json | 8 ++++---- templates/apps/create.html | 31 +++++++++++++++++++++++++++++-- templates/apps/update.html | 6 +++--- templates/projects/overview.html | 9 ++++++--- templates/registration/login.html | 2 +- 5 files changed, 43 insertions(+), 13 deletions(-) diff --git a/fixtures/apps_fixtures.json b/fixtures/apps_fixtures.json index 69dff80c..5219bcc0 100644 --- a/fixtures/apps_fixtures.json +++ b/fixtures/apps_fixtures.json @@ -431,7 +431,7 @@ "category": "serve", "chart": "apps/custom-app/chart", "created_on": "2023-08-25T21:34:37.815Z", - "description": "", + "description": "Apps built with Gradio, Streamlit, Flask, etc.", "logo": "default-logo.png", "name": "Custom App", "priority": "400", @@ -594,12 +594,12 @@ }, { "fields": { - "category": "admin-apps", + "category": "serve", "chart": "apps/shiny/chart", "created_on": "2023-08-25T21:34:37.815Z", - "description": "Shiny app without ShinyProxy as a middle layer.", + "description": "Shiny app without ShinyProxy as a middle layer. [admins only]", "logo": "shinyapp-logo.png", - "name": "Shiny App", + "name": "Shiny App (single copy)", "priority": "400", "settings": { "appconfig": { diff --git a/templates/apps/create.html b/templates/apps/create.html index ed99ee2b..bc754bb0 100644 --- a/templates/apps/create.html +++ b/templates/apps/create.html @@ -171,7 +171,7 @@

Create {{ app.name }}

{% endfor %} - + {% endfor %} @@ -184,7 +184,7 @@
{{ vals.meta_title }}
{% if subval.type != "boolean" and subkey == "image" or subkey == "port"%}
{% else %} -
+
{% endif %} {% if subval.type == "boolean" %} @@ -208,6 +208,13 @@
{{ vals.meta_title }}
Please add a valid image name!
+ {% elif subkey == "path" %} + + + +
+ Please add a valid path! +
{% else %} {% endif %} @@ -286,6 +293,26 @@
{{ vals.meta_title }}
+{# In the custom app creation form, make the path a required field if a persistent volumet is selected #} +{% if app.slug == "customapp" %} + +{% endif %}