From e8b01f68b38a5209758324cf9d8cd8a4574146b6 Mon Sep 17 00:00:00 2001 From: Alexander Olofsson Date: Fri, 29 Jan 2021 12:41:41 +0100 Subject: [PATCH] netbox: Redo chart against 1.0.0 of docker image Also upgrades Netbox to version 2.10.4 --- charts/netbox/Chart.yaml | 7 ++-- charts/netbox/templates/deployment.yaml | 54 ++++--------------------- charts/netbox/values.yaml | 2 - 3 files changed, 12 insertions(+), 51 deletions(-) diff --git a/charts/netbox/Chart.yaml b/charts/netbox/Chart.yaml index 00d44aa..06f2e0a 100644 --- a/charts/netbox/Chart.yaml +++ b/charts/netbox/Chart.yaml @@ -1,10 +1,11 @@ --- apiVersion: v1 -appVersion: "2.10.2" +appVersion: "2.10.4" description: | An IP address management (IPAM) and data center infrastructure management (DCIM) tool. - Important; LDAP will require reconfiguring when upgrading to chart version 2.0.0 + Important; With chart version 3.0.0 the old nginx+gunicorn setup is no more, refer to + https://github.com/netbox-community/netbox-docker/releases/tag/1.0.0 for more info. icon: https://raw.githubusercontent.com/digitalocean/netbox/develop/netbox/project-static/img/netbox.ico name: netbox -version: 2.0.4 +version: 3.0.0 diff --git a/charts/netbox/templates/deployment.yaml b/charts/netbox/templates/deployment.yaml index 6f1307f..cf06abf 100644 --- a/charts/netbox/templates/deployment.yaml +++ b/charts/netbox/templates/deployment.yaml @@ -70,57 +70,25 @@ spec: name: {{ include "netbox.fullname" . }} - secretRef: name: {{ include "netbox.fullname" . }} - resources: - {{- toYaml .Values.resources | nindent 12 }} - volumeMounts: - - name: netbox-static-files - mountPath: /opt/netbox/netbox/static - {{- if .Values.useUnixSocket }} - - name: netbox-config-files - mountPath: /etc/netbox/gunicorn_config.py - subPath: gunicorn_config.py - readOnly: true - - name: netbox-socket - mountPath: /tmp/netbox - {{- end }} - - name: data - mountPath: /etc/netbox/media - {{- with .Values.extraVolumeMounts }} - {{ toYaml . | nindent 12 }} - {{- end }} - - name: nginx - image: "nginx:alpine" - imagePullPolicy: Always - command: - - nginx - - -c - - /etc/netbox-nginx/nginx.conf ports: - name: http containerPort: 8080 protocol: TCP - - name: status - containerPort: 8081 - protocol: TCP livenessProbe: httpGet: - port: status - path: /stub_status + port: http + path: / readinessProbe: httpGet: port: http path: / + resources: + {{- toYaml .Values.resources | nindent 12 }} volumeMounts: - - name: netbox-config-files - mountPath: /etc/netbox-nginx/nginx.conf - subPath: nginx.conf - readOnly: true - - name: netbox-static-files - mountPath: /opt/netbox/netbox/static - readOnly: true - {{- if .Values.useUnixSocket }} - - name: netbox-socket - mountPath: /tmp/netbox + - name: data + mountPath: /etc/netbox/media + {{- with .Values.extraVolumeMounts }} + {{ toYaml . | nindent 12 }} {{- end }} {{- with .Values.nodeSelector }} nodeSelector: @@ -130,12 +98,6 @@ spec: - name: netbox-config-files configMap: name: {{ .Chart.Name }}-config-files - - name: netbox-static-files - emptyDir: {} - {{- if .Values.useUnixSocket }} - - name: netbox-socket - emptyDir: {} - {{- end }} - name: data {{- if .Values.persistence.enabled }} persistentVolumeClaim: diff --git a/charts/netbox/values.yaml b/charts/netbox/values.yaml index 456d1c8..a05de71 100644 --- a/charts/netbox/values.yaml +++ b/charts/netbox/values.yaml @@ -69,8 +69,6 @@ redis: # existingDjangoSecret: netbox-django-secret # existingDjangoSecretKey: secret_key -useUnixSocket: false - extraEnv: {} # EMAIL_SERVER: localhost # EMAIL_PORT: 25