Merge "Revert "configure kubernetes to use containerd as CRI""

This commit is contained in:
Zuul
2020-01-14 21:27:25 +00:00
committed by Gerrit Code Review
2 changed files with 2 additions and 16 deletions

View File

@@ -2835,10 +2835,8 @@ class DockerHelper(object):
LOG.info("Image %s download started from local registry" % img_tag)
client = docker.APIClient(timeout=INSTALLATION_TIMEOUT)
auth = '{0}:{1}'.format(local_registry_auth['username'],
local_registry_auth['password'])
subprocess.check_call(["crictl", "pull", "--creds", auth, img_tag])
except subprocess.CalledProcessError:
client.pull(img_tag, auth_config=local_registry_auth)
except docker.errors.NotFound:
try:
# Pull the image from the public/private registry
LOG.info("Image %s is not available in local registry, "
@@ -2861,16 +2859,6 @@ class DockerHelper(object):
except Exception as e:
rc = False
LOG.error("Image %s push failed to local registry: %s" % (img_tag, e))
return img_tag, rc
try:
# remove docker container image after it is pushed to local registry.
LOG.info("Remove image %s after push to local registry." % (target_img_tag))
client.remove_image(target_img_tag)
client.remove_image(img_tag)
except Exception as e:
LOG.warning("Image %s remove failed" % (target_img_tag))
except Exception as e:
rc = False
LOG.error("Image %s download failed from local registry: %s" % (img_tag, e))

View File

@@ -132,8 +132,6 @@ class KubernetesPuppet(base.BasePuppet):
cmd = ['kubeadm', 'token', 'create', '--print-join-command',
'--description', 'Bootstrap token for %s' % host.hostname]
join_cmd = subprocess.check_output(cmd)
join_cmd = join_cmd.strip()
join_cmd += " --cri-socket /var/run/containerd/containerd.sock"
config.update(
{'platform::kubernetes::worker::params::join_cmd': join_cmd, })
except subprocess.CalledProcessError: