Uploaded image for project: 'Couchbase Kubernetes'
  1. Couchbase Kubernetes
  2. K8S-2849

Need ARM binaries for exporter, fluent-bit

    XMLWordPrintable

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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              Alex.emery Alex Emery (Inactive)
              ceej Chris Hillery
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty