@@ -181,7 +181,7 @@ async Task CreatePod(StartKubernetesScriptCommandV1 command, IScriptWorkspace wo
181
181
. WhereNotNull ( )
182
182
. Select ( secretName => new V1LocalObjectReference ( secretName ) )
183
183
. ToList ( ) ;
184
-
184
+
185
185
var pod = new V1Pod
186
186
{
187
187
Metadata = new V1ObjectMeta
@@ -240,7 +240,29 @@ protected virtual IList<V1Volume> CreateVolumes(StartKubernetesScriptCommandV1 c
240
240
{
241
241
ClaimName = KubernetesConfig . PodVolumeClaimName
242
242
}
243
- }
243
+ } ,
244
+ CreateAgentUpgradeSecretVolume ( ) ,
245
+ } ;
246
+ }
247
+
248
+ protected V1Volume CreateAgentUpgradeSecretVolume ( )
249
+ {
250
+ return new ( )
251
+ {
252
+ Name = "agent-upgrade" ,
253
+ Secret = new V1SecretVolumeSource
254
+ {
255
+ SecretName = "agent-upgrade-secret" ,
256
+ Items = new List < V1KeyToPath > ( )
257
+ {
258
+ new ( )
259
+ {
260
+ Key = ".dockerconfigjson" ,
261
+ Path = "config.json"
262
+ }
263
+ } ,
264
+ Optional = true ,
265
+ } ,
244
266
} ;
245
267
}
246
268
@@ -290,7 +312,11 @@ protected async Task<V1Container> CreateScriptContainer(StartKubernetesScriptCom
290
312
commandString
291
313
}
292
314
. ToList ( ) ,
293
- VolumeMounts = new List < V1VolumeMount > { new ( homeDir , "tentacle-home" ) } ,
315
+ VolumeMounts = new List < V1VolumeMount >
316
+ {
317
+ new ( homeDir , "tentacle-home" ) ,
318
+ new ( "/root/.config/helm/registry/" , "agent-upgrade" )
319
+ } ,
294
320
Env = new List < V1EnvVar >
295
321
{
296
322
new ( KubernetesConfig . NamespaceVariableName , KubernetesConfig . Namespace ) ,
@@ -428,4 +454,4 @@ V1Affinity ParseScriptPodAffinity(InMemoryTentacleScriptLog tentacleScriptLog)
428
454
} ;
429
455
}
430
456
}
431
- }
457
+ }
0 commit comments