netbox: Update to 3.5.0
This also adds in proper plugin configuration as well as making the build-in Redis optional - but still requiring _a_ Redis install for regular operation
This commit is contained in:
parent
f7f49a8370
commit
cb3833bfcd
7 changed files with 105 additions and 26 deletions
|
@ -7,10 +7,10 @@ description: |
|
||||||
Important; With chart version 4.0.0 there are major upgrades to the packaged Redis and Postgres,
|
Important; With chart version 4.0.0 there are major upgrades to the packaged Redis and Postgres,
|
||||||
as well as a major version bump of Netbox that introduces housekeeping. Take care when upgrading.
|
as well as a major version bump of Netbox that introduces housekeeping. Take care when upgrading.
|
||||||
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
|
||||||
appVersion: 3.4.10
|
appVersion: 3.5.0
|
||||||
|
|
||||||
type: application
|
type: application
|
||||||
version: 5.1.1
|
version: 5.2.0
|
||||||
maintainers:
|
maintainers:
|
||||||
- name: Alexander Olofsson
|
- name: Alexander Olofsson
|
||||||
email: ace@haxalot.com
|
email: ace@haxalot.com
|
||||||
|
@ -23,3 +23,4 @@ dependencies:
|
||||||
- name: redis
|
- name: redis
|
||||||
version: ^17.3.17
|
version: ^17.3.17
|
||||||
repository: https://charts.bitnami.com/bitnami
|
repository: https://charts.bitnami.com/bitnami
|
||||||
|
condition: redis.enabled
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
{{- if and (not .Values.redis.enabled) (not .Values.redis.host) }}
|
||||||
|
{{ fail "Redis host must be provided if built-in redis is disabled" }}
|
||||||
|
{{- end }}
|
||||||
{{- if .Values.extraConfiguration }}
|
{{- if .Values.extraConfiguration }}
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
@ -10,7 +13,23 @@ 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:
|
||||||
extra.py: {{ .Values.extraConfiguration | toYaml | indent 2 }}
|
extra.py: |
|
||||||
|
{{- .Values.extraConfiguration | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.extraPlugins }}
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: {{ .Chart.Name }}-plugins
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: {{ include "netbox.name" . }}
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
|
helm.sh/chart: {{ include "netbox.chart" . }}
|
||||||
|
data:
|
||||||
|
plugins.py: |
|
||||||
|
{{- .Values.extraPlugins | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
@ -28,7 +47,7 @@ data:
|
||||||
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 }}
|
||||||
|
|
||||||
REDIS_HOST: {{ include "netbox.redisHost" . }}
|
REDIS_HOST: {{ .Values.redis.host | default (include "netbox.redisHost" .) }}
|
||||||
REDIS_PORT: {{ .Values.redis.master.service.port | default 6379 | quote }}
|
REDIS_PORT: {{ .Values.redis.master.service.port | default 6379 | quote }}
|
||||||
REDIS_SSL: "false"
|
REDIS_SSL: "false"
|
||||||
|
|
||||||
|
|
|
@ -33,11 +33,13 @@ spec:
|
||||||
image: "{{ .Values.image.repository }}:{{ include "netbox.imageTag" . }}"
|
image: "{{ .Values.image.repository }}:{{ include "netbox.imageTag" . }}"
|
||||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
env:
|
env:
|
||||||
|
{{- if and (or .Values.redis.auth.existingSecret .Values.redis.enabled) (not .Values.redis.auth.password) }}
|
||||||
- name: REDIS_PASSWORD
|
- name: REDIS_PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: {{ include "netbox.redis.fullname" . }}
|
name: {{ .Values.redis.auth.existingSecret | default (include "netbox.redis.fullname" .) }}
|
||||||
key: redis-password
|
key: {{ .Values.redis.auth.existingSecretPasswordKey | default "redis-password" }}
|
||||||
|
{{- end }}
|
||||||
{{- if .Values.postgresql.enabled }}
|
{{- if .Values.postgresql.enabled }}
|
||||||
- name: DB_PASSWORD
|
- name: DB_PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
|
@ -57,21 +59,35 @@ spec:
|
||||||
name: {{ include "netbox.fullname" . }}
|
name: {{ include "netbox.fullname" . }}
|
||||||
resources:
|
resources:
|
||||||
{{- toYaml .Values.housekeeping.resources | nindent 12 }}
|
{{- toYaml .Values.housekeeping.resources | nindent 12 }}
|
||||||
{{- if .Values.extraConfiguration }}
|
{{- if or .Values.extraConfiguration .Values.extraPlugins }}
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
|
{{- if .Values.extraConfiguration }}
|
||||||
- name: netbox-extra-config
|
- name: netbox-extra-config
|
||||||
mountPath: /etc/netbox/config/extra.py
|
mountPath: /etc/netbox/config/extra.py
|
||||||
subPath: extra.py
|
subPath: extra.py
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if .Values.extraPlugins }}
|
||||||
|
- name: netbox-extra-plugins
|
||||||
|
mountPath: /etc/netbox/config/plugins.py
|
||||||
|
subPath: plugins.py
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
{{- with .Values.housekeeping.nodeSelector }}
|
{{- with .Values.housekeeping.nodeSelector }}
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.extraConfiguration }}
|
|
||||||
volumes:
|
volumes:
|
||||||
|
{{- if or .Values.extraConfiguration .Values.extraPlugins }}
|
||||||
|
{{- if .Values.extraConfiguration }}
|
||||||
- name: netbox-extra-config
|
- name: netbox-extra-config
|
||||||
configMap:
|
configMap:
|
||||||
name: {{ .Chart.Name }}-extra
|
name: {{ .Chart.Name }}-extra
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.extraPlugins }}
|
||||||
|
- name: netbox-extra-plugins
|
||||||
|
configMap:
|
||||||
|
name: {{ .Chart.Name }}-plugins
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Values.housekeeping.affinity }}
|
{{- with .Values.housekeeping.affinity }}
|
||||||
affinity:
|
affinity:
|
||||||
|
|
|
@ -35,11 +35,13 @@ spec:
|
||||||
image: "{{ .Values.image.repository }}:{{ include "netbox.imageTag" . }}"
|
image: "{{ .Values.image.repository }}:{{ include "netbox.imageTag" . }}"
|
||||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
env:
|
env:
|
||||||
|
{{- if and (or .Values.redis.auth.existingSecret .Values.redis.enabled) (not .Values.redis.auth.password) }}
|
||||||
- name: REDIS_PASSWORD
|
- name: REDIS_PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: {{ include "netbox.redis.fullname" . }}
|
name: {{ .Values.redis.auth.existingSecret | default (include "netbox.redis.fullname" .) }}
|
||||||
key: redis-password
|
key: {{ .Values.redis.auth.existingSecretPasswordKey | default "redis-password" }}
|
||||||
|
{{- end }}
|
||||||
{{- if .Values.postgresql.enabled }}
|
{{- if .Values.postgresql.enabled }}
|
||||||
- name: DB_PASSWORD
|
- name: DB_PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
|
@ -59,21 +61,35 @@ spec:
|
||||||
name: {{ include "netbox.fullname" . }}
|
name: {{ include "netbox.fullname" . }}
|
||||||
resources:
|
resources:
|
||||||
{{- toYaml .Values.worker.resources | nindent 12 }}
|
{{- toYaml .Values.worker.resources | nindent 12 }}
|
||||||
{{- if .Values.extraConfiguration }}
|
{{- if or .Values.extraConfiguration .Values.extraPlugins }}
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
|
{{- if .Values.extraConfiguration }}
|
||||||
- name: netbox-extra-config
|
- name: netbox-extra-config
|
||||||
mountPath: /etc/netbox/config/extra.py
|
mountPath: /etc/netbox/config/extra.py
|
||||||
subPath: extra.py
|
subPath: extra.py
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if .Values.extraPlugins }}
|
||||||
|
- name: netbox-extra-plugins
|
||||||
|
mountPath: /etc/netbox/config/plugins.py
|
||||||
|
subPath: plugins.py
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
{{- with .Values.worker.nodeSelector }}
|
{{- with .Values.worker.nodeSelector }}
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.extraConfiguration }}
|
{{- if or .Values.extraConfiguration .Values.extraPlugins }}
|
||||||
volumes:
|
volumes:
|
||||||
|
{{- if .Values.extraConfiguration }}
|
||||||
- name: netbox-extra-config
|
- name: netbox-extra-config
|
||||||
configMap:
|
configMap:
|
||||||
name: {{ .Chart.Name }}-extra
|
name: {{ .Chart.Name }}-extra
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.extraPlugins }}
|
||||||
|
- name: netbox-extra-plugins
|
||||||
|
configMap:
|
||||||
|
name: {{ .Chart.Name }}-plugins
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Values.worker.affinity }}
|
{{- with .Values.worker.affinity }}
|
||||||
affinity:
|
affinity:
|
||||||
|
|
|
@ -39,11 +39,13 @@ spec:
|
||||||
image: "{{ .Values.image.repository }}:{{ include "netbox.imageTag" . }}"
|
image: "{{ .Values.image.repository }}:{{ include "netbox.imageTag" . }}"
|
||||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
env:
|
env:
|
||||||
|
{{- if and (or .Values.redis.auth.existingSecret .Values.redis.enabled) (not .Values.redis.auth.password) }}
|
||||||
- name: REDIS_PASSWORD
|
- name: REDIS_PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: {{ include "netbox.redis.fullname" . }}
|
name: {{ .Values.redis.auth.existingSecret | default (include "netbox.redis.fullname" .) }}
|
||||||
key: redis-password
|
key: {{ .Values.redis.auth.existingSecretPasswordKey | default "redis-password" }}
|
||||||
|
{{- end }}
|
||||||
{{- if .Values.existingDjangoSecret }}
|
{{- if .Values.existingDjangoSecret }}
|
||||||
- name: SECRET_KEY
|
- name: SECRET_KEY
|
||||||
valueFrom:
|
valueFrom:
|
||||||
|
@ -94,6 +96,11 @@ spec:
|
||||||
mountPath: /etc/netbox/config/extra.py
|
mountPath: /etc/netbox/config/extra.py
|
||||||
subPath: extra.py
|
subPath: extra.py
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if .Values.extraPlugins }}
|
||||||
|
- name: netbox-extra-plugins
|
||||||
|
mountPath: /etc/netbox/config/plugins.py
|
||||||
|
subPath: plugins.py
|
||||||
|
{{- end }}
|
||||||
{{- with .Values.extraVolumeMounts }}
|
{{- with .Values.extraVolumeMounts }}
|
||||||
{{ toYaml . | nindent 12 }}
|
{{ toYaml . | nindent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -114,6 +121,11 @@ spec:
|
||||||
configMap:
|
configMap:
|
||||||
name: {{ .Chart.Name }}-extra
|
name: {{ .Chart.Name }}-extra
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if .Values.extraPlugins }}
|
||||||
|
- name: netbox-extra-plugins
|
||||||
|
configMap:
|
||||||
|
name: {{ .Chart.Name }}-plugins
|
||||||
|
{{- end }}
|
||||||
{{- if .Values.extraVolumes }}
|
{{- if .Values.extraVolumes }}
|
||||||
{{ toYaml .Values.extraVolumes | nindent 8 }}
|
{{ toYaml .Values.extraVolumes | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -12,6 +12,9 @@ data:
|
||||||
{{- if and (.Values.postgresql.auth.password) (not .Values.postgresql.enabled) }}
|
{{- if and (.Values.postgresql.auth.password) (not .Values.postgresql.enabled) }}
|
||||||
DB_PASSWORD: {{ .Values.postgresql.auth.password | b64enc }}
|
DB_PASSWORD: {{ .Values.postgresql.auth.password | b64enc }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if .Values.redis.auth.password }}
|
||||||
|
REDIS_PASSWORD: {{ .Values.redis.auth.password | b64enc }}
|
||||||
|
{{- end }}
|
||||||
{{- if .Values.djangoSecret }}
|
{{- if .Values.djangoSecret }}
|
||||||
SECRET_KEY: {{ .Values.djangoSecret | b64enc }}
|
SECRET_KEY: {{ .Values.djangoSecret | b64enc }}
|
||||||
{{- else if not .Values.existingDjangoSecret }}
|
{{- else if not .Values.existingDjangoSecret }}
|
||||||
|
|
|
@ -56,11 +56,17 @@ postgresql:
|
||||||
# postgresqlHost: postgres
|
# postgresqlHost: postgres
|
||||||
# postgresqlPort: 5432
|
# postgresqlPort: 5432
|
||||||
|
|
||||||
|
# For standalone redis, set enabled=false and host to your redis server
|
||||||
redis:
|
redis:
|
||||||
|
enabled: true
|
||||||
|
# host: example.com
|
||||||
|
|
||||||
architecture: standalone
|
architecture: standalone
|
||||||
auth:
|
auth:
|
||||||
enabled: true
|
enabled: true
|
||||||
# password: netbox
|
# password: netbox
|
||||||
|
# existingSecret:
|
||||||
|
# existingSecretPasswordKey:
|
||||||
|
|
||||||
master:
|
master:
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
|
@ -81,18 +87,29 @@ extraEnv: {}
|
||||||
# EMAIL_USERNAME: netbox
|
# EMAIL_USERNAME: netbox
|
||||||
# EMAIL_TIMEOUT: 5
|
# EMAIL_TIMEOUT: 5
|
||||||
# EMAIL_FROM: netbox@example.com
|
# EMAIL_FROM: netbox@example.com
|
||||||
# NAPALM_USERNAME: ''
|
|
||||||
# NAPALM_TIMEOUT: 10
|
|
||||||
# MAX_PAGE_SIZE: 1000
|
# MAX_PAGE_SIZE: 1000
|
||||||
# WEBHOOKS_ENABLED: true
|
# WEBHOOKS_ENABLED: true
|
||||||
|
|
||||||
extraSecrets: {}
|
extraSecrets: {}
|
||||||
# EMAIL_PASSWORD: netbox
|
# EMAIL_PASSWORD: netbox
|
||||||
# NAPALM_PASSWORD: ''
|
|
||||||
|
|
||||||
# Ends up stored as extra.py in the netbox configuration
|
# Ends up stored as extra.py in the netbox configuration, must be valid Python
|
||||||
extraConfiguration: ''
|
extraConfiguration: ''
|
||||||
|
|
||||||
|
# Will be stored in plugins.py in the netbox configuration, requires
|
||||||
|
# using/building a netbox image containing the required plugins, must be valid
|
||||||
|
# Python
|
||||||
|
#
|
||||||
|
# https://github.com/netbox-community/netbox-docker/wiki/Using-Netbox-Plugins
|
||||||
|
extraPlugins: ''
|
||||||
|
# PLUGINS = ["netbox_bgp"]
|
||||||
|
#
|
||||||
|
# PLUGINS_CONFIG = {
|
||||||
|
# "netbox_bgp": {
|
||||||
|
# ADD YOUR SETTINGS HERE
|
||||||
|
# }
|
||||||
|
# }
|
||||||
|
|
||||||
superuser:
|
superuser:
|
||||||
name: ''
|
name: ''
|
||||||
email: ''
|
email: ''
|
||||||
|
@ -116,10 +133,6 @@ affinity: {}
|
||||||
extraVolumes: []
|
extraVolumes: []
|
||||||
|
|
||||||
extraVolumeMounts: []
|
extraVolumeMounts: []
|
||||||
# - name: extra-music-data
|
|
||||||
# mountPath: /srv/funkwhale/data/music
|
|
||||||
# readOnly: true
|
|
||||||
# existingClaim: volume-claim
|
|
||||||
|
|
||||||
persistence:
|
persistence:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
@ -147,9 +160,8 @@ worker:
|
||||||
|
|
||||||
affinity: {}
|
affinity: {}
|
||||||
|
|
||||||
|
# Handles the Netbox 3.0+ housekeeping pod
|
||||||
housekeeping:
|
housekeeping:
|
||||||
## Netbox 3.0.0 and upwards need a housekeeping pod, if you're not using
|
|
||||||
## 3.0 then you may need to set this parameter
|
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
||||||
resources: {}
|
resources: {}
|
||||||
|
|
Loading…
Reference in a new issue