From 600200cdac0ff339260cc68dfa8aa5c56eef8db7 Mon Sep 17 00:00:00 2001 From: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Date: Thu, 24 Mar 2022 20:30:25 +0200 Subject: [PATCH] fix(snipe-it): fix permissions and add more storage questions (#2269) * fix(snipe-it): remove persistence * session off * test * add persistence * re-add storage --- charts/stable/snipe-it/Chart.yaml | 2 +- charts/stable/snipe-it/questions.yaml | 90 ++++++++++++++++++++++++++- charts/stable/snipe-it/values.yaml | 13 ++-- 3 files changed, 98 insertions(+), 7 deletions(-) diff --git a/charts/stable/snipe-it/Chart.yaml b/charts/stable/snipe-it/Chart.yaml index d580a389d0c..854bff54b2e 100644 --- a/charts/stable/snipe-it/Chart.yaml +++ b/charts/stable/snipe-it/Chart.yaml @@ -29,7 +29,7 @@ name: snipe-it sources: - https://snipeitapp.com/ - https://hub.docker.com/r/linuxserver/ -version: 2.0.1 +version: 2.0.2 annotations: truecharts.org/catagories: | - management diff --git a/charts/stable/snipe-it/questions.yaml b/charts/stable/snipe-it/questions.yaml index 5ca0bdef467..eea4998e4c7 100644 --- a/charts/stable/snipe-it/questions.yaml +++ b/charts/stable/snipe-it/questions.yaml @@ -676,6 +676,49 @@ questions: additional_attrs: true type: dict attrs: + - variable: data + label: "App Data Storage" + description: "Stores the Application Data." + schema: + additional_attrs: true + type: dict + attrs: + - variable: type + label: "Type of Storage" + description: "Sets the persistence type, Anything other than PVC could break rollback!" + schema: + type: string + default: "simplePVC" + enum: + - value: "simplePVC" + description: "PVC (simple)" + - value: "simpleHP" + description: "HostPath (simple)" + - value: "emptyDir" + description: "emptyDir" + - value: "pvc" + description: "pvc" + - value: "hostPath" + description: "hostPath" +# Include{persistenceBasic} + - variable: hostPath + label: "hostPath" + description: "Path inside the container the storage is mounted" + schema: + show_if: [["type", "=", "hostPath"]] + type: hostpath + - variable: medium + label: "EmptyDir Medium" + schema: + show_if: [["type", "=", "emptyDir"]] + type: string + default: "" + enum: + - value: "" + description: "Default" + - value: "Memory" + description: "Memory" +# Include{persistenceAdvanced} - variable: logs label: "App Logs Storage" description: "Stores the Application Logs." @@ -718,6 +761,49 @@ questions: description: "Default" - value: "Memory" description: "Memory" +# Include{persistenceAdvanced} + - variable: backups + label: "App Backups Storage" + description: "Stores the Application Backups." + schema: + additional_attrs: true + type: dict + attrs: + - variable: type + label: "Type of Storage" + description: "Sets the persistence type, Anything other than PVC could break rollback!" + schema: + type: string + default: "simplePVC" + enum: + - value: "simplePVC" + description: "PVC (simple)" + - value: "simpleHP" + description: "HostPath (simple)" + - value: "emptyDir" + description: "emptyDir" + - value: "pvc" + description: "pvc" + - value: "hostPath" + description: "hostPath" +# Include{persistenceBasic} + - variable: hostPath + label: "hostPath" + description: "Path inside the container the storage is mounted" + schema: + show_if: [["type", "=", "hostPath"]] + type: hostpath + - variable: medium + label: "EmptyDir Medium" + schema: + show_if: [["type", "=", "emptyDir"]] + type: string + default: "" + enum: + - value: "" + description: "Default" + - value: "Memory" + description: "Memory" # Include{persistenceAdvanced} # Include{persistenceList} @@ -800,13 +886,13 @@ questions: description: The groupID this App of the user running the application" schema: type: int - default: 0 + default: 1000 - variable: fsGroup label: "fsGroup" description: "The group that should own ALL storage." schema: type: int - default: 568 + default: 50 # Include{podSecurityContextAdvanced} # Include{resources} diff --git a/charts/stable/snipe-it/values.yaml b/charts/stable/snipe-it/values.yaml index a2e4f62ff75..383b6367ba1 100644 --- a/charts/stable/snipe-it/values.yaml +++ b/charts/stable/snipe-it/values.yaml @@ -9,7 +9,7 @@ securityContext: podSecurityContext: runAsUser: 0 - runAsGroup: 50 + runAsGroup: 1000 fsGroup: 50 env: @@ -19,16 +19,15 @@ env: DB_DATABASE: "{{ .Values.mariadb.mariadbDatabase }}" DB_PORT: "3306" REDIS_PORT: "6379" - SESSION_DRIVER: "redis" APP_TIMEZONE: "{{ .Values.TZ }}" FILESYSTEM_DISK: "local" # User Defined - APP_DEBUG: true - APP_LOG_LEVEL: "debug" APP_URL: "http://localhost:80" APP_LOCALE: "en" MAX_RESULTS: 500 IMAGE_LIB: "gd" + # APP_DEBUG: true + # APP_LOG_LEVEL: "debug" # Session SESSION_LIFETIME: 30 EXPIRE_ON_CLOSE: false @@ -73,6 +72,12 @@ persistence: logs: enabled: true mountPath: "/var/www/html/storage/logs" + data: + enabled: true + mountPath: "/var/lib/snipeit/data" + backups: + enabled: true + mountPath: "/var/lib/snipeit/dumps" mariadb: enabled: true