Add ppc64le/s390x support to generate operators from the testdata samples #5784
Labels
language/ansible
Issue is related to an Ansible operator project
language/go
Issue is related to a Go operator project
language/helm
Issue is related to a Helm operator project
Feature Request
Describe the problem you need a feature to resolve.
On
ppc64le
ors390x
architectures, we have issues when trying to generate the operator-sdk Ansible/Helm testdata samples or building Ansible/Go/Helm-based operators using operator-sdk and these testdata samples:kustomize
binary v3.8.7 doesn't exist for ppc64le/s390x failing themake generate
command.manager
binary inside the Golang manager images is built using the amd64 arch. So the Go-based operatorcreated following operator-sdk quick-start can not be installed on ppc64 or s390x cluster.
opm
binary v1.19.1 used to build the catalog images for the Ansible/Go/Helm samples doesn't exist for ppc64le/s390x.So the curl command to get the opm binary will create a bin/opm file containing 'Not Found'.
Describe the solution you'd like.
Concerning the
kustomize
binary,kubebuilder for Go, in
pkg/plugins/golang/v3/scaffolds/internal/templates/makefile.go
and inoperator-sdk for Ansible & Helm in
internal/plugins/ansible/v1/scaffolds/internal/templates/makefile.go
and ininternal/plugins/helm/v1/scaffolds/internal/templates/makefile.go
.Concerning the
manager
binary in the Go manager image, since the the testdata Go samples are generated fromkubebuilder
, the change could be done inkubebuilder
inpkg/plugins/golang/v3/scaffolds/internal/templates/makefile.go
andpkg/plugins/golang/v3/scaffolds/internal/templates/dockerfile.go
to pass the GOARCH to the Dockerfile in order to build themanager
binary with the correct arch. Currently, we have:RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o manager main.go
Concerning the
opm
binary, the version could be upgraded to a version 1.20+ which supports both ppc64le and s390x.operator-framework/operator-sdk#5674, operator-framework/operator-sdk#5736 and operator-framework/operator-sdk#5676 were initially opened to fix these issues on P and Z, but the proposed changes were wrong since they were done directly in the testdata directory of operator-sdk, which is a generated directory. So the change has to be made in kubebuider or in the operator-sdk generating the testdata content.
/language go
/language ansible
/language helm
The text was updated successfully, but these errors were encountered: