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

kubevirt single node install path rework and upgrades. #3838

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .yetus/excludes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
^pkg/kvm-tools/include
^pkg/kvm-tools/dtrace
^pkg/kube/kubevirt-operator.yaml
^pkg/kube/multus-daemonset.yaml
^api/python/
^api/go/
^api/images/
Expand Down
35 changes: 19 additions & 16 deletions pkg/kube/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# syntax=docker/dockerfile-upstream:1.5.0-rc2-labs

FROM lfedge/eve-alpine:a76c418ea841a1c433e0ab562653c3801f494d8e as build
ENV BUILD_PKGS go
FROM lfedge/eve-alpine:2ce6af13cbeb90e4ba3fda8903172ecc064580bb as build
ENV BUILD_PKGS git go
ENV PKGS alpine-baselayout musl-utils iproute2 iptables curl openrc \
open-iscsi libvirt libvirt-client util-linux grep findutils jq \
cni-plugins
open-iscsi libvirt libvirt-client util-linux grep cni-plugins \
jq findutils nfs-utils
RUN eve-alpine-deploy.sh

# Remove unused CNI plugins
Expand All @@ -19,29 +19,32 @@ RUN GO111MODULE=on CGO_ENABLED=0 go build -v -ldflags "-s -w" -mod=vendor -o /ou
FROM scratch
COPY --from=build /out/ /
COPY cluster-init.sh /usr/bin/
COPY nsmounter /usr/bin/
COPY install-etcdctl.sh /usr/bin/
COPY cgconfig.conf /etc
# kubevirt yaml files are patched files and will be removed later, look at cluster-init.sh
COPY multus-daemonset.yaml /etc
COPY kubevirt-operator.yaml /etc
COPY kubevirt-features.yaml /etc
RUN mkdir -p /etc/containerd
COPY kubevirt-features.yaml /etc
COPY kubevirt-operator.yaml /etc
COPY config-k3s.toml /etc/containerd/
COPY longhorn-generate-support-bundle.sh /usr/bin/
COPY k3s-pod-logs.sh /usr/bin/
COPY debuguser-role-binding.yaml /etc/
COPY external-boot-image.tar /etc/
COPY iscsid.conf /etc/iscsi/
RUN ls -l /etc/
RUN mkdir -p /etc/rancher/k3s
COPY config.yaml /etc/rancher/k3s
COPY external-boot-image.tar /etc/
WORKDIR /

# Actual k3s install and config happens when this container starts during EVE bootup, look at cluster-init.sh
### NOTE: the following lines are commented out until the EVE partition size increases
#ENV VIRTCTL_VERSION v0.59.0
#ADD https://github.com/kubevirt/kubevirt/releases/download/${VIRTCTL_VERSION}/virtctl-${VIRTCTL_VERSION}-linux-amd64 .
#RUN install virtctl-${VIRTCTL_VERSION}-linux-amd64 /usr/bin/virtctl
### NOTE: the version of virtctl should match the version of kubevirt in cluster_init.sh, else PVC creation might fail due to incompatibility
ENV VIRTCTL_VERSION v1.1.0
ADD https://github.com/kubevirt/kubevirt/releases/download/${VIRTCTL_VERSION}/virtctl-${VIRTCTL_VERSION}-linux-amd64 .
RUN install virtctl-${VIRTCTL_VERSION}-linux-amd64 /usr/bin/virtctl
# We installed under /usr/bin. Remove the downloaded version
#RUN rm -f ./virtctl-${VIRTCTL_VERSION}-linux-amd64

ENV ETCDCTL_VERSION v3.5.5
ADD https://github.com/etcd-io/etcd/releases/download/${ETCDCTL_VERSION}/etcd-${ETCDCTL_VERSION}-linux-amd64.tar.gz .
RUN tar -zxv --strip-components=1 -C /usr/local/bin < ./etcd-${ETCDCTL_VERSION}-linux-amd64.tar.gz
RUN rm -f ./virtctl-${VIRTCTL_VERSION}-linux-amd64

ENTRYPOINT []
CMD ["/usr/bin/cluster-init.sh"]