Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugins configurable with values + decouple from dda #11

Merged
merged 3 commits into from
May 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ dispatcher
*.gpg
conf/conf_env.yml
values-*.yaml
conf/*
!conf/*example*
42 changes: 28 additions & 14 deletions templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,43 @@ data:
osa_data_server_conf.yml: |
instruments:
isgri:
dispatcher_mnt_point: /data
data_server_cache: reduced/ddcache
dummy_cache: /data/dummy_prods
data_server_url: http://oda-dda-interface:8000
dispatcher_mnt_point: /data
data_server_cache: reduced/ddcache
dummy_cache: /data/dummy_prods
data_server_url: {{ .Values.isgri_data_server_url | default "http://oda-dda-interface:8000" }}

jemx:
dispatcher_mnt_point: /data
data_server_cache: reduced/ddcache
dummy_cache: /data/dummy_prods
data_server_url: http://oda-dda-interface:8000
dispatcher_mnt_point: /data
data_server_cache: reduced/ddcache
dummy_cache: /data/dummy_prods
data_server_url: {{ .Values.jemx_data_server_url | default "http://oda-dda-interface:8000" }}


magic_data_server_conf.yml: |
instruments:
magic:
data_server_url: http://oda-magic:8000
data_server_url: {{ .Values.magic_data_server_url | default "http://oda-magic:8000" }}


polar_data_server_conf.yml: |
instruments:
polar:
dispatcher_mnt_point:
data_server_cache:
dummy_cache: dummy_prods
data_server_url: polar-worker
data_server_port: 8893
dispatcher_mnt_point:
data_server_cache:
dummy_cache: dummy_prods
data_server_url: {{ .Values.polar_data_server_url | default "polar-worker" }}
data_server_port: {{ .Values.polar_data_server_port | default 8893 }}

antares_data_server_conf.yml: |
instruments:
antares:
data_server_url: {{ .Values.antares_data_server_url | default "http://oda-antares:8000" }}
dummy_cache: dummy_prods

spiacs_data_server_conf: |
instruments:
spi_acs:
dispatcher_mnt_point:
data_server_cache:
dummy_cache: dummy_prods
data_server_url: {{ .Values.spiacs_data_server_url | default "https://www.astro.unige.ch/cdci/astrooda/dispatch-data/gw/integralhk/api/v1.0/genlc/ACS/{t0_isot}/{dt_s}" }}
34 changes: 16 additions & 18 deletions templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,20 @@ spec:
hostPath:
path: {{ .Values.oda.ddcache }}
{{ else }}
- name: scratch
persistentVolumeClaim:
claimName: dda-interface-scratch
- name: dispatcher-scratch-root
persistentVolumeClaim:
claimName: dispatcher-scratch-root
- name: filelogdir
persistentVolumeClaim:
claimName: dda-filelogdir
claimName: dispatcher-filelogdir
{{- if .Values.mount_dda }}
- name: scratch
persistentVolumeClaim:
claimName: dda-interface-scratch
- name: data-reduced-ddcache
persistentVolumeClaim:
claimName: data-reduced-ddcache
{{- end }}
#- name: isdc-arc-rev3
#- name: isdc-pvphase-nrt-ops
{{ end }}
Expand Down Expand Up @@ -122,31 +124,27 @@ spec:
value: "no"
{{- end }}
volumeMounts:
- mountPath: /scratch
name: scratch
- mountPath: /var/log/containers
name: filelogdir
- mountPath: /data/reduced/ddcache
name: data-reduced-ddcache
- mountPath: /data/dispatcher_scratch
name: dispatcher-scratch-root
{{- if .Values.mount_dda }}
- mountPath: /data/reduced/ddcache
name: data-reduced-ddcache
- mountPath: /scratch
name: scratch
{{- end }}

- mountPath: /dispatcher/conf/conf_env.yml
name: dispatcher-conf-secret
subPath: conf_env.yml
readOnly: true
{{- range $plugin := list "osa" "magic" "polar" "antares" "spiacs" }}
- name: dispatcher-config-volume
mountPath: /dispatcher/conf/conf.d/osa_data_server_conf.yml
subPath: osa_data_server_conf.yml
readOnly: true
- name: dispatcher-config-volume
mountPath: /dispatcher/conf/conf.d/polar_data_server_conf.yml
subPath: polar_data_server_conf.yml
readOnly: true
- name: dispatcher-config-volume
mountPath: /dispatcher/conf/conf.d/magic_data_server_conf.yml
subPath: magic_data_server_conf.yml
mountPath: /dispatcher/conf/conf.d/{{$plugin}}_data_server_conf.yml
subPath: {{$plugin}}_data_server_conf.yml
readOnly: true
{{- end }}

- name: celery
securityContext:
Expand Down
4 changes: 3 additions & 1 deletion values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ tolerations: []
affinity: {}

oda:
use_hostpath: true
ddaQueue: queue-osa11
ddcache: "/net/cdcicn02/scratch/shared/savchenk/data/reduced/ddcache"
use_hostpath: true
mount_dda: true # mount dda-related volumes into dispatcher
# MUST be false if installing dispatcher without dda backend