diff --git a/charts/netbox/Chart.yaml b/charts/netbox/Chart.yaml index b1cd23d..c18cb23 100644 --- a/charts/netbox/Chart.yaml +++ b/charts/netbox/Chart.yaml @@ -1,10 +1,10 @@ --- apiVersion: v1 -appVersion: "2.9.2" +appVersion: "2.9.10" description: | 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 name: netbox -version: 1.1.6 +version: 2.0.0 diff --git a/charts/netbox/templates/_helpers.tpl b/charts/netbox/templates/_helpers.tpl index cc61ddf..8d6c3a6 100644 --- a/charts/netbox/templates/_helpers.tpl +++ b/charts/netbox/templates/_helpers.tpl @@ -39,7 +39,7 @@ Create chart name and version as used by the chart label. Get the correct image tag name */}} {{- define "netbox.imageTag" -}} -{{- .Values.image.tag | default (printf "v%s-ldap" .Chart.AppVersion) -}} +{{- .Values.image.tag | default (printf "v%s" .Chart.AppVersion) -}} {{- end -}} {{/* diff --git a/charts/netbox/templates/configuration.yaml b/charts/netbox/templates/configuration.yaml index b67a3c5..fc1a0b8 100644 --- a/charts/netbox/templates/configuration.yaml +++ b/charts/netbox/templates/configuration.yaml @@ -9,17 +9,10 @@ metadata: app.kubernetes.io/managed-by: {{ .Release.Service }} helm.sh/chart: {{ include "netbox.chart" . }} 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_USER: {{ .Values.postgresql.postgresqlUsername | quote }} DB_HOST: {{ .Values.postgresql.postgresqlHost | default (include "netbox.postgresql.fullname" .) }} DB_PORT: {{ .Values.postgresql.postgresqlPort | default 5432 | quote }} -{{- end }} REDIS_HOST: {{ include "netbox.redisHost" . }} REDIS_PORT: {{ .Values.redis.redisPort | quote }} diff --git a/charts/netbox/templates/deployment.yaml b/charts/netbox/templates/deployment.yaml index eee7f38..6f1307f 100644 --- a/charts/netbox/templates/deployment.yaml +++ b/charts/netbox/templates/deployment.yaml @@ -77,7 +77,7 @@ spec: mountPath: /opt/netbox/netbox/static {{- if .Values.useUnixSocket }} - name: netbox-config-files - mountPath: /etc/netbox/config/gunicorn_config.py + mountPath: /etc/netbox/gunicorn_config.py subPath: gunicorn_config.py readOnly: true - name: netbox-socket @@ -99,11 +99,13 @@ spec: - name: http containerPort: 8080 protocol: TCP + - name: status + containerPort: 8081 + protocol: TCP livenessProbe: httpGet: - port: http - path: / - initialDelaySeconds: 30 + port: status + path: /stub_status readinessProbe: httpGet: port: http diff --git a/charts/netbox/templates/nginx-config.yaml b/charts/netbox/templates/nginx-config.yaml index e72f88d..bf61a5b 100644 --- a/charts/netbox/templates/nginx-config.yaml +++ b/charts/netbox/templates/nginx-config.yaml @@ -36,7 +36,7 @@ data: sendfile on; tcp_nopush on; keepalive_timeout 65; - gzip off; + gzip on; server_tokens off; client_max_body_size 10M; @@ -44,7 +44,7 @@ data: {{- if .Values.useUnixSocket }} server unix:/tmp/netbox/gunicorn.sock fail_timeout=0; {{- else }} - server http://localhost:8001 fail_timeout=0; + server localhost:8001 fail_timeout=0; {{- end }} } @@ -57,11 +57,20 @@ data: } location / { - proxy_pass http://netbox; + proxy_pass http://netbox; proxy_set_header X-Forwarded-Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-Proto $scheme; 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; + } + } } diff --git a/charts/netbox/templates/secrets.yaml b/charts/netbox/templates/secrets.yaml index 38fc10a..c8ec996 100644 --- a/charts/netbox/templates/secrets.yaml +++ b/charts/netbox/templates/secrets.yaml @@ -9,9 +9,7 @@ metadata: app.kubernetes.io/managed-by: {{ .Release.Service }} helm.sh/chart: {{ include "netbox.chart" . }} data: -{{- if .Values.database }} - DB_PASSWORD: {{ .Values.database.password | b64enc }} -{{- else if and (.Values.postgresql.postgresqlPassword) (not .Values.postgresql.enabled) }} +{{- if and (.Values.postgresql.postgresqlPassword) (not .Values.postgresql.enabled) }} DB_PASSWORD: {{ .Values.postgresql.postgresqlPassword | b64enc }} {{- end }} {{- if .Values.djangoSecret }} diff --git a/charts/netbox/values.yaml b/charts/netbox/values.yaml index 0d07c25..456d1c8 100644 --- a/charts/netbox/values.yaml +++ b/charts/netbox/values.yaml @@ -7,7 +7,7 @@ replicaCount: 1 image: repository: netboxcommunity/netbox - # tag: v2.7.12-ldap + # tag: pullPolicy: Always nameOverride: "" @@ -37,9 +37,6 @@ ingress: # hosts: # - chart-example.local -# Deprecated database keys -# database: - postgresql: enabled: true @@ -72,7 +69,7 @@ redis: # existingDjangoSecret: netbox-django-secret # existingDjangoSecretKey: secret_key -useUnixSocket: true +useUnixSocket: false extraEnv: {} # EMAIL_SERVER: localhost