Skip to content

Cross Platform docker-buildx target does not work #48

@rooftopcellist

Description

@rooftopcellist

Bug Report

Currently, there are two separate issues with the make docker-buildx target in the Makefile that the ansible-operator-sdk lays down.

Problem 1

The test target does not exist, so it immediately fails because of this.

Problem 2
The sed command to add a line to a temporary Dockerfile.cross file for specifying BUILDPLATFORM is not needed, and actually causes issues. See this comment for more details:

I think that the diff here should be added to the examples in the ansible-operator-plugins repo.

Please let me know your thoughts, I'm happy to chat more!


What did you expect to see?

The make docker-buildx command fails immediately because the test target does not exist.

Additionally, once this part is fixed, the arches specified in the PLATFORMS env variable are not honored.

What did you see instead? Under which circumstances?

[chadams@awx eda-server-operator]$ PLATFORM=linux/arm64 make docker-buildx
make: *** No rule to make target 'test', needed by 'docker-buildx'.  Stop.

Environment

Operator type:

Ansible Operatore

Kubernetes cluster type:

Any

$ operator-sdk version

$ operator-sdk version
operator-sdk version: "v1.22.0", commit: "9e95050a94577d1f4ecbaeb6c2755a9d2c231289", kubernetes version: "1.24.1", go version: "go1.18.3", GOOS: "linux", GOARCH: "amd64"

$ kubectl version

Client Version: version.Info{Major:"1", Minor:"26+", GitVersion:"v1.26.7-dispatcher", GitCommit:"ae4b8e29ab9af72b4099cf8f5c6e768526c37da3", GitTreeState:"clean", BuildDate:"2023-07-26T00:32:42Z", GoVersion:"go1.20.6", Compiler:"gc", Platform:"linux/amd64"}
Kustomize Version: v4.5.7

Possible Solution

Described above

Additional context

Context in this PR for the EDA Server Operator:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions