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

Remove the old docker-multinode files that were built into the hyperkube image #44555

Merged
Merged
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
24 changes: 0 additions & 24 deletions cluster/images/hyperkube/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,33 +38,9 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update -y \

RUN cp /usr/bin/nsenter /nsenter

# Manifests for the docker guide
COPY static-pods/master.json \
static-pods/etcd.json \
static-pods/addon-manager-singlenode.json \
static-pods/kube-proxy.json \
/etc/kubernetes/manifests/

# Manifests for the docker-multinode guide
COPY static-pods/master-multi.json \
static-pods/addon-manager-multinode.json \
/etc/kubernetes/manifests-multi/

# Copy over all addons
COPY addons /etc/kubernetes/addons

# Copy other required scripts for the setup
COPY setup-files.sh make-ca-cert.sh copy-addons.sh /

# easy-rsa package required by make-ca-cert
ADD https://storage.googleapis.com/kubernetes-release/easy-rsa/easy-rsa.tar.gz /root/kube/

# Copy the the cni-bin folder into /opt/cni/bin
COPY cni-bin/bin /opt/cni/bin

# Copy overlay configuration to default directory
COPY cni-conf /etc/cni/net.d

# Create symlinks for each hyperkube server
# Also create symlinks to /usr/local/bin/ where the server image binaries live, so the hyperkube image may be
# used instead of gcr.io/google_containers/kube-* without any modifications.
Expand Down
30 changes: 1 addition & 29 deletions cluster/images/hyperkube/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,43 +60,15 @@ ifndef VERSION
$(error VERSION is undefined)
endif
cp -r ./* ${TEMP_DIR}
mkdir -p ${TEMP_DIR}/cni-bin ${TEMP_DIR}/addons ${TEMP_DIR}/addons/singlenode ${TEMP_DIR}/addons/multinode
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there are other scripts relying on this cni-bin dir. Was removing this intentional?
It seems to have broken federation build.

cp ../../saltbase/salt/generate-cert/make-ca-cert.sh ${TEMP_DIR}

# Singlenode addons
cp ../../addons/dns/kubedns-controller.yaml.base ${TEMP_DIR}/addons/singlenode/kubedns-controller.yaml
cp ../../addons/dns/kubedns-svc.yaml.base ${TEMP_DIR}/addons/singlenode/kubedns-svc.yaml
cp ../../addons/dns/kubedns-sa.yaml ${TEMP_DIR}/addons/singlenode/kubedns-sa.yaml
cp ../../addons/dns/kubedns-cm.yaml ${TEMP_DIR}/addons/singlenode/kubedns-cm.yaml
cp ../../addons/dashboard/dashboard-controller.yaml ${TEMP_DIR}/addons/singlenode/
cp ../../addons/dashboard/dashboard-service.yaml ${TEMP_DIR}/addons/singlenode/

# Multinode addons; all singlenode addons plus kube-proxy (and soon flannel)
cp ${TEMP_DIR}/addons/singlenode/*.yaml ${TEMP_DIR}/addons/multinode/
cp kube-proxy-ds.yaml ${TEMP_DIR}/addons/multinode/kube-proxy.yaml

cp ../../../_output/dockerized/bin/linux/${ARCH}/hyperkube ${TEMP_DIR}
chmod a+rx ${TEMP_DIR}/hyperkube

cd ${TEMP_DIR} && sed -i.back "s|VERSION|${VERSION}|g" addons/singlenode/*.yaml addons/multinode/*.yaml static-pods/*.json
cd ${TEMP_DIR} && sed -i.back "s|REGISTRY|${REGISTRY}|g" addons/singlenode/*.yaml addons/multinode/*.yaml static-pods/*.json
cd ${TEMP_DIR} && sed -i.back "s|ARCH|${ARCH}|g" addons/singlenode/*.yaml addons/multinode/*.yaml static-pods/*.json
cd ${TEMP_DIR} && sed -i.back "s|ARCH|${QEMUARCH}|g" Dockerfile
cd ${TEMP_DIR} && sed -i.back "s|BASEIMAGE|${BASEIMAGE}|g" Dockerfile
ifeq ($(CACHEBUST),1)
cd ${TEMP_DIR} && sed -i.back "s|CACHEBUST|$(shell uuidgen)|g" Dockerfile
endif
cd ${TEMP_DIR} && sed -i.back "s|-amd64|-${ARCH}|g" addons/singlenode/*.yaml addons/multinode/*.yaml
cd ${TEMP_DIR} && sed -i.back "s|__PILLAR__DNS__SERVER__|10.0.0.10|g" addons/singlenode/kubedns*.yaml addons/multinode/kubedns*.yaml
cd ${TEMP_DIR} && sed -i.back "s|__PILLAR__DNS__DOMAIN__|cluster.local|g" addons/singlenode/kubedns*.yaml addons/multinode/kubedns*.yaml
cd ${TEMP_DIR} && rm -f addons/singlenode/*.back addons/multinode/*.back static-pods/*.back

# Make scripts executable before they are copied into the Docker image. If we make them executable later, in another layer
# they'll take up twice the space because the new executable binary differs from the old one, but everything is cached in layers.
cd ${TEMP_DIR} && chmod a+rx \
hyperkube \
setup-files.sh \
make-ca-cert.sh \
copy-addons.sh

ifeq ($(ARCH),amd64)
# When building "normally" for amd64, remove the whole line, it has no part in the amd64 image
Expand Down
5 changes: 1 addition & 4 deletions cluster/images/hyperkube/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
### hyperkube

`hyperkube` is an all-in-one binary for the Kubernetes server components
Also, it's very easy to run this `hyperkube` setup dockerized.
See https://github.com/kubernetes/kubernetes/blob/master/docs/devel/local-cluster/docker.md for up-to-date commands.

`hyperkube` is built for multiple architectures and _pushed automatically on every release._
`hyperkube` is built for multiple architectures and _the image is pushed automatically on every release._

#### How to release by hand

Expand Down
10 changes: 0 additions & 10 deletions cluster/images/hyperkube/cni-conf/10-containernet.conf

This file was deleted.

3 changes: 0 additions & 3 deletions cluster/images/hyperkube/cni-conf/99-loopback.conf

This file was deleted.

34 changes: 0 additions & 34 deletions cluster/images/hyperkube/copy-addons.sh

This file was deleted.

51 changes: 0 additions & 51 deletions cluster/images/hyperkube/kube-proxy-ds.yaml

This file was deleted.

75 changes: 0 additions & 75 deletions cluster/images/hyperkube/setup-files.sh

This file was deleted.

52 changes: 0 additions & 52 deletions cluster/images/hyperkube/static-pods/addon-manager-multinode.json

This file was deleted.

52 changes: 0 additions & 52 deletions cluster/images/hyperkube/static-pods/addon-manager-singlenode.json

This file was deleted.