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

Kicbase: update cri-o packaging sources #19504

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JanGutter
Copy link

* cri-o packages have moved to pkgs.k8s.io:
  https://kubernetes.io/blog/2023/10/10/cri-o-community-package-infrastructure/
* The new packaging format depends on some k8s distro packages.
  This makes the assumption that the most recent stable k8s is expected
  to work with the most recent stable cri-o.
* Since cri-o is also installed in the Kicbase/ISO via a different
  method, further work might still be needed for that case:
  kubernetes#18359
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 25, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: JanGutter
Once this PR has been reviewed and has the lgtm label, please assign spowelljr for approval. For more information see the Kubernetes Code Review Process.

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

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
Copy link
Contributor

Welcome @JanGutter!

It looks like this is your first PR to kubernetes/minikube 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/minikube has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 25, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @JanGutter. Thanks for your PR.

I'm waiting for a kubernetes 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.

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/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Aug 25, 2024
@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@JanGutter
Copy link
Author

I'd be happy to chat on slack, or open an issue, if needed.

@afbjorklund
Copy link
Collaborator

afbjorklund commented Aug 26, 2024

Note that the new packages are only available for "new" versions of Kubernetes.

https://kubernetes.io/blog/2023/10/10/cri-o-community-package-infrastructure/

So versions 1.24-1.27 still use the old repo, versions 1.28-1.31 use the new repo(s).

New packages contain the same binaries as the github releases / GCS cri-o/artifacts.


Replacing the other packages such as podman will take more effort, and to fix the bugs...

trying to overwrite '/usr/libexec/crio/conmon', which is also in package conmon

It would also be good if podman could be updated from 3.4.x to 4.9.x, even it not required.

@afbjorklund
Copy link
Collaborator

I'd be happy to chat on slack, or open an issue, if needed.

Podman needs a way out of "experimental" in the roadmap.

This sort-of involves also the CRI-O container runtime, at least as long as they share image storage
(Similar to how docker and containerd are connected by optionally using the same image storage...)

So that is something for https://minikube.sigs.k8s.io/community/

There is also some discussion in the upstream Kubernetes project SIGs, if it is "included" in the k8s release.
The moving of the packages and the release script is one step into make it more standard, but it missed 1.31.

