Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.

howto: add sandbox config annotation howto#576

Merged
grahamwhaley merged 1 commit intokata-containers:masterfrom
bergwolf:annotations
Apr 6, 2020
Merged

howto: add sandbox config annotation howto#576
grahamwhaley merged 1 commit intokata-containers:masterfrom
bergwolf:annotations

Conversation

@bergwolf
Copy link
Copy Markdown
Member

It explains the details of current supported annotations.

Fixes: #486
Fixes: #294
Signed-off-by: Peng Tao bergwolf@hyper.sh

@bergwolf
Copy link
Copy Markdown
Member Author

/test

@bergwolf
Copy link
Copy Markdown
Member Author

Spell check doesn't understand some tech words, what shall I do to fix it?

WARNING: Word ''drop': did you mean one of the following?: drop, droop, drupe, troop
WARNING: Word 'MiB': did you mean one of the following?: MB, Mia, Min, Mir, Mil, Mic, Mi, Mis, Mid, Mi B, Nib, Mob, Rib
WARNING: Word 'MiB': did you mean one of the following?: MB, Mia, Min, Mir, Mil, Mic, Mi, Mis, Mid, Mi B, Nib, Mob, Rib
WARNING: Word 'accpets': did you mean one of the following?: accepts, accents, carpets, accosts, aspects, accepter, accepted
WARNING: Word 'dev': did you mean one of the following?: Dev, deb, div, den, rev, deg, def, dew, Nev, Rev, Lev, Kev, devil, devise
WARNING: Word 'dev': did you mean one of the following?: Dev, deb, div, den, rev, deg, def, dew, Nev, Rev, Lev, Kev, devil, devise
WARNING: Word 'enotes': did you mean one of the following?: emotes, notes, denotes, e notes, endnote, notates, denote, note's, entice, endorse
WARNING: Word 'in'': did you mean one of the following?: in, ins, inn, int, inc, ind, inf, ink, In, IN, Ian, ion's
WARNING: Word 'kata': did you mean one of the following?: Kata, data, Nata, Mata, Katina, Katmai
WARNING: Word 'kata': did you mean one of the following?: Kata, data, Nata, Mata, Katina, Katmai
WARNING: Word 'kata': did you mean one of the following?: Kata, data, Nata, Mata, Katina, Katmai
WARNING: Word 'kata': did you mean one of the following?: data, Katz, Kate, Tanaka, attack, kart, Kurt
WARNING: Word 'modprobe': did you mean one of the following?: mod probe, mod-probe, prober, problem, mobbed, mobber, probated, probates
WARNING: Word 'msize': did you mean one of the following?: maize, size, m size, seize, Mozes, mises
WARNING: Word 'nvdimm': did you mean one of the following?: dimming, Nevadian, Nevada
WARNING: Word 'nvdimm': did you mean one of the following?: dimming, Nevadian, Nevada
WARNING: Word 'oci': did you mean one of the following?: loci, foci, sci, obi, cocci, socio, Ci, ocean, Oise
WARNING: Word 'scsi': did you mean one of the following?: SCSI
WARNING: Word 'seccomp': did you mean one of the following?: sec comp, sec-comp, decompose, compose, recompense, comprise, scamper, scampi
WARNING: Word 'seccomp': did you mean one of the following?: sec comp, sec-comp, decompose, compose, recompense, comprise, scamper, scampi
WARNING: Word 'seccomp': did you mean one of the following?: sec comp, sec-comp, decompose, compose, recompense, comprise, scamper, scampi
WARNING: Word 'urandom': did you mean one of the following?: random, u random, Durand, Armando, Omdurman, Brando, grandam, grandma
WARNING: Word 'vcpus': did you mean one of the following?: CPUs, pus, copious, scops
WARNING: Word 'vhost': did you mean one of the following?: VHOST
WARNING: Word 'vhost': did you mean one of the following?: host, ghost, v host, Host, Horst, hoist
WARNING: Word 'virtiofs': did you mean one of the following?: virtuoso, vision's, vivisection
WARNING: Word 'vm': did you mean one of the following?: cm, v, m, vim, em, vs, vi, am, nm, rm, om, um, gm, mm, pm
WARNING: Word 'vsock': did you mean one of the following?: sock, v sock, viscus, viscose
ERROR: Spell check failed for file: 'how-to/how-to-set-sandbox-config-kata.md'
ERROR: spell check failed for document how-to/how-to-set-sandbox-config-kata.md

Copy link
Copy Markdown
Contributor

@grahamwhaley grahamwhaley left a comment

Choose a reason for hiding this comment

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

Looking good! thanks!
I left some nitpicks. For the spelling, some words (like kata) need capitalisation I think (to Kata) - others, you might have to add to the dictionary, or they may be some 'magic quoting' that can effectively mark them as 'ignore'. See https://github.com/kata-containers/tests/tree/master/cmd/check-spelling#adding-a-new-word - and consult the spell master @jodh-intel ;-)

|-------| ----- | ----- |
| `io.katacontainers.config_path` | string | kata config file location that overrides the default config paths |
| `io.katacontainers.pkg.oci.bundle_path` | string | oci bundle path |
| `io.katacontainers.pkg.oci.container_type`| string | oci container type. Only accpets `pod_container` and `pod_sandbox` |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

s/accpets/accepts/

## Runtime Options
| Key | Value Type | Comments |
|-------| ----- | ----- |
| `io.katacontainers.config.runtime.disable_guest_seccomp`| boolean | determines if seccomp should be applied inside guest |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

s/seccomp/seccomp/ ?

| Key | Value Type | Comments |
|-------| ----- | ----- |
| `io.katacontainers.config.runtime.disable_guest_seccomp`| boolean | determines if seccomp should be applied inside guest |
| `io.katacontainers.config.runtime.sandbox_cgroup_only`| boolean | determines if kata processes are managed only in sandbox cgroup |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

s/kata/Kata/ throughout?

| `io.katacontainers.config.runtime.sandbox_cgroup_only`| boolean | determines if kata processes are managed only in sandbox cgroup |
| `io.katacontainers.config.runtime.experimental` | boolean | determines if experimental features enabled |
| `io.katacontainers.config.runtime.internetworking_model` | string| determines how the VM should be connected to the container network interface. Valid values are `macvtap`, `tcfilter` and `none` |
| `io.katacontainers.config.runtime.disable_new_netns` | boolean | determines if create a netns for hypervisor process |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

reword a little maybe:

determines if a new netns is created for the hypervisor process

## Hypervisor Options
| Key | Value Type | Comments |
|-------| ----- | ----- |
| `io.katacontainers.config.hypervisor.kernel` | string | the kernel needed to boot the container VM |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

s/needed/used/

| `io.katacontainers.config.hypervisor.guest_hook_path` | string | the path within the VM that will be used for 'drop-in' hooks |
| `io.katacontainers.config.hypervisor.use_vsock` | boolean | specify use of vsock for agent communication |
| `io.katacontainers.config.hypervisor.hotplug_vfio_on_root_bus` | boolean | indicate if devices need to be hotplugged on the root bus instead of a bridge|
| `io.katacontainers.config.hypervisor.entropy_source` | string| the path to a host source of entropy (/dev/random, /dev/urandom or real hardware RNG device) |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

s?/dev/random?/dev/random?

@jodh-intel
Copy link
Copy Markdown

Hi @bergwolf - tal at https://github.com/kata-containers/tests/tree/master/cmd/check-spelling/data/ - all acronymns / abbreviations need to use the "official" spelling (including capitalisation) and yes, s/kata/Kata/ please ;)

