containers / youki

A container runtime written in Rust
https://containers.github.io/youki/
Apache License 2.0
6.16k stars 333 forks source link

Support for `feature` subcommand #815

Open utam0k opened 2 years ago

utam0k commented 2 years ago

Initially, we would like to respond statically. It means hard coding. https://github.com/opencontainers/runtime-spec/pull/1130

chinzhiweiblank commented 2 years ago

Hi! I would like to try this. I am to implement youki features which returns the result in a parseable JSON format like runc. Just that the fields are hard-coded for now. The fields are found here. How do I find out the values for each field?

Is that correct?

utam0k commented 2 years ago

@chinzhiweiblank We need to consider how to dynamically search for fields. I think hard coding is fine for once. If you're up for the challenge, I'll assign it. What do you think?

chinzhiweiblank commented 2 years ago

No problem. I can take it. @utam0k

chinzhiweiblank commented 2 years ago

Hey @utam0k, currently I have a struct with these fields. How do I find out what I should fill in for the fields?

    let feature_config = FeatureConfig {
        oci_version_min: "", // TODO
        oci_version_max: "", // TODO
        hooks: vec!["prestart", "createRuntime", "createContainer", "startContainer", "poststart", "poststop"], // TODO
        mount_options: vec![], // TODO
        linux: Linux {
            namespaces: vec![], // TODO
            capabilities: vec![], // TODO
            cgroup: Cgroup {
                v1: true,
                v2: false,
                systemd: true,
                systemduser: true,
            },
            seccomp: Seccomp {
                enabled: true,
                actions: vec![], // TODO
                operators: vec![], // TODO
                archs: vec![], // TODO
            },
            apparmor: Apparmor {
                enabled: true,
            },
            selinux: Selinux {
                enabled: true,
            },
        },
utam0k commented 2 years ago

@chinzhiweiblank Why don't you try using youki with these features you want to know?

utam0k commented 11 months ago

@chinzhiweiblank Is this going on now? Let us know if there is anything we can do to help.

DarrellTang commented 11 months ago

if @chinzhiweiblank isn't able to get to this, I'd like to try, if possible. I'm pretty new to rust and a devops engineer by day, so I would probably need some handholding though.

utam0k commented 11 months ago

@DarrellTang Sure. Let's give it a try!

musaprg commented 2 months ago

@utam0k Hi, could you assign me to this issue? I'm going to start taking over the PR submitted by @DarrellTang.

utam0k commented 1 month ago

@utam0k Hi, could you assign me to this issue? I'm going to start taking over the PR submitted by @DarrellTang.

Sure. Done