Skip to content

Commit

Permalink
change image pull policy to IfNotPresent
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Zhao <[email protected]>
  • Loading branch information
PetrusZ committed Sep 24, 2024
1 parent 2e842cf commit 6365939
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions pkg/microservice/aslan/core/common/service/kube/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@ spec:
containers:
- name: agent
image: {{.HubAgentImage}}
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
env:
- name: AGENT_NODE_NAME
valueFrom:
Expand Down Expand Up @@ -938,7 +938,7 @@ spec:
containers:
- name: agent
image: {{.HubAgentImage}}
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
env:
- name: AGENT_NODE_NAME
valueFrom:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ echo $result > %s
ImagePullSecrets: ImagePullSecrets,
Containers: []corev1.Container{
{
ImagePullPolicy: corev1.PullAlways,
ImagePullPolicy: corev1.PullIfNotPresent,
Name: GetJobContainerName(jobTask.Name),
Image: jobTaskSpec.Plugin.Image,
Args: jobTaskSpec.Plugin.Args,
Expand Down Expand Up @@ -481,7 +481,7 @@ func buildJob(jobType, jobImage, jobName, clusterID, currentNamespace string, re
},
Containers: []corev1.Container{
{
ImagePullPolicy: corev1.PullAlways,
ImagePullPolicy: corev1.PullIfNotPresent,
Name: GetJobContainerName(strings.ReplaceAll(jobTask.Name, "_", "-")),
Image: jobImage,
Command: []string{"/bin/sh", "-c"},
Expand Down Expand Up @@ -556,7 +556,7 @@ func BuildCleanJob(jobName, clusterID, workflowName string, taskID int64) (*batc
RestartPolicy: corev1.RestartPolicyNever,
Containers: []corev1.Container{
{
ImagePullPolicy: corev1.PullAlways,
ImagePullPolicy: corev1.PullIfNotPresent,
Name: jobName,
Image: image,
WorkingDir: workspace,
Expand Down
2 changes: 1 addition & 1 deletion pkg/microservice/aslan/core/environment/service/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func genDebugContainer(imageName string) *corev1.EphemeralContainer {
Name: ZadigDebugContainerName,
Image: imageName,
Command: []string{"tail", "-f", "/dev/null"},
ImagePullPolicy: corev1.PullAlways,
ImagePullPolicy: corev1.PullIfNotPresent,
TerminationMessagePolicy: corev1.TerminationMessageFallbackToLogsOnError,
},
}
Expand Down
8 changes: 4 additions & 4 deletions pkg/microservice/aslan/core/environment/service/ide.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ func patchDeployment(ctx context.Context, kclient client.Client, selector labels
corev1.Container{
Name: types.IDEContainerNameDev,
Image: devImage,
ImagePullPolicy: corev1.PullAlways,
ImagePullPolicy: corev1.PullIfNotPresent,
Command: []string{"/bin/sh", "-c", "tail -f /dev/null"},
WorkingDir: types.DevmodeWorkDir,
Resources: corev1.ResourceRequirements{
Expand All @@ -225,7 +225,7 @@ func patchDeployment(ctx context.Context, kclient client.Client, selector labels
corev1.Container{
Name: types.IDEContainerNameSidecar,
Image: types.IDESidecarImage,
ImagePullPolicy: corev1.PullAlways,
ImagePullPolicy: corev1.PullIfNotPresent,
Command: []string{"/bin/sh", "-c", "tail -f /dev/null"},
WorkingDir: types.DevmodeWorkDir,
Resources: corev1.ResourceRequirements{
Expand Down Expand Up @@ -318,7 +318,7 @@ func patchStatefulSet(ctx context.Context, kclient client.Client, selector label
corev1.Container{
Name: types.IDEContainerNameDev,
Image: devImage,
ImagePullPolicy: corev1.PullAlways,
ImagePullPolicy: corev1.PullIfNotPresent,
Command: []string{"/bin/sh", "-c", "tail -f /dev/null"},
WorkingDir: types.DevmodeWorkDir,
Resources: corev1.ResourceRequirements{
Expand All @@ -337,7 +337,7 @@ func patchStatefulSet(ctx context.Context, kclient client.Client, selector label
corev1.Container{
Name: types.IDEContainerNameSidecar,
Image: types.IDESidecarImage,
ImagePullPolicy: corev1.PullAlways,
ImagePullPolicy: corev1.PullIfNotPresent,
Command: []string{"/bin/sh", "-c", "tail -f /dev/null"},
WorkingDir: types.DevmodeWorkDir,
Resources: corev1.ResourceRequirements{
Expand Down

0 comments on commit 6365939

Please sign in to comment.