netbox: fix extra.py mounting + other tweaks
All checks were successful
/ diff-and-deploy (push) Successful in 2m10s
All checks were successful
/ diff-and-deploy (push) Successful in 2m10s
This commit is contained in:
parent
b195e2518f
commit
b2dc0fef2a
2 changed files with 16 additions and 4 deletions
|
@ -1,11 +1,16 @@
|
||||||
# based on https://github.com/netbox-community/netbox-docker/blob/release/configuration/extra.py
|
# based on https://github.com/netbox-community/netbox-docker/blob/release/configuration/extra.py
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
# workaround weirdness from netbox container
|
||||||
|
# https://github.com/netbox-community/netbox-docker/issues/1112#issuecomment-2094397332
|
||||||
|
from netbox.configuration.configuration import DATABASE
|
||||||
|
DATABASE['OPTIONS']['sslcertmode'] = 'disable'
|
||||||
|
|
||||||
# Remote authentication support
|
# Remote authentication support
|
||||||
REMOTE_AUTH_ENABLED = True
|
REMOTE_AUTH_ENABLED = True
|
||||||
REMOTE_AUTH_BACKEND = 'netbox.authentication.RemoteUserBackend'
|
REMOTE_AUTH_BACKEND = 'netbox.authentication.RemoteUserBackend'
|
||||||
REMOTE_AUTH_HEADER = 'HTTP_X_FORWARDED_PREFERRED_USERNAME'
|
REMOTE_AUTH_HEADER = 'HTTP_X_FORWARDED_USER'
|
||||||
REMOTE_AUTH_USER_FIRST_NAME = 'HTTP_X_FORWARDED_PREFERRED_USERNAME'
|
REMOTE_AUTH_USER_FIRST_NAME = 'HTTP_X_FORWARDED_USER'
|
||||||
REMOTE_AUTH_USER_LAST_NAME = 'HTTP_REMOTE_USER_LAST_NAME'
|
REMOTE_AUTH_USER_LAST_NAME = 'HTTP_REMOTE_USER_LAST_NAME'
|
||||||
REMOTE_AUTH_USER_EMAIL = 'HTTP_X_FORWARDED_EMAIL'
|
REMOTE_AUTH_USER_EMAIL = 'HTTP_X_FORWARDED_EMAIL'
|
||||||
REMOTE_AUTH_AUTO_CREATE_USER = True
|
REMOTE_AUTH_AUTO_CREATE_USER = True
|
||||||
|
|
|
@ -32,11 +32,18 @@ spec:
|
||||||
key: password
|
key: password
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: netbox-configs
|
- name: netbox-configs
|
||||||
mountPath: /etc/netbox/config/extras
|
mountPath: /etc/netbox/config/extra.py
|
||||||
|
subPath: extra.py
|
||||||
|
readOnly: true
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
memory: "128Mi"
|
memory: "1Gi"
|
||||||
cpu: "500m"
|
cpu: "500m"
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
scheme: HTTP
|
||||||
|
path: /login/?next=/
|
||||||
|
port: 8080
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8080
|
- containerPort: 8080
|
||||||
volumes:
|
volumes:
|
||||||
|
|
Loading…
Add table
Reference in a new issue