Skip to content
Snippets Groups Projects
Commit cfab04cb authored by Bryan BRANCOTTE's avatar Bryan BRANCOTTE
Browse files

migrate celery deployment to a StatefulSet so it can have multiple replicat

parent c6868f93
No related branches found
No related tags found
1 merge request!67Draft: HPA for celery
apiVersion: v1
kind: Service
metadata:
name: {{ printf "%s-%s" .Release.Name "celery-worker-svc" }}
labels:
{{- include "chart.labels" . | nindent 4 }}
app: celery-worker-svc
spec:
ports:
- port: 80
name: web
clusterIP: None
selector:
{{- include "chart.labels" . | nindent 4 }}
app: celery-worker
---
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: StatefulSet
metadata: metadata:
name: {{ printf "%s-%s" .Release.Name "celery" }} name: {{ printf "%s-%s" .Release.Name "celery" }}
labels: labels:
...@@ -10,8 +26,12 @@ spec: ...@@ -10,8 +26,12 @@ spec:
matchLabels: matchLabels:
{{- include "chart.selectorLabels" . | nindent 6 }} {{- include "chart.selectorLabels" . | nindent 6 }}
app: celery-worker app: celery-worker
strategy: serviceName: {{ printf "%s-%s" .Release.Name "celery-worker-svc" }}
type: Recreate {{- if .Values.celery.replicas }}
replicas: {{ .Values.celery.replicas }}
{{- end }}
updateStrategy:
type: RollingUpdate
template: template:
metadata: metadata:
{{- with .Values.podAnnotations }} {{- with .Values.podAnnotations }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment