Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy Containernetworking CNI plugins in an init container #158

Closed
micahhausler opened this issue Aug 17, 2018 · 1 comment
Closed

Copy Containernetworking CNI plugins in an init container #158

micahhausler opened this issue Aug 17, 2018 · 1 comment

Comments

@micahhausler
Copy link
Member

Right now we rely on the CNI binaries being present on the host, but we should add an init container to our DaemonSet that copies CNI binaries to the host. Our AMI currently bakes these in, but this CNI provider should provide these itself

Essentially the init container Dockerfile would look need to look like

FROM amazonlinux

ENV CNI_STAGE_DIR /opt/stage/cni
ENV CNI_BIN_DIR /opt/cni/bin
RUN mkdir -p /opt/cni/bin

ENV CNI_VERSION v0.6.0
RUN wget https://github.com/containernetworking/cni/releases/download/${CNI_VERSION}/cni-amd64-${CNI_VERSION}.tgz \
    && tar -xvf cni-amd64-${CNI_VERSION}.tgz -C $CNI_STAGE_DIR \
    && rm cni-amd64-${CNI_VERSION}.tgz

ENV CNI_PLUGIN_VERSION v0.7.1 
RUN wget https://github.com/containernetworking/plugins/releases/download/${CNI_PLUGIN_VERSION}/cni-plugins-amd64-${CNI_PLUGIN_VERSION}.tgz \
    && tar -xvf cni-plugins-amd64-${CNI_PLUGIN_VERSION}.tgz -C $CNI_STAGE_DIR \
    && rm cni-plugins-amd64-${CNI_PLUGIN_VERSION}.tgz

ENTRYPOINT ["/usr/bin/cp", "-r", "$CNI_STAGE_DIR", "/opt/cni/bin"]
@mogren
Copy link
Contributor

mogren commented Jul 8, 2020

@micahhausler Fixed, only took 23 months! 😄

@mogren mogren closed this as completed Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants