netbox: Update chart to version 2.9.10

NB; This is a larger change, especially for use with LDAP
This commit is contained in:
Alexander Olofsson 2020-11-30 16:05:06 +01:00
parent ccdf647e27
commit 65b8221ae5
No known key found for this signature in database
GPG key ID: D439C9470CB04C73
7 changed files with 25 additions and 26 deletions

View file

@ -1,10 +1,10 @@
--- ---
apiVersion: v1 apiVersion: v1
appVersion: "2.9.2" appVersion: "2.9.10"
description: | description: |
An IP address management (IPAM) and data center infrastructure management (DCIM) tool. An IP address management (IPAM) and data center infrastructure management (DCIM) tool.
NB; Not patched yet to support LDAP with v2.9, avoid updating for now if LDAP authentication is in use. Important; LDAP will require reconfiguring when upgrading to chart version 2.0.0
icon: https://raw.githubusercontent.com/digitalocean/netbox/develop/netbox/project-static/img/netbox.ico icon: https://raw.githubusercontent.com/digitalocean/netbox/develop/netbox/project-static/img/netbox.ico
name: netbox name: netbox
version: 1.1.6 version: 2.0.0

View file

@ -39,7 +39,7 @@ Create chart name and version as used by the chart label.
Get the correct image tag name Get the correct image tag name
*/}} */}}
{{- define "netbox.imageTag" -}} {{- define "netbox.imageTag" -}}
{{- .Values.image.tag | default (printf "v%s-ldap" .Chart.AppVersion) -}} {{- .Values.image.tag | default (printf "v%s" .Chart.AppVersion) -}}
{{- end -}} {{- end -}}
{{/* {{/*

View file

@ -9,17 +9,10 @@ metadata:
app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/managed-by: {{ .Release.Service }}
helm.sh/chart: {{ include "netbox.chart" . }} helm.sh/chart: {{ include "netbox.chart" . }}
data: data:
{{- if .Values.database }}
DB_NAME: {{ .Values.database.database | default "netbox" | quote }}
DB_USER: {{ .Values.database.user | default "netbox" | quote }}
DB_HOST: {{ .Values.database.host | quote }}
DB_PORT: {{ .Values.database.port | default 5432 | quote }}
{{- else }}
DB_NAME: {{ .Values.postgresql.postgresqlDatabase | quote }} DB_NAME: {{ .Values.postgresql.postgresqlDatabase | quote }}
DB_USER: {{ .Values.postgresql.postgresqlUsername | quote }} DB_USER: {{ .Values.postgresql.postgresqlUsername | quote }}
DB_HOST: {{ .Values.postgresql.postgresqlHost | default (include "netbox.postgresql.fullname" .) }} DB_HOST: {{ .Values.postgresql.postgresqlHost | default (include "netbox.postgresql.fullname" .) }}
DB_PORT: {{ .Values.postgresql.postgresqlPort | default 5432 | quote }} DB_PORT: {{ .Values.postgresql.postgresqlPort | default 5432 | quote }}
{{- end }}
REDIS_HOST: {{ include "netbox.redisHost" . }} REDIS_HOST: {{ include "netbox.redisHost" . }}
REDIS_PORT: {{ .Values.redis.redisPort | quote }} REDIS_PORT: {{ .Values.redis.redisPort | quote }}

View file

@ -77,7 +77,7 @@ spec:
mountPath: /opt/netbox/netbox/static mountPath: /opt/netbox/netbox/static
{{- if .Values.useUnixSocket }} {{- if .Values.useUnixSocket }}
- name: netbox-config-files - name: netbox-config-files
mountPath: /etc/netbox/config/gunicorn_config.py mountPath: /etc/netbox/gunicorn_config.py
subPath: gunicorn_config.py subPath: gunicorn_config.py
readOnly: true readOnly: true
- name: netbox-socket - name: netbox-socket
@ -99,11 +99,13 @@ spec:
- name: http - name: http
containerPort: 8080 containerPort: 8080
protocol: TCP protocol: TCP
- name: status
containerPort: 8081
protocol: TCP
livenessProbe: livenessProbe:
httpGet: httpGet:
port: http port: status
path: / path: /stub_status
initialDelaySeconds: 30
readinessProbe: readinessProbe:
httpGet: httpGet:
port: http port: http

View file

@ -36,7 +36,7 @@ data:
sendfile on; sendfile on;
tcp_nopush on; tcp_nopush on;
keepalive_timeout 65; keepalive_timeout 65;
gzip off; gzip on;
server_tokens off; server_tokens off;
client_max_body_size 10M; client_max_body_size 10M;
@ -44,7 +44,7 @@ data:
{{- if .Values.useUnixSocket }} {{- if .Values.useUnixSocket }}
server unix:/tmp/netbox/gunicorn.sock fail_timeout=0; server unix:/tmp/netbox/gunicorn.sock fail_timeout=0;
{{- else }} {{- else }}
server http://localhost:8001 fail_timeout=0; server localhost:8001 fail_timeout=0;
{{- end }} {{- end }}
} }
@ -57,11 +57,20 @@ data:
} }
location / { location / {
proxy_pass http://netbox; proxy_pass http://netbox;
proxy_set_header X-Forwarded-Host $http_host; proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Proto $scheme;
add_header P3P 'CP="ALL DSP COR PSAa PSDa OUR NOR ONL UNI COM NAV"'; add_header P3P 'CP="ALL DSP COR PSAa PSDa OUR NOR ONL UNI COM NAV"';
} }
} }
server {
listen 8081;
access_log off;
location = /stub_status {
stub_status;
}
}
} }

View file

@ -9,9 +9,7 @@ metadata:
app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/managed-by: {{ .Release.Service }}
helm.sh/chart: {{ include "netbox.chart" . }} helm.sh/chart: {{ include "netbox.chart" . }}
data: data:
{{- if .Values.database }} {{- if and (.Values.postgresql.postgresqlPassword) (not .Values.postgresql.enabled) }}
DB_PASSWORD: {{ .Values.database.password | b64enc }}
{{- else if and (.Values.postgresql.postgresqlPassword) (not .Values.postgresql.enabled) }}
DB_PASSWORD: {{ .Values.postgresql.postgresqlPassword | b64enc }} DB_PASSWORD: {{ .Values.postgresql.postgresqlPassword | b64enc }}
{{- end }} {{- end }}
{{- if .Values.djangoSecret }} {{- if .Values.djangoSecret }}

View file

@ -7,7 +7,7 @@ replicaCount: 1
image: image:
repository: netboxcommunity/netbox repository: netboxcommunity/netbox
# tag: v2.7.12-ldap # tag:
pullPolicy: Always pullPolicy: Always
nameOverride: "" nameOverride: ""
@ -37,9 +37,6 @@ ingress:
# hosts: # hosts:
# - chart-example.local # - chart-example.local
# Deprecated database keys
# database:
postgresql: postgresql:
enabled: true enabled: true
@ -72,7 +69,7 @@ redis:
# existingDjangoSecret: netbox-django-secret # existingDjangoSecret: netbox-django-secret
# existingDjangoSecretKey: secret_key # existingDjangoSecretKey: secret_key
useUnixSocket: true useUnixSocket: false
extraEnv: {} extraEnv: {}
# EMAIL_SERVER: localhost # EMAIL_SERVER: localhost