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

Add possibility to choose podman instead of docker for building golang operator, bundle and catalog image #6089

Closed
stanislavulrych opened this issue Oct 15, 2022 · 16 comments
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. language/go Issue is related to a Go operator project lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Milestone

Comments

@stanislavulrych
Copy link

Feature Request

Description

Currently, the docker is used as a build tool for operator images. Other container tools could be used to build the images. Since podman cli has syntax compatible with docker, it could be easily used by just allowing a change of the tool.

  • In order to change the container tool for image build, it has to be changed on mulltiple locations in the Makefile.
  • The suggested feature would introduce the Makefile variable CONTAINER_TOOL to allow setting of the container tool for build.
  • The default value of the CONTAINER_TOOL would be docker, hence this feature is backward compatible and does not impact the current usage.

/language go

@openshift-ci openshift-ci bot added the language/go Issue is related to a Go operator project label Oct 15, 2022
stanislavulrych added a commit to stanislavulrych/operator-sdk that referenced this issue Oct 15, 2022
…or-framework#6089)

Signed-off-by: Stanislav Ulrych <stanislav.ulrych@getmanta.com>
stanislavulrych added a commit to stanislavulrych/operator-sdk that referenced this issue Oct 17, 2022
…or-framework#6089)

Signed-off-by: Stanislav Ulrych <stanislav.ulrych@getmanta.com>
stanislavulrych added a commit to stanislavulrych/operator-sdk that referenced this issue Oct 17, 2022
…or-framework#6089)

Signed-off-by: Stanislav Ulrych <stanislav.ulrych@getmanta.com>
stanislavulrych added a commit to stanislavulrych/operator-sdk that referenced this issue Oct 17, 2022
…or-framework#6089)

Signed-off-by: Stanislav Ulrych <stanislav.ulrych@getmanta.com>
stanislavulrych added a commit to stanislavulrych/operator-sdk that referenced this issue Oct 17, 2022
…or-framework#6089)

Signed-off-by: Stanislav Ulrych <stanislav.ulrych@getmanta.com>
@kensipe kensipe added this to the v1.26.0 milestone Oct 17, 2022
stanislavulrych added a commit to stanislavulrych/operator-sdk that referenced this issue Oct 17, 2022
…or-framework#6089)

Signed-off-by: Stanislav Ulrych <stanislav.ulrych@gmail.com>
stanislavulrych added a commit to stanislavulrych/operator-sdk that referenced this issue Oct 17, 2022
…or-framework#6089)

Signed-off-by: Stanislav Ulrych <stanislav.ulrych@gmail.com>
@mhrivnak
Copy link
Member

+1. I've had success both doing a find/replace in the Makefile, and installing the podman-docker package in fedora, which just creates a shell alias. Either way, the workflows in the Makefile seem completely compatible.

@jberkhahn jberkhahn modified the milestones: v1.26.0, v1.27.0 Nov 23, 2022
@everettraven
Copy link
Contributor

#6090 was created to address this. In the process of creating the PR it was determined that changes upstream in Kubebuilder would need to be made to add conditional logic to run a different set of commands for building multi-arch images when using podman instead of docker.

@stanislavulrych mentioned trying to take this on in a comment on the PR: #6090 (comment)

@stanislavulrych
Copy link
Author

@everettraven I am sorry for the delay, I tried to address the issue in kubebuilder, but I am not familiar with the code much, so it will take me more time. I am still interested in the feature.

@everettraven
Copy link
Contributor

@stanislavulrych No worries! I was asked during our community meeting to add an update comment so that's all that comment is supposed to be

@varshaprasad96 varshaprasad96 modified the milestones: v1.26.0, v1.27.0 Nov 28, 2022
@varshaprasad96
Copy link
Member

This seems to be blocked by Kubebuilder. Removing this from milestone and adding to the backlog. If anyone is interested in picking this up, please feel free to assign yourself.

@varshaprasad96 varshaprasad96 removed this from the v1.27.0 milestone Jan 4, 2023
@varshaprasad96 varshaprasad96 added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Jan 4, 2023
@varshaprasad96 varshaprasad96 added this to the Backlog milestone Jan 9, 2023
@everettraven
Copy link
Contributor

/unassign

@redhatrises
Copy link
Contributor

@everettraven @varshaprasad96 feel free to assign me to it. I will work on getting it into kubebuilder if no one else has.

@redhatrises
Copy link
Contributor

Upstream PR: kubernetes-sigs/kubebuilder#3371

@KevinMGranger
Copy link

It's merged upstream, woo! So what's the next step now?

@everettraven
Copy link
Contributor

The next step would be to update our Kubebuilder dependency to a version that contains the commit with this change. Then we should automatically inherit that behavior 🎉

@redhatrises
Copy link
Contributor

redhatrises commented May 19, 2023

Can the existing implementation be used in init.go and just updated? Or does there need to be a v4 version of the plugin here in this SDK?

@everettraven
Copy link
Contributor

So it looks like we do have an implementation for the go/v4 plugin in place here but is still in "alpha":

gov4AlphaBundle, _ := plugin.NewBundle(golang.DefaultNameQualifier, plugin.Version{Number: 4, Stage: stage.Alpha},
kustomizev2Alpha.Plugin{},
// # TODO(rashmigottipati): make v4 stable with the next release of KB
// as `go/v3` is getting deprecated by KB hence Operator SDK would also be migrating to v4 soon.
golangv4.Plugin{},
manifestsv2.Plugin{},
scorecardv2.Plugin{},
)

When we bump our kubebuilder dependency we need to:

  • Update the go/v4 plugin to be stable (unmark it as alpha)
  • Remove the go/v2 plugin (earlier in the file that contains the code I shared above)
  • Mark the go/v3 plugin as deprecated (earlier in the file that contains the code I shared above)
  • Make go/v4 the default plugin used (if not already)

IIUC the changes made in Kubebuilder, once this is done we should inherit those changes

@openshift-bot
Copy link

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci openshift-ci bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 21, 2023
@openshift-bot
Copy link

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten
/remove-lifecycle stale

@openshift-ci openshift-ci bot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Sep 20, 2023
@openshift-bot
Copy link

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

@openshift-ci
Copy link

openshift-ci bot commented Oct 21, 2023

@openshift-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

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.

@openshift-ci openshift-ci bot closed this as completed Oct 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. language/go Issue is related to a Go operator project lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

9 participants