@@ -109,7 +109,8 @@ function getArcContextLabels(): { [key: string]: string } {
109109 )
110110}
111111
112- export async function createPod (
112+ export async function createJobPod (
113+ name : string ,
113114 jobContainer ?: k8s . V1Container ,
114115 services ?: k8s . V1Container [ ] ,
115116 registry ?: Registry ,
@@ -248,20 +249,11 @@ export async function createContainerStepPod(
248249
249250 const instanceLabel = new RunnerInstanceLabel ( )
250251 const arcLabels = getArcContextLabels ( )
251- appPod . metadata . labels = arcLabels
252- job . spec . template . spec = new k8s . V1PodSpec ( )
253- job . spec . template . metadata = new k8s . V1ObjectMeta ( )
254- job . spec . template . metadata . labels = arcLabels
255- job . spec . template . metadata . annotations = { }
256- job . spec . template . spec . containers = [ container ]
257- job . spec . template . spec . restartPolicy = 'Never'
258-
259- const nodeName = await getCurrentNodeName ( )
260- if ( useKubeScheduler ( ) ) {
261- job . spec . template . spec . affinity = await getPodAffinity ( nodeName )
262- } else {
263- job . spec . template . spec . nodeName = nodeName
252+ appPod . metadata . labels = {
253+ [ instanceLabel . key ] : instanceLabel . value ,
254+ ...arcLabels
264255 }
256+
265257 appPod . metadata . annotations = { }
266258
267259 appPod . spec = new k8s . V1PodSpec ( )
0 commit comments