Skip to content

tools: add support for specifying other container engines - #1649

Merged
k8s-ci-robot merged 1 commit into
kubernetes-sigs:masterfrom
slashpai:podman-support
May 6, 2025
Merged

k8s-ci-robot merged 1 commit into
kubernetes-sigs:masterfrom
slashpai:podman-support

Conversation

@slashpai

Copy link
Copy Markdown
Member

What this PR does / why we need it:
Add support for specifying other container engines. This will help for developers who use container engines other than docker

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 25, 2025
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

Hi @slashpai. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Apr 25, 2025
Comment thread test/test-image.sh Outdated
@slashpai

Copy link
Copy Markdown
Member Author

cc @dgrisonnet @RainbowMango

@dgrisonnet

Copy link
Copy Markdown
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 25, 2025
@rexagod

rexagod commented Apr 25, 2025

Copy link
Copy Markdown
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 25, 2025
@RainbowMango

Copy link
Copy Markdown
Member

This will help for developers who use container engines other than docker

For example? Or which container engine you are using? And have you tested it?

@slashpai

Copy link
Copy Markdown
Member Author

This will help for developers who use container engines other than docker

For example? Or which container engine you are using? And have you tested it?

I use podman. It works after setting the env variable added in Makefile now. I wanted to fix the test-image job as well to run it locally on Mac. Working on that 🙂

Signed-off-by: Jayapriya Pai <janantha@redhat.com>
Comment thread test/test-image.sh

if [[ "${IMAGE_ARCH}" == $(dpkg --print-architecture) ]] ; then
CONTAINER_VERSION=$(docker run --rm ${IMAGE} --version)
if [[ "${IMAGE_ARCH}" == "${GOARCH}" ]] ; then

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

as dpkg works on Debian based systems only it was not working to run locally on mac, should be the case for other systems too which doesn't have dpkg package

@slashpai

Copy link
Copy Markdown
Member Author

Kindly review when you get a chance

@RainbowMango RainbowMango left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Generally looks good to me.
But I'm not sure if we are going to support multiple container engines cause they need more maintenance efforts.

Comment thread Makefile
BINARY_NAME:=$(BINARY_NAME).exe
endif

CONTAINER_CLI ?= docker

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Shall we add comments explaining that we currently test it with docker only?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

default is docker for ci runs similar to ARCH?=amd64 set above, not sure if we need to add specific comments for that.

The idea of having this variable is for those who use different container engine in local machine they need the change to test changes and update docs/command-line-flags.txt after regnerating.

@slashpai

Copy link
Copy Markdown
Member Author

We don't need anything else other than having the variable in Makefile so those who use other than docker it's easier 🙂

@richabanker

Copy link
Copy Markdown

/triage accepted
/assign @RainbowMango

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels May 1, 2025
@RainbowMango

Copy link
Copy Markdown
Member

Need the maintainer to make a decision about whether should we support other container engines than docker.

/assign @serathius
to take a look?

@serathius

Copy link
Copy Markdown
Member

I don't have concerns about allowing use of alternative container runtimes assuming they have the same cli interface. However, @slashpai wouldn't be just easier for you to have alias docker=podman?

@slashpai

slashpai commented May 6, 2025

Copy link
Copy Markdown
Member Author

I don't have concerns about allowing use of alternative container runtimes assuming they have the same cli interface. However, @slashpai wouldn't be just easier for you to have alias docker=podman?

I had already tried that but that didn't work while running make test-image-all

@slashpai

slashpai commented May 6, 2025

Copy link
Copy Markdown
Member Author
─ make test-image-all                                                                                           ─╯
# Pull base image explicitly. Keep in sync with Dockerfile, otherwise
# GCB builds will start failing.
docker pull golang:1.24.2
make[1]: docker: No such file or directory
make[1]: *** [container] Error 1
make: *** [test-image-all] Error 2
╭─░▒▓ ~/github.com/slashpai/metrics-server  update-deps *19 ············· 2 х  3.12.7 Py  1.24.2 Go  13:04:12 ▓▒░─╮
╰─ alias docker=podman                                                                                           ─╯
╭─░▒▓ ~/github.com/slashpai/metrics-server  update-deps *19 ··············· ✔  3.12.7 Py  1.24.2 Go  13:04:19 ▓▒░─╮
╰─ make test-image-all                                                                                           ─╯
# Pull base image explicitly. Keep in sync with Dockerfile, otherwise
# GCB builds will start failing.
docker pull golang:1.24.2
make[1]: docker: No such file or directory
make[1]: *** [container] Error 1
make: *** [test-image-all] Error 2

@serathius

Copy link
Copy Markdown
Member

/approve

@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: serathius, slashpai

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 6, 2025

@RainbowMango RainbowMango left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Need another lgtm
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 6, 2025
@k8s-ci-robot
k8s-ci-robot merged commit 1062af4 into kubernetes-sigs:master May 6, 2025
@slashpai
slashpai deleted the podman-support branch May 20, 2025 05:04
@dgrisonnet dgrisonnet mentioned this pull request Jul 3, 2025
monitoring-commit-bot Bot pushed a commit to rhobs/kubernetes-metrics-server that referenced this pull request Jul 3, 2025
Installation

kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.8.0/components.yaml

Changes since v0.7.2

Improvements

* Wire server run options to flags kubernetes-sigs#1560  kubernetes-sigs#1656 (@benluddy, @slashpai)
* Bump Golang to v1.24.4  and to Kubernetes clients to v0.33.2  kubernetes-sigs#1662, kubernetes-sigs#1665 (@dgrisonnet,@yangjunmyfm192085,@slashpai)
   *  This will help to include the `disable-http2-serving` flag added in SecureServingOptions (kubernetes/kubernetes#122176) for metrics-server
* Bump Prometheus module to v0.304.2 kubernetes-sigs#1652, kubernetes-sigs#1675 (@slashpai , @dependabot)

Tooling

* Add support for specifying other container engines kubernetes-sigs#1649 (@slashpai)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants