@@ -248,30 +248,43 @@ exports.installNoneDriverDeps = void 0;
248248const core_1 = __nccwpck_require__(2186);
249249const exec_1 = __nccwpck_require__(1514);
250250const tool_cache_1 = __nccwpck_require__(7784);
251- const installCriDocker = () => __awaiter(void 0, void 0, void 0, function* () {
252- const urlBase = 'https://storage.googleapis.com/setup-minikube/cri-dockerd/v0.2.3/';
253- const binaryDownload = (0, tool_cache_1.downloadTool)(urlBase + 'cri-dockerd');
254- const serviceDownload = (0, tool_cache_1.downloadTool)(urlBase + 'cri-docker.service');
255- const socketDownload = (0, tool_cache_1.downloadTool)(urlBase + 'cri-docker.socket');
256- yield (0, exec_1.exec)('chmod', ['+x', yield binaryDownload]);
257- yield (0, exec_1.exec)('sudo', ['mv', yield binaryDownload, '/usr/bin/cri-dockerd']);
258- yield (0, exec_1.exec)('sudo', [
259- 'mv',
260- yield serviceDownload,
261- '/usr/lib/systemd/system/cri-docker.service',
262- ]);
251+ const cniPluginsVersion = 'v1.2.0';
252+ const criDockerVersion = 'v0.3.1';
253+ const crictlVersion = 'v1.26.1';
254+ const installCniPlugins = () => __awaiter(void 0, void 0, void 0, function* () {
255+ const cniPluginsURL = `https://github.com/containernetworking/plugins/releases/download/${cniPluginsVersion}/cni-plugins-linux-amd64-${cniPluginsVersion}.tgz`;
256+ const cniPluginsDownload = (0, tool_cache_1.downloadTool)(cniPluginsURL);
257+ yield (0, exec_1.exec)('sudo', ['mkdir', '-p', '/opt/cni/bin']);
263258 yield (0, exec_1.exec)('sudo', [
264- 'mv',
265- yield socketDownload,
266- '/usr/lib/systemd/system/cri-docker.socket',
259+ 'tar',
260+ 'zxvf',
261+ yield cniPluginsDownload,
262+ '-C',
263+ '/opt/cni/bin',
267264 ]);
268265});
269- const installConntrackSocat = () => __awaiter(void 0, void 0, void 0, function* () {
266+ const installCriDocker = () => __awaiter(void 0, void 0, void 0, function* () {
267+ let codename = '';
268+ const options = {
269+ listeners: {
270+ stdout: (data) => {
271+ codename += data.toString();
272+ },
273+ },
274+ };
275+ yield (0, exec_1.exec)('lsb_release', ['--short', '--codename'], options);
276+ const criDockerURL = `https://github.com/Mirantis/cri-dockerd/releases/download/${criDockerVersion}/cri-dockerd_${criDockerVersion.replace(/^v/, '')}.3-0.ubuntu-${codename}_amd64.deb`;
277+ const criDockerDownload = (0, tool_cache_1.downloadTool)(criDockerURL);
278+ yield (0, exec_1.exec)('sudo', ['dpkg', '--install', yield criDockerDownload]);
279+ });
280+ const installConntrackSocatCriDocker = () => __awaiter(void 0, void 0, void 0, function* () {
270281 yield (0, exec_1.exec)('sudo', ['apt-get', 'update', '-qq']);
271282 yield (0, exec_1.exec)('sudo', ['apt-get', '-qq', '-y', 'install', 'conntrack', 'socat']);
283+ // Need to wait for the dpkg frontend lock to install cri-docker
284+ yield installCriDocker();
272285});
273286const installCrictl = () => __awaiter(void 0, void 0, void 0, function* () {
274- const crictlURL = ' https://github.com/kubernetes-sigs/cri-tools/releases/download/v1.17.0 /crictl-v1.17.0 -linux-amd64.tar.gz' ;
287+ const crictlURL = ` https://github.com/kubernetes-sigs/cri-tools/releases/download/${crictlVersion} /crictl-${crictlVersion} -linux-amd64.tar.gz` ;
275288 const crictlDownload = (0, tool_cache_1.downloadTool)(crictlURL);
276289 yield (0, exec_1.exec)('sudo', [
277290 'tar',
@@ -281,15 +294,20 @@ const installCrictl = () => __awaiter(void 0, void 0, void 0, function* () {
281294 '/usr/local/bin',
282295 ]);
283296});
297+ const makeCniDirectoryReadable = () => __awaiter(void 0, void 0, void 0, function* () {
298+ // created by podman package with 700 root:root
299+ yield (0, exec_1.exec)('sudo', ['chmod', '755', '/etc/cni/net.d']);
300+ });
284301const installNoneDriverDeps = () => __awaiter(void 0, void 0, void 0, function* () {
285302 const driver = (0, core_1.getInput)('driver').toLowerCase();
286303 if (driver !== 'none') {
287304 return;
288305 }
289306 yield Promise.all([
290- installCriDocker (),
291- installConntrackSocat (),
307+ installCniPlugins (),
308+ installConntrackSocatCriDocker (),
292309 installCrictl(),
310+ makeCniDirectoryReadable(),
293311 ]);
294312});
295313exports.installNoneDriverDeps = installNoneDriverDeps;
0 commit comments