Skip to content

Conversation

@kabhiibm
Copy link

@kabhiibm kabhiibm commented Oct 3, 2025

This PR introduces ppc64le support for the test-tools image, a crucial step toward building and running KEDA on the ppc64le architecture.

Key Changes:

  • Updated tools/Dockerfile to support ppc64le builds.
  • Modified the Makefile to enable ppc64le architecture compatibility.

With these enhancements, the test-tools image can be successfully built and utilized for KEDA development on ppc64le.

Signed-off-by: kabhiibm <kumar.abhishek2@ibm.com>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enables support for the ppc64le architecture in KEDA's test-tools image to expand platform compatibility for development and testing.

  • Adds ppc64le architecture handling to the Dockerfile for Go, kubectl, and protobuf installations
  • Updates the Makefile to include ppc64le in the supported build platforms
  • Implements architecture-specific installation logic to handle different binary naming conventions

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
tools/Dockerfile Adds ppc64le architecture support with case statements for Go, kubectl, GitHub CLI, and protobuf installations
Makefile Includes linux/ppc64le in the BUILD_PLATFORMS variable for multi-platform builds

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

"amd64") PROTOC_ARCH="x86_64" ;; \
"arm64") PROTOC_ARCH="aarch_64" ;; \
"s390x") PROTOC_ARCH="s390_64" ;; \
"ppc64el" | "ppc64le") PROTOC_ARCH="ppcle_64" ;; \
Copy link

Copilot AI Oct 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The protobuf architecture name 'ppcle_64' appears to be incorrect. Based on the protobuf releases, the correct architecture name should be 'ppc_64' for ppc64le.

Suggested change
"ppc64el" | "ppc64le") PROTOC_ARCH="ppcle_64" ;; \
"ppc64el" | "ppc64le") PROTOC_ARCH="ppc_64" ;; \

Copilot uses AI. Check for mistakes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please double check this, it could be a halucination

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

curl -LO "https://dl.k8s.io/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/$(dpkg --print-architecture)/kubectl.sha256" && \
RUN ARCH=$(dpkg --print-architecture) && \
case "$ARCH" in \
"ppc64le" | "ppc64el") \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we have have both *le and *el?

Copy link

@jkyros jkyros Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

debian uses ppc64el for their dpkg arch whereas it looks like everyone else uses ppc64le. I wouldn't think we'd need the or though unless this is future-proofing in the event we ever converted this to build in a non-debian image?

@jkyros
Copy link

jkyros commented Jan 27, 2026

@kabhiibm you still around for this one? I ran across it (hilariously) working with IBM testing this downstream on ppcle64 and we needed ppc builds of the test tools.

@prb112
Copy link

prb112 commented Jan 27, 2026

@jkyros ppcle64 ? ppc64le is common ppc64el is the alternative.

@kabhiibm
Copy link
Author

@kabhiibm you still around for this one? I ran across it (hilariously) working with IBM testing this downstream on ppcle64 and we needed ppc builds of the test tools.

@jkyros Since the image uses ubuntu as base image on ppc64le arch and the packages which I found to install in the image is available with ppc64el suffix. So to overcome it I have provided both alternative in the case condition. @prb112 is right in his response:

@jkyros ppcle64 ? ppc64le is common ppc64el is the alternative.

Here is the arch command I have checked on our ubuntu system:

buntu@kumar-argo:~$ arch
ppc64le
ubuntu@kumar-argo:~$ dpkg --print-architecture
ppc64el
ubuntu@kumar-argo:~$

@jkyros
Copy link

jkyros commented Jan 29, 2026

@kabhiibm Right, right, we're all in agreement I think. I was just sloppy when I typed ppcle64 in my ping to you (that wasn't supposed to mean anything). 😅

Ubuntu is a debian derivative so my response to Zbynek was more or less to be taken as "It's weird, but debian just calls it something different than what everyone else does in their URLs"

So to overcome it I have provided both alternative in the case condition. @prb112 is right in his response:

But to Zbynek's question, I would expect dpkg --print-architecture to always return ppc64el because that's what debian/ubuntu calls it, right? Are you saying that you believe there are circumstances where dpkg --print-architecture can return ppc64le that would necessitate having both there in that "case in" statement?

@kabhiibm
Copy link
Author

@jkyros .. I also haven't came across any situation where dpkg --print-architecture returned ppc64le in place of ppc64el. It shouldn't be possible.

I had included ppc64le for future reference if base image changes from ubuntu to some other image. It would require minimum change and to keep it readable for developer (from Power perspective).

We can remove the ppc64le in case in statement if it isn't needed for now and put a comment to consider ppc64el as Power.

@prb112
Copy link

prb112 commented Jan 29, 2026

Hey @kabhiibm can you update

and add ppc64le

I'd recommend leaving the current approach you have for selecting/comparing arch. Or just adding a comment to avoid future regressions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants