fix(inventree): update nginx.conf mount method (#3656)
* fix(inventree): attempt to fix login errors * hmm * hmm * mountpath * hmmm * ?! * hmm * remove mountPath * remove RO * try subPath * try type configMap * read content * try wger too * remove cmd
This commit is contained in:
parent
b8c8523b85
commit
ab8f8e2679
|
@ -28,7 +28,7 @@ sources:
|
|||
- https://github.com/truecharts/charts/tree/master/charts/stable/inventree
|
||||
- https://inventree.readthedocs.io
|
||||
- https://github.com/inventree/InvenTree
|
||||
version: 4.0.6
|
||||
version: 4.0.7
|
||||
annotations:
|
||||
truecharts.org/catagories: |
|
||||
- utilities
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
{{- define "inventree.config" -}}
|
||||
|
||||
{{- $configName := printf "%s-inventree-config" (include "tc.common.names.fullname" .) }}
|
||||
{{- $nginxConfigName := printf "%s-inventree-config-nginx" (include "tc.common.names.fullname" .) }}
|
||||
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
|
@ -51,6 +53,14 @@ data:
|
|||
{{- with .Values.inventree.general.login_attempts }}
|
||||
INVENTREE_LOGIN_ATTEMPTS: {{ . | quote }}
|
||||
{{- end }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ $nginxConfigName }}
|
||||
labels:
|
||||
{{- include "tc.common.labels" . | nindent 4 }}
|
||||
data:
|
||||
nginx.conf: |-
|
||||
server {
|
||||
listen {{ .Values.service.main.ports.main.port }};
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
{{/* Define the nginx container */}}
|
||||
{{- define "inventree.nginx" -}}
|
||||
image: {{ .Values.nginxImage.repository }}:{{ .Values.nginxImage.tag }}
|
||||
imagePullPolicy: '{{ .Values.nginxImage.pullPolicy }}'
|
||||
securityContext:
|
||||
runAsUser: {{ .Values.podSecurityContext.runAsUser }}
|
||||
runAsGroup: {{ .Values.podSecurityContext.runAsGroup }}
|
||||
readOnlyRootFilesystem: {{ .Values.securityContext.readOnlyRootFilesystem }}
|
||||
runAsNonRoot: {{ .Values.securityContext.runAsNonRoot }}
|
||||
imagePullPolicy: {{ .Values.nginxImage.pullPolicy }}
|
||||
ports:
|
||||
- containerPort: {{ .Values.service.main.ports.main.port }}
|
||||
name: main
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
runAsGroup: {{ .Values.podSecurityContext.runAsGroup }}
|
||||
readOnlyRootFilesystem: false
|
||||
runAsNonRoot: false
|
||||
volumeMounts:
|
||||
- name: inventree-nginx
|
||||
mountPath: "/etc/nginx/conf.d/default.conf"
|
||||
subPath: nginx.conf
|
||||
subPath: default.conf
|
||||
readOnly: true
|
||||
- name: data
|
||||
mountPath: "/var/www"
|
||||
|
|
|
@ -6,6 +6,7 @@ image:
|
|||
nginxImage:
|
||||
repository: tccr.io/truecharts/nginx
|
||||
tag: v1.23.1@sha256:1620254cd011e2b81361f1f4682fd6cceadf13b07f8e37f322b60407d6d5a766
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
securityContext:
|
||||
readOnlyRootFilesystem: false
|
||||
|
@ -53,13 +54,10 @@ persistence:
|
|||
enabled: true
|
||||
mountPath: "/home/inventree/data"
|
||||
inventree-nginx:
|
||||
enabled: "true"
|
||||
enabled: true
|
||||
noMount: true
|
||||
subPath: "nginx.conf"
|
||||
type: "custom"
|
||||
volumeSpec:
|
||||
configMap:
|
||||
name: '{{ include "tc.common.names.fullname" . }}-inventree-config'
|
||||
type: configMap
|
||||
objectName: '{{ include "tc.common.names.fullname" . }}-inventree-config-nginx'
|
||||
|
||||
postgresql:
|
||||
enabled: true
|
||||
|
|
|
@ -27,7 +27,7 @@ sources:
|
|||
- https://github.com/truecharts/charts/tree/master/charts/stable/wger
|
||||
- https://github.com/wger-project/wger
|
||||
- https://github.com/wger-project/docker
|
||||
version: 1.1.0
|
||||
version: 1.1.1
|
||||
annotations:
|
||||
truecharts.org/catagories: |
|
||||
- life
|
||||
|
|
|
@ -64,17 +64,10 @@ persistence:
|
|||
type: emptyDir
|
||||
mountPath: "/home/wger/static"
|
||||
wger-config:
|
||||
enabled: "true"
|
||||
enabled: true
|
||||
noMount: true
|
||||
readOnly: true
|
||||
type: "custom"
|
||||
mountPath: "/etc/nginx/conf.d"
|
||||
volumeSpec:
|
||||
configMap:
|
||||
name: '{{ include "tc.common.names.fullname" . }}-wger-nginx-config'
|
||||
items:
|
||||
- key: nginx.conf
|
||||
path: default.conf
|
||||
type: configMap
|
||||
objectName: '{{ include "tc.common.names.fullname" . }}-wger-nginx-config'
|
||||
|
||||
postgresql:
|
||||
enabled: true
|
||||
|
|
Loading…
Reference in New Issue