Finish work for netbox 2.7.2
Now includes - and enables - workers by default
This commit is contained in:
parent
9496311fe6
commit
bb7714741f
5 changed files with 61 additions and 10 deletions
|
@ -4,4 +4,4 @@ appVersion: "2.7.2"
|
||||||
description: An IP address management (IPAM) and data center infrastructure management (DCIM) tool.
|
description: An IP address management (IPAM) and data center infrastructure management (DCIM) tool.
|
||||||
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
|
||||||
name: netbox
|
name: netbox
|
||||||
version: 0.3.10
|
version: 0.4.0
|
||||||
|
|
56
charts/netbox/templates/deployment-worker.yaml
Normal file
56
charts/netbox/templates/deployment-worker.yaml
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
{{- if .Values.worker.enabled }}
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ include "netbox.fullname" . }}-worker
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: {{ include "netbox.name" . }}
|
||||||
|
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" . }}
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
component: worker
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
checksum/config: {{ include (print $.Template.BasePath "/configuration.yaml") . | sha256sum }}
|
||||||
|
checksum/secrets: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: {{ include "netbox.name" . }}
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
component: worker
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: {{ .Chart.Name }}-worker
|
||||||
|
command:
|
||||||
|
- python3
|
||||||
|
- /opt/netbox/netbox/manage.py
|
||||||
|
- rqworker
|
||||||
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
|
envFrom:
|
||||||
|
- configMapRef:
|
||||||
|
name: {{ include "netbox.fullname" . }}
|
||||||
|
- secretRef:
|
||||||
|
name: {{ include "netbox.fullname" . }}
|
||||||
|
resources:
|
||||||
|
{{- toYaml .Values.worker.resources | nindent 12 }}
|
||||||
|
{{- with .Values.worker.nodeSelector }}
|
||||||
|
nodeSelector:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.worker.affinity }}
|
||||||
|
affinity:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.worker.tolerations }}
|
||||||
|
tolerations:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
|
@ -14,6 +14,7 @@ spec:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app.kubernetes.io/name: {{ include "netbox.name" . }}
|
app.kubernetes.io/name: {{ include "netbox.name" . }}
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
component: app
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
annotations:
|
annotations:
|
||||||
|
@ -22,6 +23,7 @@ spec:
|
||||||
labels:
|
labels:
|
||||||
app.kubernetes.io/name: {{ include "netbox.name" . }}
|
app.kubernetes.io/name: {{ include "netbox.name" . }}
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
component: app
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: {{ .Chart.Name }}
|
- name: {{ .Chart.Name }}
|
||||||
|
|
|
@ -18,3 +18,4 @@ spec:
|
||||||
selector:
|
selector:
|
||||||
app.kubernetes.io/name: {{ include "netbox.name" . }}
|
app.kubernetes.io/name: {{ include "netbox.name" . }}
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
component: app
|
||||||
|
|
|
@ -83,10 +83,6 @@ superuser:
|
||||||
password: ''
|
password: ''
|
||||||
|
|
||||||
resources: {}
|
resources: {}
|
||||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
|
||||||
# choice for the user. This also increases chances charts run on environments with little
|
|
||||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
|
||||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
|
||||||
# limits:
|
# limits:
|
||||||
# cpu: 100m
|
# cpu: 100m
|
||||||
# memory: 128Mi
|
# memory: 128Mi
|
||||||
|
@ -116,15 +112,11 @@ persistence:
|
||||||
size: 10Gi
|
size: 10Gi
|
||||||
|
|
||||||
worker:
|
worker:
|
||||||
enabled: false
|
enabled: true
|
||||||
|
|
||||||
replicaCount: 1
|
replicaCount: 1
|
||||||
|
|
||||||
resources: {}
|
resources: {}
|
||||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
|
||||||
# choice for the user. This also increases chances charts run on environments with little
|
|
||||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
|
||||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
|
||||||
# limits:
|
# limits:
|
||||||
# cpu: 100m
|
# cpu: 100m
|
||||||
# memory: 128Mi
|
# memory: 128Mi
|
||||||
|
|
Loading…
Reference in a new issue