From e1f8510ddcad7cbe637562fbd83815ffc5f1a2de Mon Sep 17 00:00:00 2001 From: wencaiwulue <895703375@qq.com> Date: Thu, 12 May 2022 17:17:56 +0800 Subject: [PATCH] update image pull policy from PullAlways to PullIfNotPresent --- pkg/exchange/controller.go | 2 +- pkg/mesh/controller.go | 4 ++-- pkg/remote.go | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/exchange/controller.go b/pkg/exchange/controller.go index 44c04f60..a6aed23d 100644 --- a/pkg/exchange/controller.go +++ b/pkg/exchange/controller.go @@ -56,7 +56,7 @@ func AddContainer(spec *v1.PodSpec, c util.PodRouteConfig) { v1.ResourceMemory: resource.MustParse("256Mi"), }, }, - ImagePullPolicy: v1.PullAlways, + ImagePullPolicy: v1.PullIfNotPresent, }) if len(spec.PriorityClassName) == 0 { spec.PriorityClassName = "system-cluster-critical" diff --git a/pkg/mesh/controller.go b/pkg/mesh/controller.go index a1eb7e85..a5c67735 100644 --- a/pkg/mesh/controller.go +++ b/pkg/mesh/controller.go @@ -56,7 +56,7 @@ func AddMeshContainer(spec *v1.PodTemplateSpec, nodeId string, c util.PodRouteCo v1.ResourceMemory: resource.MustParse("256Mi"), }, }, - ImagePullPolicy: v1.PullAlways, + ImagePullPolicy: v1.PullIfNotPresent, }) spec.Spec.Containers = append(spec.Spec.Containers, v1.Container{ Name: config.SidecarEnvoyProxy, @@ -75,6 +75,6 @@ func AddMeshContainer(spec *v1.PodTemplateSpec, nodeId string, c util.PodRouteCo v1.ResourceMemory: resource.MustParse("256Mi"), }, }, - ImagePullPolicy: v1.PullAlways, + ImagePullPolicy: v1.PullIfNotPresent, }) } diff --git a/pkg/remote.go b/pkg/remote.go index 0ca6cc2b..8fe95291 100644 --- a/pkg/remote.go +++ b/pkg/remote.go @@ -147,7 +147,7 @@ func CreateOutboundPod(clientset *kubernetes.Clientset, namespace string, traffi v1.ResourceMemory: resource.MustParse("512Mi"), }, }, - ImagePullPolicy: v1.PullAlways, + ImagePullPolicy: v1.PullIfNotPresent, SecurityContext: &v1.SecurityContext{ Capabilities: &v1.Capabilities{ Add: []v1.Capability{ @@ -176,7 +176,7 @@ func CreateOutboundPod(clientset *kubernetes.Clientset, namespace string, traffi MountPath: "/etc/envoy", }, }, - ImagePullPolicy: v1.PullAlways, + ImagePullPolicy: v1.PullIfNotPresent, }, }, RestartPolicy: v1.RestartPolicyAlways,