Skip to content

Commit

Permalink
reporting 0.4.0 - with flower
Browse files Browse the repository at this point in the history
  • Loading branch information
wozniakpl committed Sep 5, 2024
1 parent caf0e07 commit 8e1fa76
Show file tree
Hide file tree
Showing 7 changed files with 129 additions and 11 deletions.
2 changes: 1 addition & 1 deletion charts/reporting/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.6
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
81 changes: 81 additions & 0 deletions charts/reporting/templates/celery/flower/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "reporting.fullname" . }}-celery-flower
labels:
{{- include "reporting.labels" . | nindent 4 }}
spec:
replicas: 1
selector:
matchLabels:
{{- include "reporting.selectorLabels" . | nindent 6 }}
reporting/service: celery-flower
template:
metadata:
annotations:
{{- with .Values.flower.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "reporting.selectorLabels" . | nindent 8 }}
reporting/service: celery-flower
spec:
{{- with .Values.global.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "reporting.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.flower.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}-celery-flower
securityContext:
{{- toYaml .Values.flower.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
command: ["celery", "flower", "-A", "hope_country_report.config.celery", "--address=0.0.0.0", "--broker=$CELERY_BROKER_URL"]
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
envFrom:
- configMapRef:
name: {{ include "reporting.fullname" . }}-backend
env:
- name: FLOWER_URL_PREFIX
value: flower
{{- if .Values.keyvault.enabled }}
- name: FLOWER_BASIC_AUTH
valueFrom:
secretKeyRef:
name: {{ include "reporting.fullname" . }}-keyvault
key: FLOWER_BASIC_AUTH
{{- end }}
ports:
- containerPort: 5555
name: http
volumeMounts:
{{- if .Values.keyvault.enabled }}
- name: secrets-store01-inline
mountPath: {{ .Values.keyvault.mountPath }}
readOnly: true
{{- end }}
resources:
{{- toYaml .Values.flower.resources | nindent 12 }}
{{- 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 }}
volumes:
{{- if .Values.keyvault.enabled }}
- name: secrets-store01-inline
csi:
driver: secrets-store.csi.k8s.io
readOnly: true
volumeAttributes:
secretProviderClass: {{ include "reporting.fullname" . }}-secret-provider
{{- end }}
18 changes: 18 additions & 0 deletions charts/reporting/templates/celery/flower/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{{- if .Values.flower.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "reporting.fullname" . }}-celery-flower
labels:
{{- include "reporting.labels" . | nindent 4 }}
spec:
type: {{ .Values.flower.service.type }}
ports:
- port: {{ .Values.flower.service.port }}
targetPort: {{ .Values.flower.service.port }}
protocol: TCP
name: http
selector:
{{- include "reporting.selectorLabels" . | nindent 4 }}
reporting/service: celery-flower
{{- end }}
11 changes: 9 additions & 2 deletions charts/reporting/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ image:
# Overrides the image tag whose default is the chart appVersion.
tag: ""

imagePullSecrets: []
global:
imagePullPolicy: IfNotPresent
imagePullSecrets: []

nameOverride: ""
fullnameOverride: ""

Expand Down Expand Up @@ -111,4 +114,8 @@ keyvault:
mountPath: /mnt/secrets

flower:
enabled: false
enabled: false

service:
type: ClusterIP
port: 5555
26 changes: 18 additions & 8 deletions docs/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ entries:
core:
- apiVersion: v2
appVersion: core-2.10.1
created: "2024-09-04T15:16:47.591252+02:00"
created: "2024-09-05T15:47:14.760332+02:00"
dependencies:
- condition: postgresql.enabled
name: postgresql
Expand All @@ -26,7 +26,7 @@ entries:
version: 0.1.4
- apiVersion: v2
appVersion: core-2.10.1
created: "2024-09-04T15:16:47.579312+02:00"
created: "2024-09-05T15:47:14.747642+02:00"
dependencies:
- condition: postgresql.enabled
name: postgresql
Expand All @@ -50,7 +50,17 @@ entries:
reporting:
- apiVersion: v2
appVersion: country-report-cd55e1362cc62508ef33e2b900930c1fb42aa2f9
created: "2024-09-04T15:16:47.593652+02:00"
created: "2024-09-05T15:47:14.76338+02:00"
description: A Helm chart for Kubernetes
digest: d54780fcefdf07477ae98d05bf64f8b81b4b2ea8d5bdbb605ccac3cc4659f957
name: reporting
type: application
urls:
- https://unicef.github.io/hope-helm-charts/reporting-0.4.0.tgz
version: 0.4.0
- apiVersion: v2
appVersion: country-report-cd55e1362cc62508ef33e2b900930c1fb42aa2f9
created: "2024-09-05T15:47:14.763111+02:00"
description: A Helm chart for Kubernetes
digest: 299a7ffaf49071c36d14f5a5017068b08c7df0f8d3fe006df79aa0633f283bbd
name: reporting
Expand All @@ -60,7 +70,7 @@ entries:
version: 0.3.6
- apiVersion: v2
appVersion: country-report-cd55e1362cc62508ef33e2b900930c1fb42aa2f9
created: "2024-09-04T15:16:47.593415+02:00"
created: "2024-09-05T15:47:14.762666+02:00"
description: A Helm chart for Kubernetes
digest: 77127f0ada1776aa929db12510659ab43bfcbd6b7e14d083a8a18a73b9674b81
name: reporting
Expand All @@ -70,7 +80,7 @@ entries:
version: 0.3.5
- apiVersion: v2
appVersion: country-report-cd55e1362cc62508ef33e2b900930c1fb42aa2f9
created: "2024-09-04T15:16:47.592961+02:00"
created: "2024-09-05T15:47:14.761965+02:00"
description: A Helm chart for Kubernetes
digest: c9803cb5241c6818973df3fab76a5e698c6a285a768e6bfa7250541cc1090924
name: reporting
Expand All @@ -80,7 +90,7 @@ entries:
version: 0.3.4
- apiVersion: v2
appVersion: country-report-cd55e1362cc62508ef33e2b900930c1fb42aa2f9
created: "2024-09-04T15:16:47.592427+02:00"
created: "2024-09-05T15:47:14.761444+02:00"
description: A Helm chart for Kubernetes
digest: 7373111b2f23fe71681a318b47b3b13f9f756fbb132b0bd4e14ccb65fd669fa2
name: reporting
Expand All @@ -90,12 +100,12 @@ entries:
version: 0.3.3
- apiVersion: v2
appVersion: country-report-cd55e1362cc62508ef33e2b900930c1fb42aa2f9
created: "2024-09-04T15:16:47.591908+02:00"
created: "2024-09-05T15:47:14.760853+02:00"
description: A Helm chart for Kubernetes
digest: b292b4c67a960951f5dd46f27d6f92fa66be8625a51abcd494247f2bbc50983e
name: reporting
type: application
urls:
- https://unicef.github.io/hope-helm-charts/reporting-0.3.2.tgz
version: 0.3.2
generated: "2024-09-04T15:16:47.566075+02:00"
generated: "2024-09-05T15:47:14.73332+02:00"
Binary file added docs/reporting-0.4.0.tgz
Binary file not shown.
2 changes: 2 additions & 0 deletions scripts/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ fi

set -euo pipefail

cd "$(dirname "$0")/.."

CHART_DIR="charts"
OUTPUT_DIR="docs"
REPO_URL="https://unicef.github.io/hope-helm-charts/"
Expand Down

0 comments on commit 8e1fa76

Please sign in to comment.