diff --git a/charts/incubator/inventree/Chart.yaml b/charts/incubator/inventree/Chart.yaml index 491751df1f5..908484e0a82 100644 --- a/charts/incubator/inventree/Chart.yaml +++ b/charts/incubator/inventree/Chart.yaml @@ -23,7 +23,7 @@ name: inventree sources: - https://inventree.readthedocs.io - https://github.com/inventree/InvenTree -version: 0.0.4 +version: 0.0.5 annotations: truecharts.org/catagories: | - utilities diff --git a/charts/incubator/inventree/questions.yaml b/charts/incubator/inventree/questions.yaml index 7c0bc2424ec..1eef8fab7ec 100644 --- a/charts/incubator/inventree/questions.yaml +++ b/charts/incubator/inventree/questions.yaml @@ -344,7 +344,7 @@ questions: label: "runAsNonRoot" schema: type: boolean - default: false + default: true # Include{securityContextAdvanced} - variable: podSecurityContext @@ -359,7 +359,7 @@ questions: description: "The UserID of the user running the application" schema: type: int - default: 0 + default: 100 - variable: runAsGroup label: "runAsGroup" description: "The groupID this App of the user running the application" diff --git a/charts/incubator/inventree/templates/common.yaml b/charts/incubator/inventree/templates/common.yaml index 84e6b9c26ef..0f40b8eaaab 100644 --- a/charts/incubator/inventree/templates/common.yaml +++ b/charts/incubator/inventree/templates/common.yaml @@ -1,6 +1,20 @@ {{/* Make sure all variables are set properly */}} {{- include "common.setup" . }} +{{/* Append the hardcoded settings */}} +{{- define "inventree.harcodedValues" -}} +persistence: + inventree-config: + enabled: "true" + mountPath: "/etc/nginx/nginx.conf" + subPath: "nginx-confing" + type: "custom" + volumeSpec: + configMap: + name: {{ printf "%v-config" (include "common.names.fullname" .) }} +{{- end -}} +{{- $_ := mergeOverwrite .Values (include "inventree.harcodedValues" . | fromYaml) -}} + {{/* Render secrets for inventree */}} {{- include "inventree.secrets" . }} diff --git a/charts/incubator/inventree/templates/configmap.yaml b/charts/incubator/inventree/templates/configmap.yaml index 40cde093400..2d555b52ac6 100644 --- a/charts/incubator/inventree/templates/configmap.yaml +++ b/charts/incubator/inventree/templates/configmap.yaml @@ -66,5 +66,4 @@ data: proxy_set_header Content-Length ""; proxy_set_header X-Original-URI $request_uri; } - } diff --git a/charts/incubator/inventree/values.yaml b/charts/incubator/inventree/values.yaml index 05e274ba450..5e918fd67b6 100644 --- a/charts/incubator/inventree/values.yaml +++ b/charts/incubator/inventree/values.yaml @@ -3,17 +3,16 @@ image: tag: 0.6.3@sha256:51f1e38f894a34dea12c0b9dfac7d59dc1c78319125ae24c8cb90a92fa75ae16 pullPolicy: IfNotPresent -# nginxImage: -# repository: tccr.io/truecharts/nginx -# tag: v1.21.6@sha256:79875e354f6669f0fe8a31026a092734fd914ab041de0f3d8462e0117be37fd3 +nginxImage: + repository: tccr.io/truecharts/nginx + tag: v1.21.6@sha256:79875e354f6669f0fe8a31026a092734fd914ab041de0f3d8462e0117be37fd3 securityContext: readOnlyRootFilesystem: false - # runAsNonRoot: false podSecurityContext: runAsUser: 100 - # runAsGroup: 0 + runAsGroup: 0 secret: INVENTREE_ADMIN_EMAIL: "test@example.com" @@ -52,7 +51,7 @@ service: ports: main: port: 10231 - targetPort: 8000 + targetPort: 10231 persistence: data: @@ -108,21 +107,25 @@ initContainers: cd /home/inventree; invoke update; - additionalContainers: - # nginx: - # name: nginx - # image: "{{ .Values.nginxImage.repository }}:{{ .Values.nginxImage.tag }}" - # ports: - # - containerPort: 10231 - # name: main - # volumeMounts: - # - name: inventree-config - # mountPath: "/etc/nginx/conf.d/default.conf" - # subPath: nginx-config - # readOnly: true - # - name: data - # mountPath: "/var/www" + nginx: + name: nginx + image: "{{ .Values.nginxImage.repository }}:{{ .Values.nginxImage.tag }}" + ports: + - containerPort: 10231 + name: main + securityContext: + runAsUser: 0 + runAsGroup: 100 + readOnlyRootFilesystem: false + runAsNonRoot: false + volumeMounts: + - name: inventree-config + mountPath: "/etc/nginx/conf.d/default.conf" + subPath: nginx-config + readOnly: true + - name: data + mountPath: "/var/www" worker: name: worker image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"