Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross Platform docker-buildx target does not work #48

Closed
rooftopcellist opened this issue Jan 7, 2024 · 3 comments · Fixed by #49
Closed

Cross Platform docker-buildx target does not work #48

rooftopcellist opened this issue Jan 7, 2024 · 3 comments · Fixed by #49

Comments

@rooftopcellist
Copy link
Contributor

rooftopcellist commented Jan 7, 2024

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:

Copy link

openshift-ci bot commented Jan 7, 2024

@rooftopcellist: The label(s) language/ansible cannot be applied, because the repository doesn't have them.

In response to this:

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 TARGETPLATFORM 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 do?

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:

/language ansible

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:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@everettraven
Copy link
Collaborator

Thanks for creating this issue @rooftopcellist ! Would you be interested in creating a PR with the fix?

@rooftopcellist
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants