Skip to content

Commit

Permalink
fix: siibra-api parcellation map to use siibra-python v2
Browse files Browse the repository at this point in the history
  • Loading branch information
xgui3783 committed Aug 22, 2024
1 parent 8db1d73 commit de7d011
Show file tree
Hide file tree
Showing 18 changed files with 417 additions and 225 deletions.
4 changes: 2 additions & 2 deletions .helm/siibra-api/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ 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.1.3
version: 0.1.4

# 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
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.3.17"
appVersion: "0.3.18"
91 changes: 91 additions & 0 deletions .helm/siibra-api/templates/deployment-worker-v4.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "siibra-api.fullname" $ }}-worker-v4
labels:
queuename: {{ . }}
{{- include "siibra-api.labels" $ | nindent 4 }}
spec:
strategy:
type: RollingUpdate
# This rolling update setup allow k8s to scale down before bringing up new pods.
# This should be more resource conservative, whilst sacrificing some availability during update.
rollingUpdate:
maxSurge: 0
maxUnavailable: 1

{{- if not $.Values.autoscaling.enabled }}
replicas: {{ $.Values.replicaCount }}
{{- end }}
selector:
matchLabels:
role: worker
queuename: v4-all
sapiFlavor: {{ $.Values.sapiFlavor }}
{{- include "siibra-api.selectorLabels" $ | nindent 6 }}
template:
metadata:
{{- with $.Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
role: worker
queuename: v4-all
sapiFlavor: {{ $.Values.sapiFlavor }}
{{- include "siibra-api.labels" $ | nindent 8 }}
{{- with $.Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with $.Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "siibra-api.serviceAccountName" $ }}
securityContext:
{{- toYaml $.Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ $.Chart.Name }}
securityContext:
{{- toYaml $.Values.securityContext | nindent 12 }}
image: "{{ $.Values.image.repository }}:{{ include "siibra-api.root-img" $ }}-worker-v4"
imagePullPolicy: {{ $.Values.image.pullPolicy }}
livenessProbe:
# each pod has 20 seconds to become lively (which by definition is ready)
initialDelaySeconds: 2
periodSeconds: 10
timeoutSeconds: 4
failureThreshold: 12
exec:
command: ["/bin/bash", "-c", "cd /worker && python worker_health_v4.py"]
envFrom:
- configMapRef:
name: siibra-api-common
env:
- name: SIIBRA_CACHEDIR
value: "/siibra-api-volume/{{- include "siibra-api.cache-dir" $ -}}"
- name: SIIBRA_API_NAMESPACE
value: {{ $.Values.sapiFlavor }}
resources:
{{- toYaml $.Values.resourcesWorkerPod | nindent 12 }}
{{- with $.Values.volumeMounts }}
volumeMounts:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with $.Values.volumes }}
volumes:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with $.Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with $.Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with $.Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
4 changes: 2 additions & 2 deletions .helm/siibra-api/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

replicaCount: 1

sapiVersion: "0.3.15" # "latest" or "0.3.15"
sapiWorkerQueues: ["core", "features", "volumes", "compounds", "vocabularies"]
sapiVersion: "0.3.18" # "latest" or "0.3.15"
sapiWorkerQueues: ["core", "features", "compounds", "vocabularies"]
sapiFlavor: "prod" # could be prod, rc, latest, etc

image:
Expand Down
1 change: 0 additions & 1 deletion api/common/data_handlers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from . import core
from . import features
from . import volumes
from . import compounds

from ...siibra_api_config import ROLE
Expand Down
1 change: 0 additions & 1 deletion api/common/data_handlers/volumes/__init__.py

This file was deleted.

203 changes: 0 additions & 203 deletions api/common/data_handlers/volumes/parcellationmap.py

This file was deleted.

Loading

0 comments on commit de7d011

Please sign in to comment.