mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	Merge pull request #31378 from yifan-gu/rkt_fetch_no_store
Automatic merge from submit-queue rkt: Force `rkt fetch` to fetch from remote to conform the image pull policy. Fix https://github.com/kubernetes/kubernetes/issues/27646 Use `--no-store` option for `rkt fetch` to force it to fetch from remote. However, `--no-store` will fetch the remote image regardless of whether the content of the image has changed or not. This causes performance downgrade when the image tag is ':latest' and the image pull policy is 'always'. The issue is tracked in https://github.com/coreos/rkt/issues/2937.
This commit is contained in:
		@@ -76,7 +76,10 @@ func (r *Runtime) PullImage(image kubecontainer.ImageSpec, pullSecrets []api.Sec
 | 
			
		||||
		return err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if _, err := r.cli.RunCommand(&config, "fetch", dockerPrefix+img); err != nil {
 | 
			
		||||
	// Today, `--no-store` will fetch the remote image regardless of whether the content of the image
 | 
			
		||||
	// has changed or not. This causes performance downgrades when the image tag is ':latest' and
 | 
			
		||||
	// the image pull policy is 'always'. The issue is tracked in https://github.com/coreos/rkt/issues/2937.
 | 
			
		||||
	if _, err := r.cli.RunCommand(&config, "fetch", "--no-store", dockerPrefix+img); err != nil {
 | 
			
		||||
		glog.Errorf("Failed to fetch: %v", err)
 | 
			
		||||
		return err
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user