Skip to content

Commit 27ff123

Browse files
Migrate to SLE BCI images (#193)
* migrate to SLE BCI images * remove arm pipeline We do not need to build for armv7 anymore and there are no SLE BCI images available for it.
1 parent e29895b commit 27ff123

File tree

6 files changed

+21
-89
lines changed

6 files changed

+21
-89
lines changed

.drone.yml

Lines changed: 0 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -247,71 +247,6 @@ volumes:
247247
host:
248248
path: /var/run/docker.sock
249249

250-
---
251-
kind: pipeline
252-
name: arm
253-
254-
platform:
255-
os: linux
256-
arch: arm
257-
258-
steps:
259-
- name: build
260-
image: rancher/dapper:v0.5.0
261-
commands:
262-
- dapper ci
263-
volumes:
264-
- name: docker
265-
path: /var/run/docker.sock
266-
267-
- name: upload-artifacts
268-
image: plugins/github-release
269-
settings:
270-
api_key:
271-
from_secret: github_token
272-
prerelease: true
273-
checksum:
274-
- sha256
275-
checksum_file: CHECKSUMsum-arm.txt
276-
checksum_flatten: true
277-
files:
278-
- "dist/artifacts/*"
279-
when:
280-
instance:
281-
- drone-publish.rancher.io
282-
ref:
283-
- refs/head/master
284-
- refs/tags/*
285-
event:
286-
- tag
287-
288-
- name: push-controller
289-
image: plugins/docker
290-
settings:
291-
dockerfile: package/Dockerfile
292-
build_args:
293-
- ARCH=arm
294-
- TAG=${DRONE_TAG}-arm
295-
password:
296-
from_secret: docker_password
297-
repo: "rancher/system-upgrade-controller"
298-
tag: "${DRONE_TAG}-arm"
299-
username:
300-
from_secret: docker_username
301-
when:
302-
instance:
303-
- drone-publish.rancher.io
304-
ref:
305-
- refs/head/master
306-
- refs/tags/*
307-
event:
308-
- tag
309-
310-
volumes:
311-
- name: docker
312-
host:
313-
path: /var/run/docker.sock
314-
315250
---
316251
kind: pipeline
317252
name: manifest
@@ -331,7 +266,6 @@ steps:
331266
platforms:
332267
- linux/amd64
333268
- linux/arm64
334-
- linux/arm
335269
- linux/s390x
336270
target: "rancher/system-upgrade-controller:${DRONE_TAG}"
337271
template: "rancher/system-upgrade-controller:${DRONE_TAG}-ARCH"
@@ -369,4 +303,3 @@ depends_on:
369303
- amd64
370304
- s390x
371305
- arm64
372-
- arm

Dockerfile.dapper

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
ARG KUBECTL=rancher/kubectl:v1.21.9
22
FROM ${KUBECTL} AS kubectl
33

4-
FROM golang:1.16-alpine3.14
4+
FROM registry.suse.com/bci/golang:1.17-11.33
55

66
COPY --from=kubectl /bin/kubectl /usr/local/bin/kubectl
77
# COPY --from=sonobuoy /sonobuoy /usr/local/bin/sonobuoy
88

99
ARG DAPPER_HOST_ARCH
1010
ENV ARCH $DAPPER_HOST_ARCH
1111

12-
RUN apk -U add coreutils bash expect git gcc jq musl-dev docker docker-compose vim less file curl wget ca-certificates iproute2
12+
RUN zypper -n install expect git jq docker vim less file curl wget iproute2 gawk
13+
# Manual install of docker-compose, only needed for e2e tests on amd64
14+
RUN if [ "${ARCH}" == "amd64" ]; then \
15+
curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-Linux-x86_64" -o /usr/local/bin/docker-compose && \
16+
chmod +x /usr/local/bin/docker-compose; \
17+
fi
1318
RUN go install github.com/mgechev/[email protected] && \
1419
rm -rf /go/src /go/pkg
1520
RUN go install golang.org/x/tools/cmd/goimports@latest && \

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ spec:
113113
tolerations:
114114
- {key: kubernetes.io/arch, effect: NoSchedule, operator: Equal, value: amd64}
115115
- {key: kubernetes.io/arch, effect: NoSchedule, operator: Equal, value: arm64}
116-
- {key: kubernetes.io/arch, effect: NoSchedule, operator: Equal, value: arm}
116+
- {key: kubernetes.io/arch, effect: NoSchedule, operator: Equal, value: s390x}
117117
118118
# The prepare init container, if specified, is run before cordon/drain which is run before the upgrade container.
119119
# Shares the same format as the `upgrade` container.

e2e/cluster/local/images/k3s/Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
# Install the all-in-one binary so we can copy our run-time images into the image
22
# which helps avoid pulling them when running e2e tests.
3-
ARG ALPINE="library/alpine:3.14"
4-
FROM ${ALPINE} AS k3s
3+
ARG SLES="registry.suse.com/suse/sle15:15.3"
4+
FROM ${SLES} AS k3s
55
ARG ARCH
66
ARG K3S_VERSION="v1.21.9+k3s1"
77
RUN set -x \
8-
&& apk --no-cache add \
9-
bash \
8+
&& zypper -n in \
109
ca-certificates \
1110
curl \
1211
&& if [ "${ARCH?required}" != "amd64" ]; then \

e2e/cluster/local/scripts/cluster-prepare

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -e
44

55
: "${ARCH?required}"
66
: "${DIST?required}"
7-
: "${ALPINE_TAG:=3.14}"
7+
: "${SLES_TAG:=15.3}"
88
: "${KUBECTL_TAG:=v1.21.9}"
99
: "${SONOBUOY_TAG:=v0.56.2}"
1010

@@ -15,15 +15,15 @@ docker-image-save() {
1515
echo "Tagging '$1:$2' as '$1:latest' ..."
1616
docker image tag "$1:$2" "$1:latest"
1717

18-
echo "Saving '$1' images to '$(dirname $0)/../images/k3s/scratch/${1/\//-}-${ARCH}.tar' ..."
19-
docker image save --output "$(dirname $0)/../images/k3s/scratch/${1/\//-}-${ARCH}.tar" "$1:$2" "$1:latest"
18+
echo "Saving '$1' images to '$(dirname $0)/../images/k3s/scratch/${1//\//-}-${ARCH}.tar' ..."
19+
docker image save --output "$(dirname $0)/../images/k3s/scratch/${1//\//-}-${ARCH}.tar" "$1:$2" "$1:latest"
2020
}
2121

2222
rm -rf $(dirname $0)/../images/*/scratch/*
2323

2424
cp -vf "${DIST}/system-upgrade-controller-${ARCH}.tar" $(dirname $0)/../images/k3s/scratch/
2525
cp -vf "${DIST}/system-upgrade-controller-e2e-tests-${ARCH}.tar" $(dirname $0)/../images/k3s/scratch/
2626

27-
docker-image-save "library/alpine" "${ALPINE_TAG}"
27+
docker-image-save "registry.suse.com/suse/sle15" "${SLES_TAG}"
2828
docker-image-save "rancher/kubectl" "${KUBECTL_TAG}"
2929
docker-image-save "sonobuoy/sonobuoy" "${SONOBUOY_TAG}"

package/Dockerfile

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,22 @@
1-
ARG ALPINE=alpine:3.14
2-
ARG GOLANG=golang:1.16-alpine3.14
1+
ARG SLES=registry.suse.com/suse/sle15:15.3
2+
ARG GOLANG=registry.suse.com/bci/golang:1.17-11.33
33

44
FROM ${GOLANG} AS e2e-ginkgo
55
ENV GOBIN=/bin
6-
RUN set -x \
7-
&& apk add --no-cache \
8-
ca-certificates \
9-
git \
10-
&& go install github.com/onsi/ginkgo/[email protected]
6+
RUN go install github.com/onsi/ginkgo/[email protected]
117

12-
FROM ${ALPINE} AS e2e-tests
8+
FROM ${SLES} AS e2e-tests
139
ARG ARCH
1410
ARG REPO=rancher
1511
ARG TAG
1612
ENV SYSTEM_UPGRADE_CONTROLLER_IMAGE=${REPO}/system-upgrade-controller:${TAG}
17-
RUN set -x \
18-
&& apk add --no-cache \
19-
bash
2013
COPY --from=e2e-ginkgo /bin/ginkgo /bin/ginkgo
2114
COPY dist/artifacts/system-upgrade-controller.test-${ARCH} /bin/system-upgrade-controller.test
2215
COPY e2e/plugin/run.sh /run.sh
2316
RUN set -x \
2417
&& chmod +x /run.sh
18+
RUN set -x \
19+
&& zypper -n in tar gzip
2520
ENTRYPOINT ["/run.sh"]
2621

2722
FROM scratch AS controller

0 commit comments

Comments
 (0)