78 lines
2.5 KiB
YAML
78 lines
2.5 KiB
YAML
|
{{- if .Values.ingress.enabled -}}
|
||
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: {{ include "netbox.fullname" . }}-worker
|
||
|
labels:
|
||
|
app.kubernetes.io/name: {{ include "netbox.name" . }}-worker
|
||
|
helm.sh/chart: {{ include "netbox.chart" . }}
|
||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||
|
spec:
|
||
|
replicas: {{ .Values.worker.replicaCount }}
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
app.kubernetes.io/name: {{ include "netbox.name" . }}-worker
|
||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
app.kubernetes.io/name: {{ include "netbox.name" . }}-worker
|
||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||
|
spec:
|
||
|
containers:
|
||
|
- name: {{ .Chart.Name }}-worker
|
||
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||
|
command:
|
||
|
- python3
|
||
|
- /opt/netbox/netbox/manage.py
|
||
|
args:
|
||
|
- rqworker
|
||
|
envFrom:
|
||
|
- configMapRef:
|
||
|
name: {{ include "netbox.fullname" . }}
|
||
|
- secretRef:
|
||
|
name: {{ include "netbox.fullname" . }}
|
||
|
resources:
|
||
|
{{- toYaml .Values.worker.resources | nindent 12 }}
|
||
|
volumeMounts:
|
||
|
- name: netbox-configuration
|
||
|
path: /etc/netbox/config
|
||
|
readOnly: true
|
||
|
- name: netbox-initializers
|
||
|
path: /opt/netbox/initializers
|
||
|
readOnly: true
|
||
|
- name: netbox-startup-scripts
|
||
|
path: /opt/netbox/startup_scripts
|
||
|
readOnly: true
|
||
|
- name: netbox-reports
|
||
|
path: /opt/netbox/reports
|
||
|
readOnly: true
|
||
|
{{- with .Values.worker.nodeSelector }}
|
||
|
nodeSelector:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
|
volumes:
|
||
|
- name: netbox-configuration
|
||
|
configMap:
|
||
|
name: {{ .Chart.Name }}-configuration
|
||
|
- name: netbox-initializers
|
||
|
configMap:
|
||
|
name: {{ .Chart.Name }}-initializers
|
||
|
- name: netbox-reports
|
||
|
configMap:
|
||
|
name: {{ .Chart.Name }}-reports
|
||
|
- name: netbox-startup-scripts
|
||
|
configMap:
|
||
|
name: {{ .Chart.Name }}-startup-scripts
|
||
|
{{- with .Values.worker.affinity }}
|
||
|
affinity:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
|
{{- with .Values.worker.tolerations }}
|
||
|
tolerations:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
|
{{- end }}
|