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:
Stavros Kois 2022-09-03 11:01:51 +03:00 committed by GitHub
parent b8c8523b85
commit ab8f8e2679
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 26 additions and 25 deletions

View File

@ -28,7 +28,7 @@ sources:
- https://github.com/truecharts/charts/tree/master/charts/stable/inventree - https://github.com/truecharts/charts/tree/master/charts/stable/inventree
- https://inventree.readthedocs.io - https://inventree.readthedocs.io
- https://github.com/inventree/InvenTree - https://github.com/inventree/InvenTree
version: 4.0.6 version: 4.0.7
annotations: annotations:
truecharts.org/catagories: | truecharts.org/catagories: |
- utilities - utilities

View File

@ -2,6 +2,8 @@
{{- define "inventree.config" -}} {{- define "inventree.config" -}}
{{- $configName := printf "%s-inventree-config" (include "tc.common.names.fullname" .) }} {{- $configName := printf "%s-inventree-config" (include "tc.common.names.fullname" .) }}
{{- $nginxConfigName := printf "%s-inventree-config-nginx" (include "tc.common.names.fullname" .) }}
--- ---
apiVersion: v1 apiVersion: v1
@ -51,6 +53,14 @@ data:
{{- with .Values.inventree.general.login_attempts }} {{- with .Values.inventree.general.login_attempts }}
INVENTREE_LOGIN_ATTEMPTS: {{ . | quote }} INVENTREE_LOGIN_ATTEMPTS: {{ . | quote }}
{{- end }} {{- end }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ $nginxConfigName }}
labels:
{{- include "tc.common.labels" . | nindent 4 }}
data:
nginx.conf: |- nginx.conf: |-
server { server {
listen {{ .Values.service.main.ports.main.port }}; listen {{ .Values.service.main.ports.main.port }};

View File

@ -1,19 +1,19 @@
{{/* Define the nginx container */}} {{/* Define the nginx container */}}
{{- define "inventree.nginx" -}} {{- define "inventree.nginx" -}}
image: {{ .Values.nginxImage.repository }}:{{ .Values.nginxImage.tag }} image: {{ .Values.nginxImage.repository }}:{{ .Values.nginxImage.tag }}
imagePullPolicy: '{{ .Values.nginxImage.pullPolicy }}' imagePullPolicy: {{ .Values.nginxImage.pullPolicy }}
securityContext:
runAsUser: {{ .Values.podSecurityContext.runAsUser }}
runAsGroup: {{ .Values.podSecurityContext.runAsGroup }}
readOnlyRootFilesystem: {{ .Values.securityContext.readOnlyRootFilesystem }}
runAsNonRoot: {{ .Values.securityContext.runAsNonRoot }}
ports: ports:
- containerPort: {{ .Values.service.main.ports.main.port }} - containerPort: {{ .Values.service.main.ports.main.port }}
name: main name: main
securityContext:
runAsUser: 0
runAsGroup: {{ .Values.podSecurityContext.runAsGroup }}
readOnlyRootFilesystem: false
runAsNonRoot: false
volumeMounts: volumeMounts:
- name: inventree-nginx - name: inventree-nginx
mountPath: "/etc/nginx/conf.d/default.conf" mountPath: "/etc/nginx/conf.d/default.conf"
subPath: nginx.conf subPath: default.conf
readOnly: true readOnly: true
- name: data - name: data
mountPath: "/var/www" mountPath: "/var/www"

View File

@ -6,6 +6,7 @@ image:
nginxImage: nginxImage:
repository: tccr.io/truecharts/nginx repository: tccr.io/truecharts/nginx
tag: v1.23.1@sha256:1620254cd011e2b81361f1f4682fd6cceadf13b07f8e37f322b60407d6d5a766 tag: v1.23.1@sha256:1620254cd011e2b81361f1f4682fd6cceadf13b07f8e37f322b60407d6d5a766
pullPolicy: IfNotPresent
securityContext: securityContext:
readOnlyRootFilesystem: false readOnlyRootFilesystem: false
@ -53,13 +54,10 @@ persistence:
enabled: true enabled: true
mountPath: "/home/inventree/data" mountPath: "/home/inventree/data"
inventree-nginx: inventree-nginx:
enabled: "true" enabled: true
noMount: true noMount: true
subPath: "nginx.conf" type: configMap
type: "custom" objectName: '{{ include "tc.common.names.fullname" . }}-inventree-config-nginx'
volumeSpec:
configMap:
name: '{{ include "tc.common.names.fullname" . }}-inventree-config'
postgresql: postgresql:
enabled: true enabled: true

View File

@ -27,7 +27,7 @@ sources:
- https://github.com/truecharts/charts/tree/master/charts/stable/wger - https://github.com/truecharts/charts/tree/master/charts/stable/wger
- https://github.com/wger-project/wger - https://github.com/wger-project/wger
- https://github.com/wger-project/docker - https://github.com/wger-project/docker
version: 1.1.0 version: 1.1.1
annotations: annotations:
truecharts.org/catagories: | truecharts.org/catagories: |
- life - life

View File

@ -64,17 +64,10 @@ persistence:
type: emptyDir type: emptyDir
mountPath: "/home/wger/static" mountPath: "/home/wger/static"
wger-config: wger-config:
enabled: "true" enabled: true
noMount: true noMount: true
readOnly: true type: configMap
type: "custom" objectName: '{{ include "tc.common.names.fullname" . }}-wger-nginx-config'
mountPath: "/etc/nginx/conf.d"
volumeSpec:
configMap:
name: '{{ include "tc.common.names.fullname" . }}-wger-nginx-config'
items:
- key: nginx.conf
path: default.conf
postgresql: postgresql:
enabled: true enabled: true