You can "bypass" the spell-checker by putting a word in backticks, but that should only be used for things like filenames and command names (see https://github.com/kata-containers/documentation/blob/master/Documentation-Requirements.md#files-and-command-names).

# Per-Pod Kata Configurations

Kata Containers gives users freedom to customise at per-pod level, by setting
a wide range of kata specific annotations in the pod spec.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

  • s/spec/specification/
  • s/kata/Kata/

| Key | Value Type | Comments |
|-------| ----- | ----- |
| `io.katacontainers.config_path` | string | kata config file location that overrides the default config paths |
| `io.katacontainers.pkg.oci.bundle_path` | string | oci bundle path |
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

s/oci/OCI/

| Key | Value Type | Comments |
|-------| ----- | ----- |
| `io.katacontainers.config.hypervisor.kernel` | string | the kernel needed to boot the container VM |
| `io.katacontainers.config.hypervisor.image` | string | the guest image that will run in the container VM |
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can you sort the rows alphabetically by column 1 (the key)?

@jodh-intel
Copy link
Copy Markdown

Just a reminder that this PR needs updating based on review feedback.

@egernst
Copy link
Copy Markdown
Member

egernst commented Jan 14, 2020

This is a great document @bergwolf. I know these edits can be painful, but will you get a chance to update the document? I'd love to be able to reference this!

@jodh-intel
Copy link
Copy Markdown

Ping @bergwolf - just a few sed-type updates and this is good to go 😄

@bergwolf bergwolf force-pushed the annotations branch 2 times, most recently from 9de435e to 752c67b Compare January 20, 2020 10:25
@bergwolf
Copy link
Copy Markdown
Member Author

bergwolf commented Jan 20, 2020

@grahamwhaley @jodh-intel Sorry for the delay. I've updated the PR to address all comments including sorting all options alphabetically. All spell checker warnings are fixed. PTAL.

@bergwolf
Copy link
Copy Markdown
Member Author

The spell checker is still failing but doesn't show any errors. @jodh-intel Any clue? I can't reproduce it locally. .ci/static-checks.sh passed successfully on my local machine.

INFO: Checking document code blocks
INFO: processing file 'how-to/how-to-set-sandbox-config-kata.md'
INFO: processing file 'how-to/README.md'
INFO: processing file 'how-to/how-to-set-sandbox-config-kata.md'
INFO: processing file 'how-to/README.md'
INFO: processing file 'how-to/how-to-set-sandbox-config-kata.md'
INFO: processing file 'how-to/README.md'
INFO: Checking all document URLs
INFO: Checking URL https://github.com/kata-containers/documentation/wiki/Initial-release-of-Kata-Containers-with-Firecracker-support
INFO: Spell checking file 'how-to/how-to-set-sandbox-config-kata.md'
INFO: Spell check successful for file: 'how-to/how-to-set-sandbox-config-kata.md'
INFO: Spell checking file 'how-to/README.md'
INFO: Spell check successful for file: 'how-to/README.md'
INFO: Spell checking file 'how-to/how-to-set-sandbox-config-kata.md'
INFO: Spell check successful for file: 'how-to/how-to-set-sandbox-config-kata.md'
INFO: Spell checking file 'how-to/README.md'
INFO: Spell check successful for file: 'how-to/README.md'
INFO: Spell checking file 'how-to/how-to-set-sandbox-config-kata.md'
INFO: Spell check successful for file: 'how-to/how-to-set-sandbox-config-kata.md'
INFO: Spell checking file 'how-to/README.md'
INFO: Spell check successful for file: 'how-to/README.md'
The command ".ci/static-checks.sh" failed and exited with 1 during .

@grahamwhaley
Copy link
Copy Markdown
Contributor

@bergwolf - yep, working on it kata-containers/tests#2240
we (I) broke it with a PR at the end of last week....

@bergwolf bergwolf force-pushed the annotations branch 2 times, most recently from d163609 to c855aaa Compare January 20, 2020 11:51
@bergwolf
Copy link
Copy Markdown
Member Author

Thanks @grahamwhaley.

@bergwolf
Copy link
Copy Markdown
Member Author

/test

@GabyCT
Copy link
Copy Markdown
Collaborator

GabyCT commented Mar 2, 2020

@bergwolf could you please resolve the conflicts ? thanks

It explains the details of current supported annotations.

Fixes: kata-containers#486
Fixes: kata-containers#294
Depends-on: github.com/kata-containers/tests#2240
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
@grahamwhaley
Copy link
Copy Markdown
Contributor

/test-ubuntu

Copy link
Copy Markdown
Contributor

@grahamwhaley grahamwhaley left a comment

Choose a reason for hiding this comment

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

lgtm
I'm happy to merge this, even if we may need to tweak anything, as having this visible is so much better than having it sat in a PR.

@grahamwhaley grahamwhaley merged commit c5a5ac9 into kata-containers:master Apr 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Annotations' documentation k8s: document how to choose which kernel/rootfs for which pod

5 participants