Details
-
Task
-
Resolution: Fixed
-
Major
-
None
-
None
-
None
-
None
-
3 - Krack the whip
-
1
Description
To support shipping ARM-based Docker images for couchbase-exporter, and couchbase-fluent-bit, we first need the "make dist" artifact producer by Dev to include ARM binaries.
couchbase-operator already does this. IMO the mechanism by which it does this is somewhat overwrought and difficult to maintain (it has the build toolchain in multi-arch docker images and uses "docker build" to build and extract the binaries), but it does work. The directory layout in the -image file is quite reasonable:
-rw-rw-r-- 1 couchbase couchbase 213 Sep 26 05:35 Dockerfile |
-rw-rw-r-- 1 couchbase couchbase 1546 Sep 26 05:35 Dockerfile.rhel |
drwxrwxr-x 2 couchbase couchbase 4096 Sep 26 05:35 kubernetes-linux-amd64 |
drwxrwxr-x 2 couchbase couchbase 4096 Sep 26 05:38 kubernetes-linux-arm64 |
drwxrwxr-x 2 couchbase couchbase 4096 Sep 26 05:39 openshift-linux-amd64 |
drwxrwxr-x 2 couchbase couchbase 4096 Sep 26 05:41 openshift-linux-arm64 |
|
./kubernetes-linux-amd64:
|
-rwxrwxr-x 1 couchbase couchbase 51087059 Sep 26 05:35 couchbase-operator |
|
./kubernetes-linux-arm64:
|
-rwxrwxr-x 1 couchbase couchbase 49919868 Sep 26 05:38 couchbase-operator |
|
./openshift-linux-amd64:
|
-rwxrwxr-x 1 couchbase couchbase 51087019 Sep 26 05:39 couchbase-operator |
|
./openshift-linux-arm64:
|
-rwxrwxr-x 1 couchbase couchbase 49919892 Sep 26 05:41 couchbase-operator |
And then the Dockerfile uses TARGETARCH to include the correct binary, eg.
FROM scratch
|
|
ARG TARGETARCH
|
|
COPY kubernetes-linux-${TARGETARCH}/couchbase-operator /usr/local/bin/couchbase-operator
|
And similarly using openshift-linux-${TARGETARCH} in Dockerfile.rhel.
Attachments
Issue Links
For Gerrit Dashboard: K8S-2849 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
181031,6 | K8S-2849: Added ARM support | main | couchbase-fluent-bit | Status: MERGED | +2 | +1 |
181034,2 | K8S-2849: Added arm support | master | couchbase-exporter | Status: MERGED | +2 | +1 |