Skip to content

Commit

Permalink
core 0.4.0 - use flower coming from backend image
Browse files Browse the repository at this point in the history
  • Loading branch information
wozniakpl committed Nov 6, 2024
1 parent 11d579d commit b5b5de2
Show file tree
Hide file tree
Showing 8 changed files with 93 additions and 145 deletions.
2 changes: 1 addition & 1 deletion charts/core/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.3.0
version: 0.4.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
26 changes: 0 additions & 26 deletions charts/core/files/flower/entrypoint.sh

This file was deleted.

24 changes: 0 additions & 24 deletions charts/core/templates/celery/flower/configmap.yaml

This file was deleted.

61 changes: 31 additions & 30 deletions charts/core/templates/celery/flower/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ metadata:
labels:
{{- include "core.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.flower.replicaCount }}
replicas: 1
selector:
matchLabels:
{{- include "core.selectorLabels" . | nindent 6 }}
core/service: celery-flower
template:
metadata:
annotations:
{{- if .Values.flower.podAnnotations }}
{{- toYaml .Values.flower.podAnnotations | nindent 8 }}
{{- end }}
{{- with .Values.flower.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "core.selectorLabels" . | nindent 8 }}
core/service: celery-flower
Expand All @@ -26,39 +26,38 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "core.serviceAccountName" . }}
volumes:
- configMap:
defaultMode: 511
name: {{ include "core.fullname" . }}-flower-entrypoint
name: entrypoint
securityContext:
{{- toYaml .Values.flower.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}-celery-flower
securityContext:
{{- toYaml .Values.flower.securityContext | nindent 12 }}
image: "{{ .Values.flower.image }}"
image: "{{ include "core.backend.image" . }}"
command: ["celery", "flower", "-A", "hct_mis_api.apps.core.celery", "--address=0.0.0.0", "--broker=$CELERY_BROKER_URL"]
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
ports:
- name: http
containerPort: {{ .Values.flower.service.port }}
protocol: TCP
envFrom:
- secretRef:
name: {{ include "core.fullname" . }}-flower
- configMapRef:
name: {{ include "core.fullname" . }}-flower
- configMapRef:
name: {{ include "core.fullname" . }}-backend
env:
- name: FLOWER_URL_PREFIX
value: flower
{{- if .Values.keyvault.enabled }}
- name: FLOWER_BASIC_AUTH
valueFrom:
secretKeyRef:
name: {{ .Values.keyvault.secretName }}
key: FLOWER_BASIC_AUTH
- name: CELERY_BROKER_URL
valueFrom:
secretKeyRef:
name: {{ .Values.keyvault.secretName }}
key: CELERY_BROKER_URL
{{- end }}
ports:
- containerPort: 5555
name: http
volumeMounts:
- name: entrypoint
mountPath: /entrypoint.sh
subPath: entrypoint.sh
readinessProbe:
httpGet:
path: /_health
port: {{ .Values.flower.service.port }}
httpHeaders:
- name: X-Health
value: "Kubernetes-Health"
- name: Host
value: "kubernetes.internal"
{{ include "keyvault.volumeMounts" . | nindent 12 }}
resources:
{{- toYaml .Values.flower.resources | nindent 12 }}
{{- with .Values.flower.nodeSelector }}
Expand All @@ -73,4 +72,6 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
{{ include "keyvault.volumes" . | nindent 8 }}
{{- end }}
30 changes: 0 additions & 30 deletions charts/core/templates/celery/flower/secret.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion charts/core/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ flower:
affinity: {}
service:
type: ClusterIP
port: 8000
port: 5555

config:
FLOWER_URL_PREFIX: flower
Expand Down
Binary file added docs/core-0.4.0.tgz
Binary file not shown.
Loading

0 comments on commit b5b5de2

Please sign in to comment.