fix(inventree): re-add nginx (#2618)

* fix(inventree): re-add nginx

* configmap common

* newline

* port

* root

* run additional cont as root?

* grp

* test rofs true

* rofs false
This commit is contained in:
Stavros Kois
2022-05-06 12:30:47 +03:00
committed by GitHub
parent 4bb0723dd3
commit ae63a361dc
5 changed files with 40 additions and 24 deletions
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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"
@@ -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" . }}
@@ -66,5 +66,4 @@ data:
proxy_set_header Content-Length "";
proxy_set_header X-Original-URI $request_uri;
}
}
+23 -20
View File
@@ -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 }}"