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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user