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

feat: support for pods #7

Open
No9 opened this issue Sep 3, 2024 · 4 comments
Open

feat: support for pods #7

No9 opened this issue Sep 3, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@No9
Copy link

No9 commented Sep 3, 2024

podman pod create and podman play kube mem.yaml fails with

Error: building local pause image: finding pause binary: exec: "catatonit": executable file not found in $PATH

catatonit can be found here: https://github.com/openSUSE/catatonit An intial review shows there are a couple of linuxisms in there: prctl.h which may be changable for procctl.h in freebsd.
signalfd.h may need replacing with kqueue implementation.
Also reviewed the older initrs https://github.com/cyphar/initrs but it has the same dependencies on signalfd.

There may be other items once this issue is resolved but this is what I have discovered so far.

kube mem.yaml

apiVersion: v1
kind: Pod
metadata:
  name: memory-demo
  namespace: mem-example
spec:
  containers:
  - name: memory-demo-ctr
    image: polinux/stress
    resources:
      requests:
        memory: "100Mi"
      limits:
        memory: "200Mi"
    command: ["stress"]
    args: ["--vm", "1", "--vm-bytes", "150M", "--vm-hang", "1"]
@dfr
Copy link

dfr commented Sep 3, 2024

You can install catatonit from ports:

$ sudo pkg install catatonit
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
Updating FreeBSD-base repository catalogue...
FreeBSD-base repository is up to date.
Updating containers repository catalogue...
containers repository is up to date.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
	catatonit: 0.1.7_2 [containers]

Number of packages to be installed: 1

226 KiB to be downloaded.

Proceed with this action? [y/N]: y
[1/1] Fetching catatonit-0.1.7_2.pkg: 100%  226 KiB 231.3kB/s    00:01
Checking integrity... done (0 conflicting)
[1/1] Installing catatonit-0.1.7_2...
[1/1] Extracting catatonit-0.1.7_2: 100%
$ pkg info catatonit
catatonit-0.1.7_2
Name           : catatonit
Version        : 0.1.7_2
Installed on   : Tue Sep  3 14:35:40 2024 BST
Origin         : sysutils/catatonit
Architecture   : FreeBSD:14:amd64
Prefix         : /usr/local
Categories     : sysutils
Licenses       : GPLv3+
Maintainer     : [email protected]
WWW            : https://github.com/openSUSE/catatonit
Comment        : A signal-forwarding process manager for containers
Annotations    :
	FreeBSD_version: 1400097
	build_timestamp: 2024-08-20T17:09:36+0000
	built_by       : poudriere-git-3.4.99.20231211
	port_checkout_unclean: no
	port_git_hash  : f95273e649e4
	ports_top_checkout_unclean: no
	ports_top_git_hash: a44e54a52619
	repo_type      : binary
	repository     : containers
Flat size      : 655KiB
Description    :
A container init that is so simple it's effectively brain-dead. See
https://github.com/openSUSE/catatonit#readme for more details.

This is based on my port of catatonit which you can find at https://github.com/dfr/catatonit.

@dfr
Copy link

dfr commented Sep 3, 2024

Possibly we should add catatonit as a dependency of either podman-suite or podman.

@No9
Copy link
Author

No9 commented Sep 3, 2024

Thanks @dfr I'd say it should be added alright as I totally missed you could get it from ports so someone else probably will

Keeping this open as I want to run the yaml tests and capture them here

@dfr
Copy link

dfr commented Sep 3, 2024

I'll add this to the podman-suite port when I update the podman ports next. In the meantime, after manually installing catatonit, pods should work for you - I use them locally with podman and Kubernetes

@alice-sowerby alice-sowerby added the enhancement New feature or request label Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants