Add optional celery liveness check
This commit is contained in:
		
							parent
							
								
									01748f59da
								
							
						
					
					
						commit
						ab1ff087d2
					
				
					 2 changed files with 15 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -41,6 +41,14 @@ spec:
 | 
			
		|||
            {{- toYaml .Values.securityContext | nindent 12 }}
 | 
			
		||||
          image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
 | 
			
		||||
          imagePullPolicy: {{ .Values.image.pullPolicy }}
 | 
			
		||||
          {{- if .Values.worker.livenessProbe.enabled }}
 | 
			
		||||
          livenessProbe:
 | 
			
		||||
            initialDelaySeconds: {{ .Values.worker.livenessProbe.initialDelaySeconds }}
 | 
			
		||||
            periodSeconds: {{ .Values.worker.livenessProbe.periodSeconds }}
 | 
			
		||||
            timeoutSeconds: {{ .Values.worker.livenessProbe.timeoutSeconds }}
 | 
			
		||||
            exec:
 | 
			
		||||
              command: {{ .Values.worker.livenessProbe.command }}
 | 
			
		||||
          {{- end }}
 | 
			
		||||
          resources:
 | 
			
		||||
            {{- toYaml .Values.worker.resources | nindent 12 }}
 | 
			
		||||
          env:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -97,6 +97,13 @@ worker:
 | 
			
		|||
    maxReplicas: 100
 | 
			
		||||
    targetCPUUtilizationPercentage: 90
 | 
			
		||||
    # targetMemoryUtilizationPercentage: 80
 | 
			
		||||
  livenessProbe:
 | 
			
		||||
    enabled: false
 | 
			
		||||
    initialDelaySeconds: 30
 | 
			
		||||
    periodSeconds: 300
 | 
			
		||||
    timeoutSeconds: 30
 | 
			
		||||
    command: 
 | 
			
		||||
      - "celery -A django inspect ping -d celery@$HOSTNAME"
 | 
			
		||||
  resources:
 | 
			
		||||
    limits:
 | 
			
		||||
      cpu: 900m
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Reference in a new issue