Skip to content

Commit

Permalink
images: Move hubble-proto into cilium-builder
Browse files Browse the repository at this point in the history
This commit consolidates the `hubble-proto` image (used to build the
Hubble protobuf definitions) and the `cilium-builder` image. While this
increases the download size for developers just needing to regenerate
the Hubble API definitions, removing `hubble-proto` reduces the
maintenance overhead of our developer images (for example,
`hubble-proto` currently lacks the required GitHub Action to build and
push it to docker.io).

The new api/v1/Makefile using this image will is added in a subsequent
commit.

Signed-off-by: Sebastian Wicki <sebastian@isovalent.com>
  • Loading branch information
gandro authored and twpayne committed May 20, 2021
1 parent af183e0 commit 2960b4e
Show file tree
Hide file tree
Showing 15 changed files with 24 additions and 154 deletions.
4 changes: 2 additions & 2 deletions images/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ anyone reading this document should also read [`cilium/image-tools` documentatio

This image is based on `runtime` image.

It adds `protoc`, Go toolchain, and includes `ineffassign`. The aim is to
include all the Go linters as well.
It adds `protoc` and plugins, Go toolchain, and includes `ineffassign`.
The aim is to include all the Go linters as well.

### [`runtime`](runtime/Dockerfile)

Expand Down
3 changes: 3 additions & 0 deletions images/builder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ RUN --mount=type=bind,readwrite,target=/go/src/github.com/cilium/cilium/images/b
RUN --mount=type=bind,readwrite,target=/go/src/github.com/cilium/cilium/images/builder \
./install-protoc.sh

RUN --mount=type=bind,readwrite,target=/go/src/github.com/cilium/cilium/images/builder \
./install-protoplugins.sh

# used to facilitate the verifier tests
COPY --from=llvm-dist /usr/local/bin/llvm-objcopy /bin/

Expand Down
2 changes: 1 addition & 1 deletion images/builder/install-protoc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ unzip /tmp/protoc.zip -x readme.txt -d /usr/local

# correct permissions for others
chmod o+rx /usr/local/bin/protoc
chmod o+rX -R /usr/local/include/google/protobuf
chmod o+rX -R /usr/local/include/google/
14 changes: 14 additions & 0 deletions images/builder/install-protoplugins.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

set -o xtrace
set -o errexit
set -o pipefail
set -o nounset

# FIXME: Update these versions once etcd-client 3.5 is released.
# These versions are pinned to support our older grpc-go 1.29 library,
# which required to build the version of the etcd client used in Cilium.
# See https://github.com/cilium/cilium/pull/13405#issuecomment-704766707
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@cee815d
go install github.com/golang/protobuf/protoc-gen-go@v1.4.3
go install github.com/mitchellh/protoc-gen-go-json@v1.0.0
2 changes: 1 addition & 1 deletion images/cilium-test/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Copyright 2020-2021 Authors of Cilium
# SPDX-License-Identifier: Apache-2.0

ARG CILIUM_BUILDER_IMAGE=quay.io/cilium/cilium-builder:330ca61256fedd7b8cbfc34b31316c97d1880876@sha256:e535425dd77cf29f289fa402d8811491617e2b8fe741db4a36ca6acc590006c1
ARG CILIUM_BUILDER_IMAGE=quay.io/cilium/cilium-builder:3e04d507e2f7a0b569490060ddc8b9423c9fc8f0@sha256:7949a297fd2f07a008ef8a163ed84bfb338a37f3b36b68c2c9c5fddb324d325f
ARG UBUNTU_IMAGE=docker.io/library/ubuntu:20.04@sha256:cf31af331f38d1d7158470e095b132acd126a7180a54f263d386da88eb681d93

FROM ${UBUNTU_IMAGE} as rootfs
Expand Down
2 changes: 1 addition & 1 deletion images/cilium/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Copyright 2020-2021 Authors of Cilium
# SPDX-License-Identifier: Apache-2.0

ARG CILIUM_BUILDER_IMAGE=quay.io/cilium/cilium-builder:330ca61256fedd7b8cbfc34b31316c97d1880876@sha256:e535425dd77cf29f289fa402d8811491617e2b8fe741db4a36ca6acc590006c1
ARG CILIUM_BUILDER_IMAGE=quay.io/cilium/cilium-builder:3e04d507e2f7a0b569490060ddc8b9423c9fc8f0@sha256:7949a297fd2f07a008ef8a163ed84bfb338a37f3b36b68c2c9c5fddb324d325f
ARG CILIUM_RUNTIME_IMAGE=quay.io/cilium/cilium-runtime:07ea8061d047c1085f99916c09d1d9b4c214040b@sha256:f3f8b38ab591055b94a1720d6cda0beabe75c65f2d74e32b65388e4333de7f2c

# cilium-envoy from github.com/cilium/proxy
Expand Down
38 changes: 0 additions & 38 deletions images/hubble-proto/Dockerfile

This file was deleted.

12 changes: 0 additions & 12 deletions images/hubble-proto/Makefile

This file was deleted.

4 changes: 0 additions & 4 deletions images/hubble-proto/Makefile.defs

This file was deleted.

35 changes: 0 additions & 35 deletions images/hubble-proto/Makefile.docker

This file was deleted.

14 changes: 0 additions & 14 deletions images/hubble-proto/install-glibc.sh

This file was deleted.

19 changes: 0 additions & 19 deletions images/hubble-proto/install-protoc.sh

This file was deleted.

25 changes: 0 additions & 25 deletions images/hubble-proto/install-protoplugins.sh

This file was deleted.

2 changes: 1 addition & 1 deletion test/k8sT/manifests/demo-customcalls.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ metadata:
spec:
containers:
- name: cilium-builder
image: quay.io/cilium/cilium-builder:330ca61256fedd7b8cbfc34b31316c97d1880876@sha256:e535425dd77cf29f289fa402d8811491617e2b8fe741db4a36ca6acc590006c1
image: quay.io/cilium/cilium-builder:3e04d507e2f7a0b569490060ddc8b9423c9fc8f0@sha256:7949a297fd2f07a008ef8a163ed84bfb338a37f3b36b68c2c9c5fddb324d325f
workingDir: /cilium
command: ["sleep"]
args:
Expand Down
2 changes: 1 addition & 1 deletion test/k8sT/manifests/test-verifier.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
spec:
containers:
- name: cilium-builder
image: quay.io/cilium/cilium-builder:330ca61256fedd7b8cbfc34b31316c97d1880876@sha256:e535425dd77cf29f289fa402d8811491617e2b8fe741db4a36ca6acc590006c1
image: quay.io/cilium/cilium-builder:3e04d507e2f7a0b569490060ddc8b9423c9fc8f0@sha256:7949a297fd2f07a008ef8a163ed84bfb338a37f3b36b68c2c9c5fddb324d325f
workingDir: /cilium
command: ["sleep"]
args:
Expand Down

0 comments on commit 2960b4e

Please sign in to comment.