Skip to content

Commit aa4533e

Browse files
committed
Add fallback values and add kubernetes section in config_test.cfg
1 parent 1143951 commit aa4533e

File tree

2 files changed

+27
-5
lines changed

2 files changed

+27
-5
lines changed

qiita_core/configuration_manager.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -484,12 +484,12 @@ def _get_k8s(self, config):
484484
"""
485485
sec_get = partial(config.get, 'kubernetes')
486486

487-
self.k8s_volume_mount_path = sec_get('VOLUME_MOUNT_PATH')
488-
self.k8s_volume_name = sec_get('VOLUME_NAME')
489-
self.k8s_pvc_name = sec_get('PVC_NAME')
487+
self.k8s_volume_mount_path = sec_get('VOLUME_MOUNT_PATH', fallback=None)
488+
self.k8s_volume_name = sec_get('VOLUME_NAME', fallback=None)
489+
self.k8s_pvc_name = sec_get('PVC_NAME', fallback=None)
490490

491491
self.k8s_image_pull_policy = sec_get('IMAGE_PULL_POLICY', fallback='IfNotPresent')
492-
self.k8s_image_pull_secrets = sec_get('IMAGE_PULL_SECRETS')
492+
self.k8s_image_pull_secrets = sec_get('IMAGE_PULL_SECRETS', fallback=None)
493493

494-
self.k8s_namespace = sec_get('NAMESPACE')
494+
self.k8s_namespace = sec_get('NAMESPACE', fallback=None)
495495

qiita_core/support_files/config_test.cfg

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,3 +258,25 @@ STATS_MAP_CENTER_LONGITUDE =
258258
##Optional. Name of a file in qiita_pet/static/img that shall be
259259
##displayed for login through Service Provider, instead of a plain button
260260
#LOGO = oidc_lifescienceAAI.png
261+
262+
# ----------------------------- kubernetes job settings -----------------------------
263+
[kubernetes]
264+
# Mount path for qiita-data directory in kubernetes setup. Must match the
265+
# path set in the qiita.yaml under volumeMounts.
266+
VOLUME_MOUNT_PATH =
267+
# Volume name for qiita-data directory in kubernetes setup. Must match the
268+
# name set in the qiita.yaml under volumeMounts.
269+
VOLUME_NAME =
270+
271+
# Name of the persistent volume claim used for qiita-data in kubernetes. Must
272+
# match the name set in pvc_nfs_qiita.yaml
273+
PVC_NAME =
274+
275+
# Pull policy for images used in kubernetes plugin jobs
276+
IMAGE_PULL_POLICY =
277+
278+
# Currently not optional. Will be once we switch to the "public" harbor images.
279+
IMAGE_PULL_SECRETS =
280+
281+
# Namespace used to send jobs. Must match namespace qiita deployment is running in.
282+
NAMESPACE =

0 commit comments

Comments
 (0)