/
values.yaml
236 lines (225 loc) · 6.63 KB
/
values.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
image:
repository: tccr.io/truecharts/inventree
tag: v0.7.5@sha256:7677153653b26249ffb97430b0b95943e820256bbacbb8b4d0cd565759b7ce0b
pullPolicy: IfNotPresent
nginxImage:
repository: tccr.io/truecharts/nginx
tag: v1.23.1@sha256:dd2e66c3774f076a586835ef0313b1a279bcbc53a76dbcab244fa08a0c251f2d
securityContext:
readOnlyRootFilesystem: false
podSecurityContext:
runAsUser: 100
runAsGroup: 0
secretEnv:
INVENTREE_ADMIN_EMAIL: "test@example.com"
INVENTREE_ADMIN_USER: "testuser"
INVENTREE_ADMIN_PASSWORD: "secret"
configmap:
config:
enabled: true
data:
nginx-config: |-
server {
listen 10231;
real_ip_header proxy_protocol;
location / {
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-By $server_addr:$server_port;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header CLIENT_IP $remote_addr;
proxy_pass_request_headers on;
proxy_redirect off;
client_max_body_size 100M;
proxy_buffering off;
proxy_request_buffering off;
proxy_pass http://localhost:8000;
}
# Redirect any requests for static files
location /static/ {
alias /var/www/static/;
autoindex on;
# Caching settings
expires 30d;
add_header Pragma public;
add_header Cache-Control "public";
}
# Redirect any requests for media files
location /media/ {
alias /var/www/media/;
# Media files require user authentication
auth_request /auth;
}
# Use the 'user' API endpoint for auth
location /auth {
internal;
proxy_pass http://localhost:8000/auth/;
proxy_pass_request_body off;
proxy_set_header Content-Length "";
proxy_set_header X-Original-URI $request_uri;
}
}
env:
INVENTREE_TIMEZONE: "{{ .Values.TZ }}"
INVENTREE_DB_ENGINE: "postgresql"
INVENTREE_DB_NAME: "{{ .Values.postgresql.postgresqlDatabase }}"
INVENTREE_DB_USER: "{{ .Values.postgresql.postgresqlUsername }}"
INVENTREE_DB_PORT: "5432"
INVENTREE_CACHE_PORT: "6379"
INVENTREE_CACHE_HOST:
secretKeyRef:
name: rediscreds
key: plainhostpass
INVENTREE_DB_HOST:
secretKeyRef:
name: dbcreds
key: plainhost
INVENTREE_DB_PASSWORD:
secretKeyRef:
name: dbcreds
key: postgresql-password
INVENTREE_SECRET_KEY:
secretKeyRef:
name: inventree-secrets
key: INVENTREE_SECRET_KEY
# User Defined
INVENTREE_DEBUG: false
INVENTREE_LOG_LEVEL: "INFO"
INVENTREE_PLUGINS_ENABLED: false
INVENTREE_LOGIN_CONFIRM_DAYS: 3
INVENTREE_LOGIN_ATTEMPTS: 5
# INVENTREE_EMAIL_BACKEND: "django.core.mail.backends.smtp.EmailBackend"
# INVENTREE_EMAIL_HOST: ""
# INVENTREE_EMAIL_PORT: 587
# INVENTREE_EMAIL_USERNAME: ""
# INVENTREE_EMAIL_PASSWORD: ""
# INVENTREE_EMAIL_TLS: False
# INVENTREE_EMAIL_SSL: False
# INVENTREE_EMAIL_SENDER: ""
service:
main:
ports:
main:
port: 10231
targetPort: 10231
persistence:
data:
enabled: true
mountPath: "/home/inventree/data"
inventree-config:
enabled: "true"
mountPath: "/etc/nginx/nginx.conf"
subPath: "nginx-confing"
type: "custom"
volumeSpec:
configMap:
name: '{{ printf "%v-config" (include "tc.common.names.fullname" .) }}'
initContainers:
init-migrate:
name: init-migrate
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
volumeMounts:
- name: data
mountPath: "/home/inventree/data"
env:
- name: INVENTREE_DB_ENGINE
value: "postgresql"
- name: INVENTREE_DB_NAME
value: "{{ .Values.postgresql.postgresqlDatabase }}"
- name: INVENTREE_DB_USER
value: "{{ .Values.postgresql.postgresqlUsername }}"
- name: INVENTREE_DB_PORT
value: "5432"
- name: INVENTREE_CACHE_PORT
value: "6379"
- name: INVENTREE_CACHE_HOST
valueFrom:
secretKeyRef:
name: rediscreds
key: plainhostpass
- name: INVENTREE_DB_HOST
valueFrom:
secretKeyRef:
name: dbcreds
key: plainhost
- name: INVENTREE_DB_PASSWORD
valueFrom:
secretKeyRef:
name: dbcreds
key: postgresql-password
- name: INVENTREE_SECRET_KEY
valueFrom:
secretKeyRef:
name: inventree-secrets
key: INVENTREE_SECRET_KEY
command: ["sh", "-c"]
args:
- |-
cd /home/inventree;
invoke update;
additionalContainers:
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 }}"
command: ["invoke", "worker"]
volumeMounts:
- name: data
mountPath: "/home/inventree/data"
env:
- name: INVENTREE_DB_ENGINE
value: "postgresql"
- name: INVENTREE_DB_NAME
value: "{{ .Values.postgresql.postgresqlDatabase }}"
- name: INVENTREE_DB_USER
value: "{{ .Values.postgresql.postgresqlUsername }}"
- name: INVENTREE_DB_PORT
value: "5432"
- name: INVENTREE_CACHE_PORT
value: "6379"
- name: INVENTREE_CACHE_HOST
valueFrom:
secretKeyRef:
name: rediscreds
key: plainhostpass
- name: INVENTREE_DB_HOST
valueFrom:
secretKeyRef:
name: dbcreds
key: plainhost
- name: INVENTREE_DB_PASSWORD
valueFrom:
secretKeyRef:
name: dbcreds
key: postgresql-password
- name: INVENTREE_SECRET_KEY
valueFrom:
secretKeyRef:
name: inventree-secrets
key: INVENTREE_SECRET_KEY
postgresql:
enabled: true
existingSecret: "dbcreds"
postgresqlUsername: inventree
postgresqlDatabase: inventree
redis:
enabled: true
existingSecret: "rediscreds"