2022-04-28 20:00:02 +00:00
|
|
|
image:
|
2022-05-07 21:59:53 +00:00
|
|
|
repository: tccr.io/truecharts/inventree
|
2022-08-12 20:40:58 +00:00
|
|
|
tag: 0.8.1@sha256:6b89f61c3d3eb824fe81689c67f13052d6e733b910e74eece3fb353a54232136
|
2022-04-28 20:00:02 +00:00
|
|
|
pullPolicy: IfNotPresent
|
|
|
|
|
2022-05-06 09:30:47 +00:00
|
|
|
nginxImage:
|
|
|
|
repository: tccr.io/truecharts/nginx
|
2022-08-24 05:37:37 +00:00
|
|
|
tag: v1.23.1@sha256:3f445468e3c79d301cb71dec3966ed0eb79a6a4c9c0bc37d4ce36e9e14b6e798
|
2022-04-28 20:00:02 +00:00
|
|
|
|
|
|
|
securityContext:
|
|
|
|
readOnlyRootFilesystem: false
|
|
|
|
|
|
|
|
podSecurityContext:
|
|
|
|
runAsUser: 100
|
2022-05-06 09:30:47 +00:00
|
|
|
runAsGroup: 0
|
2022-04-28 20:00:02 +00:00
|
|
|
|
2022-06-07 17:41:19 +00:00
|
|
|
secretEnv:
|
2022-04-28 20:00:02 +00:00
|
|
|
INVENTREE_ADMIN_EMAIL: "test@example.com"
|
2022-07-19 09:06:34 +00:00
|
|
|
INVENTREE_ADMIN_USER: "testuser"
|
2022-04-28 20:00:02 +00:00
|
|
|
INVENTREE_ADMIN_PASSWORD: "secret"
|
|
|
|
|
2022-06-07 17:41:19 +00:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-04-28 20:00:02 +00:00
|
|
|
env:
|
2022-07-19 09:06:34 +00:00
|
|
|
INVENTREE_TIMEZONE: "{{ .Values.TZ }}"
|
2022-04-28 20:00:02 +00:00
|
|
|
INVENTREE_DB_ENGINE: "postgresql"
|
|
|
|
INVENTREE_DB_NAME: "{{ .Values.postgresql.postgresqlDatabase }}"
|
|
|
|
INVENTREE_DB_USER: "{{ .Values.postgresql.postgresqlUsername }}"
|
|
|
|
INVENTREE_DB_PORT: "5432"
|
2022-07-19 09:06:34 +00:00
|
|
|
INVENTREE_CACHE_PORT: "6379"
|
|
|
|
INVENTREE_CACHE_HOST:
|
2022-04-28 20:00:02 +00:00
|
|
|
secretKeyRef:
|
2022-07-19 09:06:34 +00:00
|
|
|
name: rediscreds
|
|
|
|
key: plainhostpass
|
2022-04-28 20:00:02 +00:00
|
|
|
INVENTREE_DB_HOST:
|
|
|
|
secretKeyRef:
|
|
|
|
name: dbcreds
|
|
|
|
key: plainhost
|
2022-07-19 09:06:34 +00:00
|
|
|
INVENTREE_DB_PASSWORD:
|
|
|
|
secretKeyRef:
|
|
|
|
name: dbcreds
|
|
|
|
key: postgresql-password
|
2022-04-28 20:00:02 +00:00
|
|
|
INVENTREE_SECRET_KEY:
|
|
|
|
secretKeyRef:
|
|
|
|
name: inventree-secrets
|
|
|
|
key: INVENTREE_SECRET_KEY
|
2022-07-19 09:06:34 +00:00
|
|
|
# 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: ""
|
2022-04-28 20:00:02 +00:00
|
|
|
|
|
|
|
service:
|
|
|
|
main:
|
|
|
|
ports:
|
|
|
|
main:
|
|
|
|
port: 10231
|
2022-05-06 09:30:47 +00:00
|
|
|
targetPort: 10231
|
2022-04-28 20:00:02 +00:00
|
|
|
|
|
|
|
persistence:
|
|
|
|
data:
|
|
|
|
enabled: true
|
|
|
|
mountPath: "/home/inventree/data"
|
2022-06-07 17:41:19 +00:00
|
|
|
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" .) }}'
|
2022-04-28 20:00:02 +00:00
|
|
|
|
|
|
|
initContainers:
|
|
|
|
init-migrate:
|
|
|
|
name: init-migrate
|
|
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
2022-08-09 10:14:27 +00:00
|
|
|
securityContext:
|
|
|
|
runAsUser: "{{ .Values.podSecurityContext.runAsUser }}"
|
|
|
|
runAsGroup: "{{ .Values.podSecurityContext.runAsGroup }}"
|
|
|
|
runAsNonRoot: true
|
2022-04-28 20:00:02 +00:00
|
|
|
volumeMounts:
|
2022-07-22 18:23:01 +00:00
|
|
|
- name: data
|
|
|
|
mountPath: "/home/inventree/data"
|
2022-04-28 20:00:02 +00:00
|
|
|
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"
|
2022-07-19 09:06:34 +00:00
|
|
|
- name: INVENTREE_CACHE_PORT
|
|
|
|
value: "6379"
|
|
|
|
- name: INVENTREE_CACHE_HOST
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: rediscreds
|
|
|
|
key: plainhostpass
|
2022-04-28 20:00:02 +00:00
|
|
|
- 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:
|
2022-07-19 09:06:34 +00:00
|
|
|
- |-
|
2022-04-28 20:00:02 +00:00
|
|
|
cd /home/inventree;
|
|
|
|
invoke update;
|
|
|
|
additionalContainers:
|
2022-05-06 09:30:47 +00:00
|
|
|
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:
|
2022-07-22 18:23:01 +00:00
|
|
|
- name: inventree-config
|
|
|
|
mountPath: "/etc/nginx/conf.d/default.conf"
|
|
|
|
subPath: nginx-config
|
|
|
|
readOnly: true
|
|
|
|
- name: data
|
|
|
|
mountPath: "/var/www"
|
2022-04-28 20:00:02 +00:00
|
|
|
worker:
|
|
|
|
name: worker
|
|
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
|
|
|
command: ["invoke", "worker"]
|
|
|
|
volumeMounts:
|
2022-07-22 18:23:01 +00:00
|
|
|
- name: data
|
|
|
|
mountPath: "/home/inventree/data"
|
2022-04-28 20:00:02 +00:00
|
|
|
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"
|
2022-07-19 09:06:34 +00:00
|
|
|
- name: INVENTREE_CACHE_PORT
|
|
|
|
value: "6379"
|
|
|
|
- name: INVENTREE_CACHE_HOST
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: rediscreds
|
|
|
|
key: plainhostpass
|
2022-04-28 20:00:02 +00:00
|
|
|
- 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
|
2022-07-19 09:06:34 +00:00
|
|
|
|
|
|
|
redis:
|
|
|
|
enabled: true
|
|
|
|
existingSecret: "rediscreds"
|
2022-08-08 21:25:02 +00:00
|
|
|
|
|
|
|
portal:
|
|
|
|
enabled: true
|