Add flower (disabled by default)
This commit is contained in:
parent
7144d26954
commit
0e92508ac3
67
templates/flower/deployment.yaml
Normal file
67
templates/flower/deployment.yaml
Normal file
|
@ -0,0 +1,67 @@
|
|||
{{- if .Values.flower.enabled -}}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "django.fullname" . }}-flower
|
||||
labels:
|
||||
{{- include "django.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: flower
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "django.selectorLabels" . | nindent 6 }}
|
||||
app.kubernetes.io/component: flower
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
checksum/secret: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
|
||||
checksum/configmap: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
|
||||
tag: "{{ .Values.image.tag }}"
|
||||
labels:
|
||||
{{- include "django.selectorLabels" . | nindent 8 }}
|
||||
app.kubernetes.io/component: flower
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
{{- if .Values.flower.args }}
|
||||
args: {{- toYaml .Values.flower.args | nindent 10}}
|
||||
{{- end }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
containerPort: 5555
|
||||
resources:
|
||||
{{- toYaml .Values.flower.resources | nindent 12 }}
|
||||
env:
|
||||
- name: SERVER_ROLE
|
||||
value: "flower"
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: {{ include "django.fullname" . }}
|
||||
{{- if .Values.existingSecret }}
|
||||
- secretRef:
|
||||
name: {{ .Values.existingSecret }}
|
||||
{{- end }}
|
||||
- configMapRef:
|
||||
name: {{ include "django.fullname" . }}
|
||||
{{- with .Values.flower.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.flower.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.flower.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
18
templates/flower/service.yaml
Normal file
18
templates/flower/service.yaml
Normal file
|
@ -0,0 +1,18 @@
|
|||
{{- if .Values.flower.enabled -}}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "django.fullname" . }}-flower
|
||||
labels:
|
||||
{{- include "django.labels" . | nindent 4 }}
|
||||
spec:
|
||||
type: {{ .Values.flower.service.type }}
|
||||
ports:
|
||||
- port: {{ .Values.flower.service.port }}
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector:
|
||||
{{- include "django.selectorLabels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: flower
|
||||
{{- end }}
|
Loading…
Reference in a new issue