From 37d1b4c2485f7a43b86f3a167eb3a012a4864786 Mon Sep 17 00:00:00 2001 From: BigFlagBurito <102980482+BigFlagBurito@users.noreply.github.com> Date: Tue, 25 Mar 2025 12:18:00 +0100 Subject: [PATCH] Fix Bug: imagePullSecrets not working for autograding --- charts/grader-service/values.yaml | 2 +- grader_service/autograding/kube/kube_grader.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/charts/grader-service/values.yaml b/charts/grader-service/values.yaml index 1c538c771..352c1a822 100644 --- a/charts/grader-service/values.yaml +++ b/charts/grader-service/values.yaml @@ -60,7 +60,7 @@ kubeAutogradeExecutor: image: ghcr.io/tu-wien-datalab/grader-service-labextension tag: latest imagePullPolicy: "Always" - imagePullSecrets: {} + imagePullSecrets: [] labels: {} namespace: null extraVolumes: "" diff --git a/grader_service/autograding/kube/kube_grader.py b/grader_service/autograding/kube/kube_grader.py index 7905babab..79ac99e04 100644 --- a/grader_service/autograding/kube/kube_grader.py +++ b/grader_service/autograding/kube/kube_grader.py @@ -153,10 +153,10 @@ class KubeAutogradeExecutor(LocalAutogradeExecutor): help="The image pull policy for the pod. Defaults to 'Always'.").tag(config=True) # Dictionary to store image pull secrets, helpful when pulling from private registries - image_pull_secrets = Dict(default_value=None, + image_pull_secrets = List(default_value=[], help="""Autograding pod image pull secrets dictionary (str, str). Used for pulling images from private registries. Defaults to None.""", - key_trait=Unicode(), + key_trait=Unicode(), value_trait=Unicode(), allow_none=True).tag(config=True) @@ -319,6 +319,7 @@ def start_pod(self) -> GraderPod: env=env, image=self.get_image(), image_pull_policy=self.image_pull_policy, + image_pull_secrets=self.image_pull_secrets, working_dir="/", volumes=volumes, volume_mounts=volume_mounts,