Skip to content

Commit 4cd84a0

Browse files
author
zion
committed
feat: Add image pull secret propagation for agent run container
1 parent 4a6f5f1 commit 4cd84a0

18 files changed

+116
-0
lines changed

api/v1alpha1/agentrun_types.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package v1alpha1
22

33
import (
4+
corev1 "k8s.io/api/core/v1"
45
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
56
)
67

@@ -68,6 +69,10 @@ type AgentRunSpec struct {
6869
// +kubebuilder:validation:Enum=task;server
6970
// +optional
7071
Mode string `json:"mode,omitempty"`
72+
73+
// ImagePullSecrets are secrets to use when pulling container images.
74+
// +optional
75+
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
7176
}
7277

7378
// ParentRunRef links a sub-agent to its parent.

api/v1alpha1/sympoziuminstance_types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ type SympoziumInstanceSpec struct {
4848
// When nil or Enabled is false, no web-proxy infrastructure is deployed.
4949
// +optional
5050
WebEndpoint *WebEndpointSpec `json:"webEndpoint,omitempty"`
51+
52+
// ImagePullSecrets are secrets to use when pulling container images.
53+
// +optional
54+
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
5155
}
5256

5357
// MCPServerRef references a remote MCP server for tool integration.

api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

charts/sympozium/crds/sympozium.ai_agentruns.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,26 @@ spec:
109109
description: Env defines custom environment variables to pass to the
110110
agent container.
111111
type: object
112+
imagePullSecrets:
113+
description: ImagePullSecrets are secrets to use when pulling container
114+
images.
115+
items:
116+
description: |-
117+
LocalObjectReference contains enough information to let you locate the
118+
referenced object inside the same namespace.
119+
properties:
120+
name:
121+
default: ""
122+
description: |-
123+
Name of the referent.
124+
This field is effectively required, but due to backwards compatibility is
125+
allowed to be empty. Instances of this type with an empty value here are
126+
almost certainly wrong.
127+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
128+
type: string
129+
type: object
130+
x-kubernetes-map-type: atomic
131+
type: array
112132
instanceRef:
113133
description: InstanceRef is the name of the SympoziumInstance this
114134
run belongs to.

charts/sympozium/crds/sympozium.ai_sympoziuminstances.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,26 @@ spec:
296296
- type
297297
type: object
298298
type: array
299+
imagePullSecrets:
300+
description: ImagePullSecrets are secrets to use when pulling container
301+
images.
302+
items:
303+
description: |-
304+
LocalObjectReference contains enough information to let you locate the
305+
referenced object inside the same namespace.
306+
properties:
307+
name:
308+
default: ""
309+
description: |-
310+
Name of the referent.
311+
This field is effectively required, but due to backwards compatibility is
312+
allowed to be empty. Instances of this type with an empty value here are
313+
almost certainly wrong.
314+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
315+
type: string
316+
type: object
317+
x-kubernetes-map-type: atomic
318+
type: array
299319
mcpServers:
300320
description: |-
301321
MCPServers configures remote MCP (Model Context Protocol) servers
44.9 KB
Binary file not shown.

cmd/sympozium/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7675,6 +7675,7 @@ func tuiCreateRun(ns, instance, task string) (string, error) {
76757675
},
76767676
Skills: inst.Spec.Skills,
76777677
Timeout: &metav1.Duration{Duration: 10 * time.Minute},
7678+
ImagePullSecrets: inst.Spec.ImagePullSecrets,
76787679
},
76797680
}
76807681
if err := k8sClient.Create(ctx, run); err != nil {

config/crd/bases/sympozium.ai_agentruns.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,26 @@ spec:
109109
description: Env defines custom environment variables to pass to the
110110
agent container.
111111
type: object
112+
imagePullSecrets:
113+
description: ImagePullSecrets are secrets to use when pulling container
114+
images.
115+
items:
116+
description: |-
117+
LocalObjectReference contains enough information to let you locate the
118+
referenced object inside the same namespace.
119+
properties:
120+
name:
121+
default: ""
122+
description: |-
123+
Name of the referent.
124+
This field is effectively required, but due to backwards compatibility is
125+
allowed to be empty. Instances of this type with an empty value here are
126+
almost certainly wrong.
127+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
128+
type: string
129+
type: object
130+
x-kubernetes-map-type: atomic
131+
type: array
112132
instanceRef:
113133
description: InstanceRef is the name of the SympoziumInstance this
114134
run belongs to.

config/crd/bases/sympozium.ai_sympoziuminstances.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,26 @@ spec:
296296
- type
297297
type: object
298298
type: array
299+
imagePullSecrets:
300+
description: ImagePullSecrets are secrets to use when pulling container
301+
images.
302+
items:
303+
description: |-
304+
LocalObjectReference contains enough information to let you locate the
305+
referenced object inside the same namespace.
306+
properties:
307+
name:
308+
default: ""
309+
description: |-
310+
Name of the referent.
311+
This field is effectively required, but due to backwards compatibility is
312+
allowed to be empty. Instances of this type with an empty value here are
313+
almost certainly wrong.
314+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
315+
type: string
316+
type: object
317+
x-kubernetes-map-type: atomic
318+
type: array
299319
mcpServers:
300320
description: |-
301321
MCPServers configures remote MCP (Model Context Protocol) servers

internal/apiserver/server.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -825,6 +825,7 @@ func (s *Server) createRun(w http.ResponseWriter, r *http.Request) {
825825
NodeSelector: inst.Spec.Agents.Default.NodeSelector,
826826
},
827827
Skills: inst.Spec.Skills,
828+
ImagePullSecrets: inst.Spec.ImagePullSecrets,
828829
},
829830
}
830831

0 commit comments

Comments
 (0)