@@ -101,6 +101,11 @@ var (
`kubernetesVersion:.*`: `kubernetesVersion: {{.LatestVersionP0}}`,
},
},
"deploy/kicbase/Dockerfile": {
Replace: map[string]string{
`ARG KUBERNETES_VERSION=.*`: `ARG KUBERNETES_VERSION="{{.StableVersion}}"`,
Copy link
Collaborator

Choose a reason for hiding this comment

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

The kicbase cannot have a single kubernetes version, if it is going to be reused for multiple versions.

Copy link
Author

Choose a reason for hiding this comment

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

Would it work for more cases if this kubernetes sources.list is then replaced by later tooling, when the specific version of k8s is installed?

Copy link
Collaborator

Choose a reason for hiding this comment

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

The easiest would probably be to install the CRI adapter with the Kubernetes components (like cri-tools/cni-plugins/kubeadm/kubelet/kubectl) - possibly split it out into per container runtime, like the "preload" is now?

Copy link
Collaborator

Choose a reason for hiding this comment

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

It seems like CRI-O now uses an internal bundling of crun and conmon, so it doesn't use the system installation of those anymore,,, Otherwise such shared things could go with the OS installation still, if not k8s-version specific.

Copy link
Author

Choose a reason for hiding this comment

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

Heh, the yak shaving continues (the path that led me here is quite convoluted already!), I'll check out the preload alternative.

Copy link
Collaborator

@afbjorklund afbjorklund Aug 26, 2024

Choose a reason for hiding this comment

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

Added CRI-O to the discuss items for today's meeting, since there was already some WIP PR for it

Copy link
Collaborator

Choose a reason for hiding this comment

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

Experimented with building static podman with Nix, similar to the cri-o packaging... (discussion)

@afbjorklund
Copy link
Collaborator

@afbjorklund afbjorklund added co/runtime/crio CRIO related issues triage/discuss Items for discussion labels Aug 26, 2024
@afbjorklund
Copy link
Collaborator

The new packaging format depends on some k8s distro packages.

That sounds like a bug, the cri-o package should not have any hard dependencies towards kubernetes packages.
It does depend on CRI and CNI during runtime, but those tools do not have to be provided by the other repository.

Depends: systemd-sysv,systemd,iptables
Recommends: kubernetes-cni

This makes the assumption that the most recent stable k8s is expected to work with the most recent stable cri-o.

That is not currently the case, the stable k8s was tested with a prerelease of cri-o. Users are supposed to use stable.
This means that they will (for some weeks after the release) need to run the new k8s with the old (stable) cri-o.

KUBERNETES_VERSION=v1.31
CRIO_VERSION=v1.30

@JanGutter
Copy link
Author

The new packaging format depends on some k8s distro packages.

That sounds like a bug, the cri-o package should not have any hard dependencies towards kubernetes packages. It does depend on CRI and CNI during runtime, but those tools do not have to be provided by the other repository.

Yeah, that's probably due to my misinterpretation of the instructions at https:/cri-o/packaging

This makes the assumption that the most recent stable k8s is expected to work with the most recent stable cri-o.

That is not currently the case, the stable k8s was tested with a prerelease of cri-o. Users are supposed to use stable. This means that they will (for some weeks after the release) need to run the new k8s with the old (stable) cri-o.

My assumption stemmed from the same source: it looks like they list the latest stable series of k8s (1.31) plus the latest stable series of cri-o (1.30) in the example, leading to my assumption that this is expected to work.

@JanGutter
Copy link
Author

Note that the new packages are only available for "new" versions of Kubernetes.

https://kubernetes.io/blog/2023/10/10/cri-o-community-package-infrastructure/

So versions 1.24-1.27 still use the old repo, versions 1.28-1.31 use the new repo(s).

The old repos went through a bit of instability a month or so ago - incidentally, this was one of the reasons I started going down this rabbit hole.

@afbjorklund
Copy link
Collaborator

afbjorklund commented Aug 26, 2024

The old repos went through a bit of instability a month or so ago

There has been a lot of stability issues with OBS packages over the years.


I think that the new kicbase packaging is unlikely to use the pkgs.k8s.io.

Probably go for something similar to dl.k8s.io instead, also for cri-o artifacts.

BIN_URL="https://storage.googleapis.com/cri-o/artifacts/$COMMIT/$ARCH"

See https:/cri-o/cri-o/releases for the available versions in GCS.

@afbjorklund
Copy link
Collaborator

afbjorklund commented Aug 26, 2024

Added this PR for discussion in the community meeting and the office hours, if cri-o should be prioritized...

Last time, we added improved support for Podman to the minikube roadmap - maybe also add CRI-O too ?


2021 datadog: https://www.datadoghq.com/container-report-2021/

2023 datadog: https://www.datadoghq.com/container-report/

You can clearly see cri-o being utilized more, right ? Like the Linux desktop...

https://linux.slashdot.org/story/24/08/01/2029219/linux-hits-another-desktop-market-share-record

@JanGutter
Copy link
Author

Oh man, slashdot is still going!

This whole rabbithole started when I tried to get a minimal cluster running with centos 9, podman and an ingress. The nice feature of cri-o was that I could configure registry mirrors to rewrite both docker.io and quay.io fqdn paths, so with a CI job and no manifest rewrites, I could do a test of a kubernetes operator and a number of containers.

@JanGutter
Copy link
Author

(This open issue put me on the path to podman moby/moby#18818 ), I'll have to check if containerd's rewrite options are similar. Honestly, if containerd for rootful and rootless podman works better, I'm much less interested in getting cri-o to work.

# cri-o depends on some kubernetes packages, the latest stable series
# is a reasonable choice.
ARG KUBERNETES_VERSION="v1.31.0"
ARG CRIO_VERSION="v1.30"
Copy link
Member

Choose a reason for hiding this comment

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

I dont think we are ready to bump to the latest crio version yet (till we make a preload tarbal to include the critctl and other binaries)

@k8s-ci-robot
Copy link
Contributor

PR needs rebase.

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 needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. co/runtime/crio CRIO related issues needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. triage/discuss Items for discussion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants