File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
apps/kubernetes-provider/src Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -139,10 +139,12 @@ class KubernetesTaskOperations implements TaskOperations {
139
139
}
140
140
141
141
async create ( opts : TaskOperationsCreateOptions ) {
142
+ const containerName = this . #getRunContainerName( opts . runId , opts . nextAttemptNumber ) ;
143
+
142
144
await this . #createPod(
143
145
{
144
146
metadata : {
145
- name : this . #getRunContainerName ( opts . runId ) ,
147
+ name : containerName ,
146
148
namespace : this . #namespace. metadata . name ,
147
149
labels : {
148
150
...this . #getSharedLabels( opts ) ,
@@ -157,7 +159,7 @@ class KubernetesTaskOperations implements TaskOperations {
157
159
terminationGracePeriodSeconds : 60 * 60 ,
158
160
containers : [
159
161
{
160
- name : this . #getRunContainerName ( opts . runId ) ,
162
+ name : containerName ,
161
163
image : opts . image ,
162
164
ports : [
163
165
{
@@ -514,8 +516,8 @@ class KubernetesTaskOperations implements TaskOperations {
514
516
return `task-index-${ suffix } ` ;
515
517
}
516
518
517
- #getRunContainerName( suffix : string ) {
518
- return `task-run-${ suffix } ` ;
519
+ #getRunContainerName( suffix : string , attemptNumber ?: number ) {
520
+ return `task-run-${ suffix } ${ attemptNumber && attemptNumber > 1 ? `-att ${ attemptNumber } ` : "" } ` ;
519
521
}
520
522
521
523
#getPrePullContainerName( suffix : string ) {
You can’t perform that action at this time.
0 commit comments