feat(netbox) add support for initcontainers

This commit is contained in:
Tommy 2024-01-31 16:26:08 +01:00
parent 3ef8fbeda4
commit ba9d67cef3
No known key found for this signature in database
3 changed files with 30 additions and 1 deletions

View file

@ -4,7 +4,7 @@ description: |
An IP address management (IPAM) and data center infrastructure management (DCIM) tool.
appVersion: v3.7.1
type: application
version: 6.0.0
version: 6.0.1
maintainers:
- name: Tommy Skaug
email: tommy@skaug.me

View file

@ -0,0 +1,20 @@
apiVersion: batch/v1
kind: Job
metadata:
name: {{ include "netbox.fullname" . }}-db-init
labels:
{{- include "netbox.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": pre-install
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
spec:
template:
spec:
restartPolicy: Never
containers:
- name: general-db-init
image: "{{ .Values.initContainers.dbInit.image.repository }}:{{ .Values.initContainers.dbInit.image.tag }}"
envFrom:
- secretRef:
name: {{ .Values.existingSecret }}
backoffLimit: 3

View file

@ -1,5 +1,14 @@
replicaCount: 1
initContainers:
dbInit:
image:
repository: ghcr.io/onedr0p/postgres-init
tag: "16"
envFrom:
- secretRef:
name: netbox-secret
image:
repository: quay.io/netboxcommunity/netbox
tag: v3.7.1