Skip to content

Commit

Permalink
Helm chart fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
cmccully committed Nov 2, 2023
1 parent 83b8737 commit 63b7250
Show file tree
Hide file tree
Showing 7 changed files with 106 additions and 23 deletions.
6 changes: 5 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
0.3.0 (2023-11-31)
0.4.0 (2023-11-02)
------------------
- Helm chart fixes.

0.3.0 (2023-11-01)
------------------
- Full alpha release

Expand Down
1 change: 1 addition & 0 deletions helm-chart/banzai-floyds/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
apiVersion: v1
appVersion: "1.0"
version: "1.0"
description: A Helm chart for the deployment of BANZAI-FLOYDS
name: banzai-floyds
22 changes: 11 additions & 11 deletions helm-chart/banzai-floyds/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ Define shared environment variables
External service URLS
*/ -}}
- name: CONFIGDB_URL
value: {{ .Values.banzai.configdbUrl | quote }}
value: {{ .Values.banzaiFloyds.configdbUrl | quote }}
- name: OBSERVATION_PORTAL_URL
value: {{ .Values.banzai.observationPortalUrl | quote }}
value: {{ .Values.banzaiFloyds.observationPortalUrl | quote }}
{{/*
Ingester environment variables
*/ -}}
Expand Down Expand Up @@ -123,9 +123,9 @@ Ingester environment variables
{{- /*
Optional raw data source environment variables
*/}}
{{- if .Values.banzai.useDifferentArchiveSources }}
{{- if .Values.banzaiFloyds.useDifferentArchiveSources }}
- name: RAW_DATA_API_ROOT
value: {{ required "banzai.rawDataApiRoot is required if banzai.useDifferentArchiveSources is specified." .Values.banzai.rawDataApiRoot | quote }}
value: {{ required "banzaiFloyds.rawDataApiRoot is required if banzaiFloyds.useDifferentArchiveSources is specified." .Values.banzai.rawDataApiRoot | quote }}
- name: RAW_DATA_AUTH_TOKEN
valueFrom:
secretKeyRef:
Expand Down Expand Up @@ -163,17 +163,17 @@ Celery task queue configuration
- name: RETRY_DELAY
value: "600"
- name: CALIBRATE_PROPOSAL_ID
value: {{ .Values.banzai.calibrateProposalId | quote }}
value: {{ .Values.banzaiFloyds.calibrateProposalId | quote }}
- name: FITS_BROKER
value: {{ .Values.banzai.fitsBroker | quote }}
value: {{ .Values.banzaiFloyds.fitsBroker | quote }}
- name: FITS_EXCHANGE
value: {{ .Values.banzai.fitsExchange | quote }}
value: {{ .Values.banzaiFloyds.fitsExchange | quote }}
- name: QUEUE_NAME
value: {{ .Values.banzai.queueName | quote }}
value: {{ .Values.banzaiFloyds.queueName | quote }}
- name: CELERY_TASK_QUEUE_NAME
value: {{ .Values.banzai.celeryTaskQueueName | quote }}
value: {{ .Values.banzaiFloyds.celeryTaskQueueName | quote }}
- name: BANZAI_WORKER_LOGLEVEL
value: {{ .Values.banzai.banzaiWorkerLogLevel | quote }}
value: {{ .Values.banzaiFloyds.banzaiWorkerLogLevel | quote }}
- name: REFERENCE_CATALOG_URL
value: {{ .Values.banzai.PhotometryCatalogURL | quote }}
value: {{ .Values.banzaiFloyds.PhotometryCatalogURL | quote }}
{{- end -}}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: batch/v1beta1
apiVersion: batch/v1
kind: CronJob
metadata:
name: {{ include "banzai-floyds.fullname" . }}-db-instrument-update
Expand Down
16 changes: 8 additions & 8 deletions helm-chart/banzai-floyds/templates/listener.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "banzai-floyds.fullname" . }} -listener
name: {{ include "banzai-floyds.fullname" . -}} -listener
labels:
{{ include "banzai-floyds.labels" . | indent 4 }}
spec:
Expand Down Expand Up @@ -44,13 +44,13 @@ spec:
requests:
cpu: "0.1"
memory: "128M"
limits:
cpu: "1"
memory: "1Gi"
volumeMounts:
- name: listener-tmp
mountPath: /tmp
readOnly: false
limits:
cpu: "1"
memory: "1Gi"
volumeMounts:
- name: listener-tmp
mountPath: /tmp
readOnly: false
volumes:
- name: listener-tmp
emptyDir:
Expand Down
70 changes: 70 additions & 0 deletions helm-chart/banzai-floyds/templates/workers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "banzai-floyds.fullname" . -}} -workers
labels:
{{ include "banzai-floyds.labels" . | indent 4 }}
spec:
selector:
matchLabels:
app.kubernetes.io/name: {{ include "banzai-floyds.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
template:
metadata:
labels:
app.kubernetes.io/name: {{ include "banzai-floyds.name" . }}
app.kubernetes.io/instance: "{{ .Release.Name }}"
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
runAsUser: 10087
runAsGroup: 10000
command:
- "celery"
- "-A"
- "banzai"
- "worker"
- "--concurrency"
- "1"
- "-l"
- "info"
- "-Q"
- "$(CELERY_TASK_QUEUE_NAME)"
env:
- name: OMP_NUM_THREADS
value: "2"
{{- include "banzaiFloyds.Env" . | nindent 12 }}
volumeMounts:
- name: tmp
mountPath: /tmp
readOnly: false
resources:
requests:
cpu: "0.5"
memory: "1Gi"
limits:
cpu: "4"
memory: "4Gi"
volumes:
- name: tmp
emptyDir:
sizeLimit: 20Gi
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
12 changes: 10 additions & 2 deletions helm-chart/banzai-floyds/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

replicaCount: 1
# Automatically manage worker count within the configured limits. More workers
# will be started when the CPU usage rises above the configured threshold.
horizontalPodAutoscaler:
enabled: true
minReplicas: 2
maxReplicas: 2
targetCPUUtilizationPercentage: 50

image:
repository: ghcr.io/lcogt/banzai-floyds
Expand Down Expand Up @@ -55,8 +61,10 @@ ingester:
opentsdbPort: 80
postProcessFiles: false
noMetrics: false
filestoreType: s3


banzai:
banzaiFloyds:
configdbUrl: http://configdb.lco.gtn/sites/
observationPortalUrl: http://internal-observation-portal.lco.gtn/api/observations/
useDifferentArchiveSources: false
Expand Down

0 comments on commit 63b7250

Please sign in to comment.