diff --git a/extraFiles/my_spawner.py b/extraFiles/my_spawner.py index f12fd37a2b26814045485ea28c47ce54ae8822e3..cb02ca7786046fefd9d7a570e39bc6e661d01cc2 100644 --- a/extraFiles/my_spawner.py +++ b/extraFiles/my_spawner.py @@ -50,18 +50,37 @@ class MySpawner(KubeSpawner): 'effect': 'NoSchedule', }] + setattr(self, 'extra_pod_config', { - 'affinity': { - 'nodeAffinity': { - 'requiredDuringSchedulingIgnoredDuringExecution': { - 'nodeSelectorTerms': [{ - 'matchExpressions': nodeSelectorTermsExpressions, - }], + 'securityContext': { + 'fsGroupChangePolicy': 'OnRootMismatch', + 'fsGroup': 100 }, - }, - }, - 'tolerations': tolerationsExpression, - }) + 'affinity': { + 'nodeAffinity': { + 'requiredDuringSchedulingIgnoredDuringExecution': { + 'nodeSelectorTerms': [{ + 'matchExpressions': nodeSelectorTermsExpressions, + }], + }, + }, + }, + 'tolerations': tolerations + }) + + + # setattr(self, 'extra_pod_config', { + # 'affinity': { + # 'nodeAffinity': { + # 'requiredDuringSchedulingIgnoredDuringExecution': { + # 'nodeSelectorTerms': [{ + # 'matchExpressions': nodeSelectorTermsExpressions, + # }], + # }, + # }, + # }, + # 'tolerations': tolerationsExpression, + # }) setattr(self, 'startTimeout', 1200)