crossplane-contrib / provider-terraform

A @crossplane provider for Terraform
Apache License 2.0
94 stars 28 forks source link

ARM Images not being built #120

Closed fabioaraujopt closed 1 year ago

fabioaraujopt commented 1 year ago

ARM images are not being built, if you look into:

https://hub.docker.com/r/crossplane/provider-terraform-controller/tags

Manifest only have amd64 images.

Also here

https://hub.docker.com/r/crossplane/provider-terraform-controller-arm64/tags

Only amd64 images..

ytsarev commented 1 year ago

thanks for the report.

We need to update the packaging mechanism to use a combined(controller+CRD) image following the latest approach, it might inherently fix the issue.

fabioaraujopt commented 1 year ago

I believe this is the cause for this error right??

cannot initialize Terraform configuration: fork/exec /bin/terraform: exec format error

ytsarev commented 1 year ago

yes, looks like it

ytsarev commented 1 year ago

@fabioaraujopt looks like it is already fixed by https://github.com/crossplane-contrib/provider-terraform/pull/112

Please see the build from master which contains both amd64 and arm64 architectures https://hub.docker.com/layers/crossplanecontrib/provider-terraform/v0.5.0-rc.0.1.g0683c5a/images/sha256-86bb79122fa5b2a837c67543c7e83cc51a922ac25819555bdc99ac272752e7ab?context=explore

It will be available automatically in the next standard release as the pipelines are already adjusted properly

ytsarev commented 1 year ago

I will keep this issue open until the next release.

fabioaraujopt commented 1 year ago

Amazing job @ytsarev !

loafoe commented 1 year ago

Hi @ytsarev @fabioaraujopt the issue seems to be that Hashicorp does not provide arm64 Terraform Docker images at all, so the terraform binary would always be the amd64 one. I created a PR #126 which pulls in some parts of the upjet based build process to deal with this. Essentially, it downloads release binaries instead of using the Hashicorp base image. I'm testing this on on an rpi4 based cluster and so far so good.

ytsarev commented 1 year ago

@loafoe I didn't realize the problem with the origin image; thanks a lot for finding it!