Files
deprecated-helm-charts/stable/node-red/templates/deployment.yaml
T
Jeff Billimek 14c89931ea Bumping node-red to v1.0.2 and adding options (#17968)
* Bumping node-red docker image to the latest 1.0.2
* adding `safeMode` values option to start Node-RED in safe (not running) mode - defaults to false
* adding `enableProjects` values option to start Node-RED with 'projects' support (see https://nodered.org/docs/user-guide/projects/ ) - defaults to false

Signed-off-by: Jeff Billimek <jeff@billimek.com>
2019-10-15 01:05:54 -07:00

90 lines
2.7 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "node-red.fullname" . }}
labels:
app.kubernetes.io/name: {{ include "node-red.name" . }}
helm.sh/chart: {{ include "node-red.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
spec:
replicas: 1
strategy:
type: {{ .Values.strategyType }}
selector:
matchLabels:
app.kubernetes.io/name: {{ include "node-red.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
template:
metadata:
labels:
app.kubernetes.io/name: {{ include "node-red.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Values.podAnnotations }}
annotations:
{{- range $key, $value := .Values.podAnnotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: 1880
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
readinessProbe:
httpGet:
path: /
port: http
env:
- name: FLOWS
value: "{{ .Values.flows }}"
- name: NODE_RED_ENABLE_SAFE_MODE
value: "{{ .Values.safeMode }}"
- name: NODE_RED_ENABLE_PROJECTS
value: "{{ .Values.enableProjects }}"
- name: NODE_OPTIONS
value: "{{ .Values.nodeOptions }}"
- name: TZ
value: "{{ .Values.timezone }}"
{{- with .Values.extraEnvs }}
{{ toYaml . | indent 12 }}
{{- end }}
volumeMounts:
- name: data
mountPath: /data
{{- if .Values.persistence.subPath }}
subPath: {{ .Values.persistence.subPath }}
{{- end }}
resources:
{{ toYaml .Values.resources | indent 12 }}
volumes:
- name: data
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ if .Values.persistence.existingClaim }}{{ .Values.persistence.existingClaim }}{{- else }}{{ template "node-red.fullname" . }}{{- end }}
{{- else }}
emptyDir: {}
{{ end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
securityContext:
fsGroup: 1001